Nodes/ComfyUI-PSD2Layer/Merge Layer Images
ComfyUI Node

Merge Layer Images

From loose IMAGEs to a layered PSD in one node — no PSD source required

By Nolan0722·Created 2 months ago·Updated about a month ago· 7
Merge Layer Images
  • image_1
  • image_2
  • image_3
  • image_4
  • image_5
  • image_6
  • image_7
  • image_8
  • image_9
  • image_10
  • psd
name_1Image_1
canvas_width0
canvas_height0
name_2Image_2
name_3Image_3
name_4Image_4
name_5Image_5
name_6Image_6
name_7Image_7
name_8Image_8
name_9Image_9
name_10Image_10

Here's the node for the workflow nobody had a good answer for: you've got a handful of generated images and you want them in one layered PSD, ready for someone to open in Photoshop and keep editing. Merge Layer Images takes one to ten IMAGE inputs and stacks them into a single PSD document, each image as its own layer group, centered on a shared canvas. No PSD to load, no metadata side channel - this is the "make a PSD from scratch" path of the pack, and it's genuinely useful for batch jobs where the old answer was side-by-side PNGs and a Photoshop action.

How it works

Each image becomes a root group (named Image_1, Image_2, … by default, overridable via name_N), centered on the canvas, and written as a single layer inside it. Stacking follows the slot numbers: image_1 is on top, higher numbers underneath - same convention as Merge PSD Files. Canvas size defaults to the largest width and height across all inputs when canvas_width/canvas_height are 0, or to whatever you pin.

Because each image is a group, the resulting file stays editable: select the group in Photoshop and the layers inside are intact. It's a lazy-man's layout sheet with real layer structure.

The inputs that matter

  • image_1 - required, and any IMAGE works: an upscale output, a VAE decode, a saved render, an img2img result. image_2 through image_10 are optional.
  • name_1 … name_10 - group names, defaulting to Image_N. Set these if you want the file to be self-documenting.
  • canvas_width / canvas_height - 0 = auto (max across inputs), otherwise a fixed canvas.

Output

One pin: psd, an in-memory PSD reference. Wire it to Save PSD File to write it out. That's it - there's no preview pin on this node, so if you want to see what you're about to save, preview the inputs or save and look at the file.

Gotchas

The transparency question comes up first with this node: if your images are RGBA, their alpha carries into the PSD and layers will be non-rectangular in Photoshop. If they're plain RGB, you get opaque rectangles - the pack won't invent transparency for you. Keep that in mind when the "layer" you wanted to be a cutout shows up as a box.

Second, the batch trap: this node takes one image per slot, and if you feed a multi-frame IMAGE batch into a slot, only the first frame is used. Split batches into single images upstream, or you'll silently lose frames.

Install

Same pack-wide story: ComfyUI Manager → ComfyUI-PSD2Layer, or git clone https://github.com/Nolan0722/ComfyUI-PSD2Layer into custom_nodes, pip install -r requirements.txt, restart. Just psd-tools, Pillow, numpy - no models, no GPU. If you've already got the pack installed for any of the other nodes, this one's already there.

CategoryPSD2Layer

Inputs (22)

NameTypeDefaultDescription
image_1IMAGE
name_1STRINGImage_1
canvas_widthINT00–65536
canvas_heightINT00–65536
image_2optIMAGE
name_2optSTRINGImage_2
image_3optIMAGE
name_3optSTRINGImage_3
image_4optIMAGE
name_4optSTRINGImage_4
image_5optIMAGE
name_5optSTRINGImage_5
image_6optIMAGE
name_6optSTRINGImage_6
image_7optIMAGE
name_7optSTRINGImage_7
image_8optIMAGE
name_8optSTRINGImage_8
image_9optIMAGE
name_9optSTRINGImage_9
image_10optIMAGE
name_10optSTRINGImage_10

Outputs (1)

NameTypeDescription
psdPSD