Add Layer
Assemble a scene without flattening it
- image
- layers
- mask
- LAYERS
Add Layer is the node that turns any image into an editable layer. It's the front half of ComfyUI's newest core experiment: a real layer system with an interactive editor, which landed around August 2026. You use AddLayer to stack images - subject over background, foreground prop, logo, whatever - and then fine-tune the placement by dragging instead of by rerunning a prompt. It doesn't render anything itself; it builds the stack that Create Layered Image (the ImageCompositor node) composites and lets you edit.
The pitch is simple: stop hardcoding positions. If you've ever sat there re-rolling a prompt hoping the character would land two feet to the left, this is the escape hatch. Generate the pieces separately, cut them out, stack them with AddLayer, and move them in the editor.
How it works. Each AddLayer call wraps your image in a layer item and emits a small LAYERS document - version, canvas, and an ordered list of layers. Connect a stack to the layers input to append to it; leave it unconnected to start a fresh one, and chain AddLayer nodes together to grow the stack. The canvas size of whatever you feed in is carried forward to the output, so your composition doesn't silently change shape as you add pieces.
The one thing worth internalizing: every placement field is labeled initial. That's deliberate. The values you set here are just the starting point - once you run the graph and open the editor on Create Layered Image, you drag layers around and the saved state overrides these defaults. Don't obsess over exact pixel positions in the node; rough it in and nudge it visually.
The inputs that matter. Only image is required, and it's the one beginners actually reach for. Beyond that:
- layers - the stack to append to. Forget to connect it and you start a new stack, so a chain of unconnected AddLayers won't stack.
- mask - transparency for the layer. Note the convention: masked areas (value 1) become transparent, and it multiplies with any alpha the image already carries.
- x / y, opacity, blend_mode, rotation, width, height, z_index, flip_h / flip_v, name - initial placement and styling.
width/heightof 0 keep the image's native size.blend_modeoffers the usual suspects (normal, multiply, screen, overlay, …).z_indexis the stacking override; equal values keep list order. - An image batch expands to consecutive layers - handy for feeding several cutouts through at once.
Output. One output: LAYERS. Wire it into Create Layered Image to composite and edit. You can also mix in LayersFromBoundingBoxes to have detected objects join the same stack.
Getting it. No install - it ships with ComfyUI core, so it updates with your normal ComfyUI update. It's marked experimental, and this whole compositor subsystem is new, so expect the API to shift a bit as it matures.
Where people get burned. The mask convention trips everyone up once: 1 = transparent here, the opposite of what a lot of node packs use. And because the editor's saved layout overrides your inputs, a carefully tuned x/y in AddLayer can look like it "lost" after you've edited the composite - that's the design working, not a bug. Also remember the bottom layer sits on a default transparent background; a non-normal blend mode there produces transparency rather than a composited result.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Layer content at its native size. A batch expands to consecutive layers. | |
| layersopt | LAYERS | Layer stack to append to. Leave unconnected to start a new stack. | |
| maskopt | MASK | Transparency mask for this layer. Masked areas (value 1) become transparent, multiplying with any alpha channel the image already carries. | |
| nameopt | STRING | Layer name shown in the compositor editor. | |
| xopt | INT | 0-16384–16384 | Initial horizontal placement on the canvas. |
| yopt | INT | 0-16384–16384 | Initial vertical placement on the canvas. |
| opacityopt | FLOAT | 1.000–1 | Initial layer opacity. |
| blend_modeopt | COMBO | normal | Initial blend mode, applied against the layers below. On the bottom layer over the default transparent background, non-normal modes produce transparency. |
| rotationopt | FLOAT | 0-360–360 | Initial rotation in degrees, clockwise. |
| widthopt | INT | 00–16384 | Initial display width. 0 keeps the image's native width. |
| heightopt | INT | 00–16384 | Initial display height. 0 keeps the image's native height. |
| z_indexopt | INT | 0-1000–1000 | Stacking override. Layers are stable-sorted by z_index; equal values keep their list order. |
| flip_hopt | BOOLEAN | false | Flip the layer horizontally. |
| flip_vopt | BOOLEAN | false | Flip the layer vertically. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LAYERS | LAYERS | The layer stack with this layer appended. |