RTX Remix Create Layer
Create (or insert) a layer in the RTX Remix stage from inside a workflow
- context
- context
- 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_replacementlayer_type(STRING) - which kind. Valid values areautoupscale,capture_baker,capture,replacement,workfile, orNone. If you're processing textures,replacementis your usual choice.
Then the knobs that actually change behavior:
create_or_insert(BOOLEAN) - labeledcreatevsinserton 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. Defaultfalse, so a collision will error. Flip it on for idempotent workflows.set_edit_target(BOOLEAN) - defaulttrue, 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.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| layer_id | STRING | — | |
| layer_type | STRING | — | |
| replace_existing | BOOLEAN | false | — |
| set_edit_target | BOOLEAN | true | — |
| sublayer_position | INT | -1 | — |
| create_or_insert | BOOLEAN | true | — |
| context | RTXRemixContext | — | |
| enable_this_node | BOOLEAN | true | — |
| parent_layer_idopt | STRING | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| context | RTXRemixContext | — |
| layer_id | STRING | — |