Nodes/ComfyUI-RTX-Remix/RTX Remix Create Layer
ComfyUI Node

RTX Remix Create Layer

Create (or insert) a layer in the RTX Remix stage from inside a workflow

By NVIDIAGameWorks·Created 2 years ago·Updated 5 days ago· 71
RTX Remix Create Layer
  • context
  • context
  • layer_id
layer_id
layer_type
replace_existingfalse
set_edit_targettrue
sublayer_position-1
create_or_inserttrue
enable_this_nodetrue
parent_layer_id

If you're automating RTX Remix from ComfyUI, at some point you need to make a layer - a fresh replacement layer to hold the textures you're about to generate, say. That's this node. It's the POST /stagecraft/layers call of the pack, and it's where your workflow goes from "reading the project" to "building it."

The core inputs are dead simple:

  • layer_id (STRING) - the ID/path of the layer you want, e.g. project/layers/my_new_replacement
  • layer_type (STRING) - which kind. Valid values are autoupscale, capture_baker, capture, replacement, workfile, or None. If you're processing textures, replacement is your usual choice.

Then the knobs that actually change behavior:

  • create_or_insert (BOOLEAN) - labeled create vs insert on the widget. Create makes a new layer; insert puts one into an existing position. Default is create.
  • replace_existing (BOOLEAN) - if a layer with that ID already exists, replace it. Default false, so a collision will error. Flip it on for idempotent workflows.
  • set_edit_target (BOOLEAN) - default true, meaning the freshly created layer immediately becomes the Toolkit's edit target, the layer that receives subsequent modifications. Usually exactly what you want.
  • sublayer_position (INT) - where in the parent's child list this lands; -1 (default) appends at the end.

There's also the pack's standard context (RTXRemixContext) and enable_this_node bypass. Optional parent_layer_id nests the new layer under an existing one.

Outputs: context (passed through) and layer_id (echoed back as a string). Echoing the ID is more useful than it looks - it means you can create a layer, then immediately wire that same string into Set Edit Target or Ingest Texture without a second thought.

A couple of real-world notes. The layer ID is a path, and you'll get the cleanest results building it with the pack's RTX Remix Define Layer ID helper rather than hand-typing slashes. And if you're running the workflow more than once against the same project, replace_existing = true (or checking with RTX Remix Get Layers first) is the difference between "runs every time" and "crashes on the second run because the layer already exists."

Install: this ships in NVIDIAGameWorks/ComfyUI-RTX-Remix. 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+ (it's a V3-schema pack), and - like every 🌐 REST API node - the RTX Remix Toolkit must be running with a project open and its REST API reachable on the address/port your context carries (default 127.0.0.1:8011).

Where people get burned: wrong layer_type strings get rejected (the Toolkit validates them), so use the pack's RTX Remix Layer Type dropdown node if you don't want to memorize the list. And remember set_edit_target defaults on - if you create a layer and then wonder why your subsequent edits are landing somewhere unexpected, that's the culprit. It's a feature, but it's a surprise the first time.

CategoryRTXRemix/layers

Inputs (9)

NameTypeDefaultDescription
layer_idSTRING
layer_typeSTRING
replace_existingBOOLEANfalse
set_edit_targetBOOLEANtrue
sublayer_positionINT-1
create_or_insertBOOLEANtrue
contextRTXRemixContext
enable_this_nodeBOOLEANtrue
parent_layer_idoptSTRING

Outputs (2)

NameTypeDescription
contextRTXRemixContext
layer_idSTRING