Nodes/comfyui-mixlab-nodes/New Layer ♾️Mixlab
ComfyUI Node Runs on cloud

New Layer ♾️Mixlab

New Layer — Building a Photoshop-Style Layer Stack in ComfyUI

By MixLabPro·Created 3 years ago·Updated 2 months ago· 1,859
New Layer ♾️Mixlab
  • image
  • mask
  • layers
  • canvas
  • layers
x0
y0
width512
height512
z_index0
scale_option

New Layer is where Mixlab's layer-compositing system actually starts. Think of it as the node-graph equivalent of adding a new layer in Photoshop: you place an image at a specific position and size, give it a stacking order, optionally mask part of it out, and - this is the part that makes it a real system rather than a one-off - chain it onto whatever layers already exist so you can build up a full composition one node at a time.

The positioning fields are exactly what you'd expect from a layer tool: x and y (integers, defaulting to 0, allowed to go negative - useful if a layer needs to bleed off the edge of the canvas) set where the top-left corner lands, and width/height (integers, default 512, up to 8192) set the layer's size. z_index (0 to 100, default 0) controls stacking order - higher values sit on top. scale_option is a three-way dropdown - width, height, or overall - that decides how the source image gets fit into that width/height box: scale to match the width, scale to match the height, or scale the whole image proportionally to fit within both. image, the required content itself, is typed as the wildcard *.

The optional inputs are what turn a single New Layer node into a real stack. layers accepts the output of a previous New Layer node - chain several together and each one appends itself onto the growing stack rather than replacing it, which is how you build up multiple layers across separate node instances instead of cramming everything into one. mask lets you clip a layer to a shape rather than a plain rectangle. canvas lets you feed in a background image the layer sits on top of, if you want that context baked in at this stage rather than left for the merge step. The single output, layers, is a LAYER list - feed the final one in the chain into Merge Layers to flatten the whole stack into one composited IMAGE plus MASK.

The README's own framing for this system is worth repeating: it's meant for splitting a composition into layers so you can composite images and then, notably, feed the result into ControlNet for further processing - this isn't just a poster-making tool, it's meant to plug into the rest of a generation pipeline.

The most common way this goes wrong isn't the node itself, it's the chain. Forget to wire layers from the previous New Layer node into the next one, and you've accidentally started a second, separate stack instead of extending the first - Merge Layers will only see whichever stack actually reaches it. If a layer is missing from your final composite, that broken chain link is the first thing to check, well before assuming the compositor mishandled something.

Install is the pack's usual path. Through ComfyUI Manager: search "comfyui-mixlab-nodes," install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/shadowcz007/comfyui-mixlab-nodes.git
cd comfyui-mixlab-nodes
install.bat

or pip3 install -r requirements.txt in a venv, or the embedded-python pip call on a portable build. No model download required - this is compositing math, not inference.

Category♾️Mixlab/Layer

Inputs (10)

NameTypeDefaultDescription
xINT0-1024–8192
yINT0-1024–8192
widthINT5121–8192
heightINT5121–8192
z_indexINT00–100
scale_optionCOMBO3 options: width, height, overall
image*
maskoptMASK
layersoptLAYER
canvasoptIMAGE

Outputs (1)

NameTypeDescription
layersLAYER