RTX Remix Get Layers
Find every layer in your RTX Remix project without leaving ComfyUI
- context
- context
- layer_ids
- layer_types
- all_layer_type_exist
RTX Remix projects are built out of layers - capture layers, replacement layers, workfiles, the whole USD sandwich that holds a remaster together. When you're driving the Toolkit from ComfyUI (the advanced REST API approach this pack enables), the first thing you usually need is: what layers actually exist right now, and where? That's this node. It queries the currently open project and hands you back layer IDs as a list, ready to feed into Create Layer, Mute Layer, Set Edit Target, or any other layer node in the pack.
Mechanically it's a GET /stagecraft/layers call (or /stagecraft/layers/{parent}/sublayers if you give it a parent_layer_id), filtered client-side by what you ask for. It returns up to three useful things:
layer_ids- a list of layer ID stringslayer_types- the matching type for each ID, as a parallel listall_layer_type_exist- a boolean telling you whether every type you asked for was found
That boolean is the sneaky-good output. Because the node walks the layer tree (depth-first through children), all_layer_type_exist lets you branch with a Switch node: if a replacement layer doesn't exist yet, create it; if it does, skip. That's how you write idempotent workflows that run clean more than once.
The inputs that matter:
layer_types(STRING) - comma-separated types to look for, e.g.replacement,capture. It's required, so you'll type something.layer_count(INT) - how many layers to return;-1(default) means all.sublayers(BOOLEAN) -truewalks into child layers,falsereturns only the immediate children of the parent (or the top level).crash_if_not_exist(BOOLEAN) - defaults totrue, and it's the trap. If no layer matches, the node raises "No layers found." Set this tofalseand it instead returns empty lists plusall_layer_type_exist = false, which is what you want if you're handling "doesn't exist yet" in your own logic.
Optional inputs: parent_layer_id (scope the search under a specific layer) and regex_filter (a regex that layer IDs are matched against - note it uses re.match, so the pattern anchors at the start of the ID).
Like the other "read the live project" nodes, RTX Remix Get Layers always re-executes (it tells ComfyUI not to cache it), because the Toolkit's layer list can change between runs without any ComfyUI input changing.
Install: part of NVIDIAGameWorks/ComfyUI-RTX-Remix. Easiest via ComfyUI Manager (search "RTX Remix"); manually:
cd ComfyUI/custom_nodes
git clone https://github.com/NVIDIAGameWorks/ComfyUI-RTX-Remix
# restart ComfyUI
Requires ComfyUI v0.3.48+ (V3 schema) and a running RTX Remix Toolkit with the REST API reachable - this node doesn't work in the standalone "integration workflow" mode, only in REST API workflows where ComfyUI is in charge.
Where people get burned: empty project + default settings = hard crash, so decide up front whether you want crash_if_not_exist to be your guardrail or your shutdown button. And if you're not seeing expected layers, check you actually have a project open in the Toolkit - "no layers found" is usually "no project open."
Inputs (8)
| Name | Type | Default | Description |
|---|---|---|---|
| layer_types | STRING | — | |
| layer_count | INT | -1 | — |
| sublayers | BOOLEAN | true | — |
| crash_if_not_exist | BOOLEAN | true | — |
| context | RTXRemixContext | — | |
| enable_this_node | BOOLEAN | true | — |
| parent_layer_idopt | STRING | — | |
| regex_filteropt | STRING | — |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| context | RTXRemixContext | — |
| layer_ids | STRING | — |
| layer_types | STRING | — |
| all_layer_type_exist | BOOLEAN | — |