RTX Remix Remove Layer
Delete a layer from the stage, on purpose, from inside ComfyUI
- context
- context
- layer_id
RTX Remix Remove Layer is the destructive member of the layer family. It deletes a layer from the currently open project - not mutes it, not hides it, removes it. That makes it powerful and, if you're not careful, a workflow that eats your work. Use it when your automation creates layers as scratch and needs to clean them up, or when a "regenerate from scratch" pass means nuking the old replacement layer before creating a fresh one.
Mechanically it's a DELETE /stagecraft/layers/{layer_id} call against the Toolkit, with an optional parent context so the API knows where the layer lives. The parent_layer_id input matters when your layer IDs aren't globally unique enough to locate on their own.
Inputs:
layer_id(STRING) - the layer to remove. The one that matters.parent_layer_id(STRING) - the layer's parent, for disambiguation. Empty by default.context(RTXRemixContext) - the standard connection thread.enable_this_node(BOOLEAN) - the standard bypass; off returns an empty string.
Outputs:
context- passed through.layer_id(STRING) - echoed back, convenient if you want to confirm or log what was removed.
The classic safe pattern is to pair this with RTX Remix Get Layers: query for the layer you're about to replace, and only run Remove Layer if it actually exists. RTX Remix also gives you a gentler option - RTX Remix Mute Layer - when you want a layer out of the way but still present. Remove is for when you're done with it for good.
Install: part of NVIDIAGameWorks/ComfyUI-RTX-Remix, NVIDIA's official pack. ComfyUI Manager (search "RTX Remix") or:
cd ComfyUI/custom_nodes
git clone https://github.com/NVIDIAGameWorks/ComfyUI-RTX-Remix
# restart ComfyUI
Needs ComfyUI v0.3.48+ (V3 schema) and a running Toolkit with a project open - a live API call.
Where people get burned: no undo. This is a real delete against your project, and there's no recycle bin in the pipeline. Double-check the layer_id (build it with RTX Remix Define Layer Id or pull it from Get Layers rather than typing paths by hand), and gate the node behind an existence check or an explicit flag before you let it run in a loop. Also, don't assume an empty parent_layer_id always resolves - if removal fails with a not-found error and you're sure the layer exists, try supplying the parent.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| parent_layer_id | STRING | — | |
| layer_id | STRING | — | |
| context | RTXRemixContext | — | |
| enable_this_node | BOOLEAN | true | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| context | RTXRemixContext | — |
| layer_id | STRING | — |