Nodes/ComfyUI-RTX-Remix/RTX Remix Get Layers
ComfyUI Node

RTX Remix Get Layers

Find every layer in your RTX Remix project without leaving ComfyUI

By NVIDIAGameWorks·Created 2 years ago·Updated 6 days ago· 71
RTX Remix Get Layers
  • context
  • context
  • layer_ids
  • layer_types
  • all_layer_type_exist
layer_types
layer_count-1
sublayerstrue
crash_if_not_existtrue
enable_this_nodetrue
parent_layer_id
regex_filter

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 strings
  • layer_types - the matching type for each ID, as a parallel list
  • all_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) - true walks into child layers, false returns only the immediate children of the parent (or the top level).
  • crash_if_not_exist (BOOLEAN) - defaults to true, and it's the trap. If no layer matches, the node raises "No layers found." Set this to false and it instead returns empty lists plus all_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."

CategoryRTXRemix/layers

Inputs (8)

NameTypeDefaultDescription
layer_typesSTRING
layer_countINT-1
sublayersBOOLEANtrue
crash_if_not_existBOOLEANtrue
contextRTXRemixContext
enable_this_nodeBOOLEANtrue
parent_layer_idoptSTRING
regex_filteroptSTRING

Outputs (4)

NameTypeDescription
contextRTXRemixContext
layer_idsSTRING
layer_typesSTRING
all_layer_type_existBOOLEAN