Nodes/ComfyUI/Add Layer
ComfyUI Node Runs on cloud

Add Layer

Assemble a scene without flattening it

By Comfy-Org·Created 4 years ago·Updated about 5 hours ago· 128,055
Add Layer
  • image
  • layers
  • mask
  • LAYERS
name
x0
y0
opacity1.00
blend_modenormal
rotation0
width0
height0
z_index0
flip_hfalse
flip_vfalse

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/height of 0 keep the image's native size. blend_mode offers the usual suspects (normal, multiply, screen, overlay, …). z_index is 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.

Categoryimage

Inputs (14)

NameTypeDefaultDescription
imageIMAGELayer content at its native size. A batch expands to consecutive layers.
layersoptLAYERSLayer stack to append to. Leave unconnected to start a new stack.
maskoptMASKTransparency mask for this layer. Masked areas (value 1) become transparent, multiplying with any alpha channel the image already carries.
nameoptSTRINGLayer name shown in the compositor editor.
xoptINT0-16384–16384Initial horizontal placement on the canvas.
yoptINT0-16384–16384Initial vertical placement on the canvas.
opacityoptFLOAT1.000–1Initial layer opacity.
blend_modeoptCOMBOnormalInitial blend mode, applied against the layers below. On the bottom layer over the default transparent background, non-normal modes produce transparency.
rotationoptFLOAT0-360–360Initial rotation in degrees, clockwise.
widthoptINT00–16384Initial display width. 0 keeps the image's native width.
heightoptINT00–16384Initial display height. 0 keeps the image's native height.
z_indexoptINT0-1000–1000Stacking override. Layers are stable-sorted by z_index; equal values keep their list order.
flip_hoptBOOLEANfalseFlip the layer horizontally.
flip_voptBOOLEANfalseFlip the layer vertically.

Outputs (1)

NameTypeDescription
LAYERSLAYERSThe layer stack with this layer appended.