ComfyTV/Inputgenerated

Layer Editor(LayerEditorStage)

The Layer Editor node is the input stage of the ComfyTV Layer Editor.

Layer Editor Stage

image
images
layer_state
{}
width
1024
height
1024
captured_image
STRING
captured_images
STRING
ComfyTV

Description

The Layer Editor node is the input stage of the ComfyTV Layer Editor. It collects the state of a layered composition (the artboard, its layers, masks, text elements, and transforms) together with the rendered captures of that composition, and exposes them as image outputs that can be wired into the rest of a ComfyTV workflow.

The node itself does no compositing work. The composition is authored in the Layer Editor UI, and the values of the widgets below are written back into the node automatically as you work. For that reason every input is described in the source as internal: they are plumbing between the editor and the graph rather than parameters you are expected to tune by hand. Editing them manually is possible, but it is rarely necessary and can desynchronize the node from the editor document.

Since the node lives in the ComfyTV/Input category, it behaves as a graph entry point: it supplies images to downstream nodes rather than consuming them.

Inputs

InputTypeDefaultRange / StepDescription
layer_stateSTRING"{}"noneLayer Editor document JSON: the serialized layers, masks, text elements, and transforms that make up the composition.
widthINT102464 to 4096, step 8Artboard width in pixels.
heightINT102464 to 4096, step 8Artboard height in pixels.
captured_imageSTRING""none/view URL of the last composite capture upload, meaning the flattened render of the whole artboard.
captured_imagesSTRING""noneJSON images batch of the last per-layer capture, meaning one rendered image per layer.

layer_state

The serialized document behind the editor. It is a JSON string that defaults to an empty document ({}), so a freshly added node carries no layers until you draw something in the editor. Everything visual about the node's output is derived from this state, which makes it the authoritative record of the composition.

width and height

The artboard dimensions in pixels. Both are integers clamped between 64 and 4096 with a step of 8, so valid sizes are always multiples of 8. These values define the resolution of the composited result and are normally set by the editor when the artboard is created or resized.

captured_image

A /view URL string pointing at the most recent composite capture upload. This is the flattened render of the entire artboard and is the source for the single image output. It defaults to an empty string, which means no capture has been taken yet.

captured_images

A JSON-encoded images batch describing the most recent per-layer capture. Instead of a single flattened render, this holds one image per layer and feeds the batched images output. It also defaults to an empty string until a per-layer capture is performed.

Outputs

OutputTypeDescription
ImageCOMFYTV_IMAGEThe latest composite capture of the full artboard, taken from captured_image.
ImagesCOMFYTV_IMAGESThe latest per-layer capture batch, taken from captured_images.

The single image output is convenient when you just want the final composited artwork, while the batch output is useful when each layer needs to be processed separately downstream, for example to feed per-layer operations or to compare layers against the flattened result.

Usage Notes

  • Add the node from the ComfyTV/Input category, open the Layer Editor interface, and build your composition there. The widgets update automatically as you edit.
  • Make sure to perform a capture before relying on the outputs. Until then both capture inputs are empty strings and the outputs carry no image data.
  • The width and height widgets are constrained to multiples of 8 between 64 and 4096 pixels. Off-grid values will not be accepted, which keeps sizes compatible with common diffusion and upscaling pipelines.
  • Because the state is stored as JSON in a single widget, a workflow file fully preserves the editable composition, not just the rendered pixels. Reopening the workflow restores the layers for further editing.
  • Avoid hand-editing layer_state or captured_images unless you are deliberately constructing them programmatically; malformed JSON will not round-trip through the editor.

Comments

Sign in with GitHub to join the discussion.

Loading comments…