Nodes/PSD Layers/Load Layers PSD
ComfyUI Node

Load Layers PSD

Your Photoshop files, layer by layer, no Photoshop needed

By coeyes·Created 21 days ago·Updated 4 days ago· 3
Load Layers PSD
    • composite_image
    • layers_batch
    • masks_batch
    • layer_1_image
    • layer_1_mask
    • layer_2_image
    • layer_2_mask
    • layer_3_image
    • layer_3_mask
    • layer_4_image
    • layer_4_mask
    • layer_5_image
    • layer_5_mask
    • layer_6_image
    • layer_6_mask
    • layer_7_image
    • layer_7_mask
    • layer_8_image
    • layer_8_mask
    • layer_9_image
    • layer_9_mask
    • layer_10_image
    • layer_10_mask
    • layer_11_image
    • layer_11_mask
    • layer_12_image
    • layer_12_mask
    • layer_13_image
    • layer_13_mask
    • layer_14_image
    • layer_14_mask
    • layer_15_image
    • layer_15_mask
    • layer_16_image
    • layer_16_mask
    • layer_17_image
    • layer_17_mask
    • layer_18_image
    • layer_18_mask
    • layer_19_image
    • layer_19_mask
    • layer_20_image
    • layer_20_mask
    • layer_21_image
    • layer_21_mask
    • layer_22_image
    • layer_22_mask
    • layer_23_image
    • layer_23_mask
    • layer_24_image
    • layer_24_mask
    • layer_25_image
    • layer_25_mask
    • layer_26_image
    • layer_26_mask
    • layer_27_image
    • layer_27_mask
    • layer_28_image
    • layer_28_mask
    • layer_29_image
    • layer_29_mask
    • layer_30_image
    • layer_30_mask
    • layer_31_image
    • layer_31_mask
    • layer_32_image
    • layer_32_mask
    psd
    layer_state
    psd_path

    ComfyUI has always been bad with layered files. LoadImage gives you one flattened raster, and anything you save flattens again. So when your source of truth is a PSD - a designer's comp, a client's edit, a file somebody worked on in Photoshop - you used to flatten it by hand before the graph could touch it. Load Layers PSD fixes that. It reads a real PSD or PSB layer by layer, hands you a composite plus per-layer image/mask pairs, and does it with zero Photoshop installed.

    This is the generic load half of the ComfyUI-PSD-Layers pack (the save half is Save Seedream Layers PSD, built for Seedream's layer separation). If your work touches layered Photoshop files at all - say, for compositing, per-layer inpainting, or recoloring - this is the node you've been missing.

    What comes out

    The node is almost absurdly generous: three batch outputs, then 32 per-layer image/mask pairs (layer_1_image, layer_1_mask, layer_2_image… up to layer_32_mask). What you'll actually wire:

    • composite_image - the full merged render. Straight into a SaveImage or VAE decode for preview.
    • layers_batch / masks_batch - every layer on a full-canvas batch, with no 32-layer ceiling. Feed these to anything that wants a batch of images.
    • layer_N_image / layer_N_mask - tight crops of each layer, in bottom-to-top PSD order. Unused slots collapse away in the UI, so you're not staring at 32 empty sockets.

    How it works

    Under the hood it's psd-tools. Only leaf layers are extracted - groups get flattened, and layer masks, group raster masks, and clipping masks are pre-applied into each layer's alpha. Text layers use the embedded raster, so no fonts are needed, and shape layers are rasterized from their vector masks. Every Photoshop blend mode is supported through psd-tools' blend engine, with the README measuring about 0.03/255 error against Photoshop's own render. Before you touch anything, the composite is the PSD's embedded Photoshop render - pixel-perfect.

    Two inputs you actually set. psd is a dropdown of files in your input folder, and you can drag & drop a file straight onto the node instead. psd_path is an absolute server-side path for the edit-in-Photoshop-then-reload loop: set it, edit the file, hit Reload (or just re-run - the node reloads automatically when the file's mtime changes). The layer_state widget is managed by the panel for you; you never type into it.

    Gotchas

    • Adjustment layers and layer styles aren't applied when the node recomposites after you reorder or hide things. The untouched composite uses Photoshop's embedded render, but once you edit, expect a status-bar warning and a result that differs slightly from what Photoshop would show.
    • Masks come out as 1 = transparent, inverted from the usual LoadImage convention. Keep that in mind before wiring into nodes that assume 1 = opaque.
    • Per-layer outputs keep their original PSD order even after you drag layers around in the panel; only the composite reflects your edits.

    Install

    ComfyUI Manager (search "PSD Layers" or "ComfyUI-PSD-Layers"), or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/coeyes/ComfyUI-PSD-Layers
    cd ComfyUI-PSD-Layers
    pip install -r requirements.txt   # psd-tools>=1.18.0, pillow, numpy
    

    Then restart ComfyUI. No model files, no API keys - this is pure file parsing. psd-tools 1.18+ is a hard requirement and the code refuses to start without it; if it errors, pip install -U "psd-tools>=1.18.0" first.

    Troubleshooting

    • "PSD file not found" - the dropdown lists files in your input folder; on a remote server the path must be readable server-side.
    • psd_path rejected - it has to be a .psd/.psb file that actually exists on the server machine, not your local PC.
    • More than 32 layers - the batch outputs carry everything; the per-layer slots just stop at 32, and the node logs a warning about it.

    That's the whole pitch: load, look, wire, re-save. It quietly turns ComfyUI from "Photoshop's flat export" into something that can work with the layered file itself.

    Categoryimage

    Inputs (3)

    NameTypeDefaultDescription
    psdCOMBOPSD file in the input folder. You can also drag & drop a file onto the node.
    layer_stateSTRINGLayer order/visibility state edited in the panel (managed automatically).
    psd_pathoptSTRINGAbsolute path on the server (.psd/.psb). When set, this file is read instead of the psd combo above. Useful for the edit-in-Photoshop-then-Reload workflow. For remote access the path must be readable by the server.

    Outputs (67)

    NameTypeDescription
    composite_imageIMAGE
    layers_batchIMAGE
    masks_batchMASK
    layer_1_imageIMAGE
    layer_1_maskMASK
    layer_2_imageIMAGE
    layer_2_maskMASK
    layer_3_imageIMAGE
    layer_3_maskMASK
    layer_4_imageIMAGE
    layer_4_maskMASK
    layer_5_imageIMAGE
    layer_5_maskMASK
    layer_6_imageIMAGE
    layer_6_maskMASK
    layer_7_imageIMAGE
    layer_7_maskMASK
    layer_8_imageIMAGE
    layer_8_maskMASK
    layer_9_imageIMAGE
    layer_9_maskMASK
    layer_10_imageIMAGE
    layer_10_maskMASK
    layer_11_imageIMAGE
    layer_11_maskMASK
    layer_12_imageIMAGE
    layer_12_maskMASK
    layer_13_imageIMAGE
    layer_13_maskMASK
    layer_14_imageIMAGE
    layer_14_maskMASK
    layer_15_imageIMAGE
    layer_15_maskMASK
    layer_16_imageIMAGE
    layer_16_maskMASK
    layer_17_imageIMAGE
    layer_17_maskMASK
    layer_18_imageIMAGE
    layer_18_maskMASK
    layer_19_imageIMAGE
    layer_19_maskMASK
    layer_20_imageIMAGE
    layer_20_maskMASK
    layer_21_imageIMAGE
    layer_21_maskMASK
    layer_22_imageIMAGE
    layer_22_maskMASK
    layer_23_imageIMAGE
    layer_23_maskMASK
    layer_24_imageIMAGE
    layer_24_maskMASK
    layer_25_imageIMAGE
    layer_25_maskMASK
    layer_26_imageIMAGE
    layer_26_maskMASK
    layer_27_imageIMAGE
    layer_27_maskMASK
    layer_28_imageIMAGE
    layer_28_maskMASK
    layer_29_imageIMAGE
    layer_29_maskMASK
    layer_30_imageIMAGE
    layer_30_maskMASK
    layer_31_imageIMAGE
    layer_31_maskMASK
    layer_32_imageIMAGE
    layer_32_maskMASK