ComfyUI Node

Load PS

Load Photoshop PSD layers straight into your graph — one layer, all layers, or the flattened doc

By 1hew·Created about a year ago·Updated 7 days ago· 33
Load PS
    • image
    • mask
    • filename
    • layer_name
    file
    index0
    include_hiddenfalse
    group_modelayer
    output_modeall_layers
    previewfalse

    Photoshop files are the lingua franca of serious compositing work, and ComfyUI has never handled them well out of the box. Load a PSD in stock ComfyUI and you get... nothing, because the loader expects PNG/JPG. If you're compositing in Photoshop and generating in ComfyUI (or the reverse - prepping multi-layer assets in PS, then feeding them into an edit pipeline), a PSD loader is the missing bridge. This node is that bridge, and it's unusually thoughtful about layers.

    Added in the pack's v3.15.0 release, it loads .psd and .psb (the big Photoshop format) files, handles layer visibility, groups, and lets you choose exactly how much of the document you want out. It also ships with drag-and-drop upload support and an optional in-node preview.

    How it works

    Under the hood it uses psd-tools (a pure-Python PSD parser), which is the pack's real dependency for this node - it's in requirements.txt, and if it's missing the node throws a clear "install psd-tools" error rather than dying silently. There's also a monkey-patch for a known psd-tools quirk where some PSDs have zero-byte padding between metadata blocks that would otherwise crash the parse - so files that break other loaders often work here.

    The relevant inputs:

    • file - the PSD path, resolved relative to ComfyUI's input directory (that's how drag-and-drop lands it in the right place).
    • output_mode - the big one: single_layer (one layer, chosen by index), all_layers (every visible layer as a batch), or merged (the flattened document).
    • group_mode - layer (recursively expand groups into their member layers) or merged (treat each group as one composited layer).
    • include_hidden - off by default; flip it to pull in hidden layers too.
    • index - which layer to grab in single_layer mode.
    • preview - show a preview thumbnail on the node.

    Outputs: image (the layer or batch), mask (per-layer alpha, useful for compositing), filename, and layer_name - a list of the layer names, so you can see what you're actually loading. Layer order is reversed to match Photoshop's layer panel (top layer first), which is the direction everyone's muscle memory expects.

    Where it earns its keep

    The killer workflow: keep your masking/compositing in Photoshop where it's good at it, export the PSD, and load all_layers in ComfyUI to drive per-layer inpainting or relighting. Or load a single isolated layer as an RGBA asset with its alpha already extracted as a mask - that feeds straight into the compositing and background-removal side of things.

    Installing it

    Part of 1hewNodes. ComfyUI Manager → search "ComfyUI 1hewNodes" → install → restart, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/1hew/ComfyUI-1hewNodes
    

    Restart ComfyUI. Make sure psd-tools got installed (Manager handles it; by hand it's python -m pip install psd-tools). No model downloads.

    Common issues

    If the node returns an empty output, the file likely isn't resolving to the input directory - put the PSD somewhere ComfyUI can see (or drag-and-drop it in). Very large PSBs with hundreds of layers will be slow; that's psd-tools parsing, not the node. And merged mode ignores index entirely - if you're flipping through layers and nothing changes, you're in the wrong output mode. It's the only mode that ignores index, and it's the most common source of "why is this the same image."

    Category1hewNodes/io

    Inputs (6)

    NameTypeDefaultDescription
    fileSTRING
    indexINT0-8192–8192
    include_hiddenBOOLEANfalse
    group_modeCOMBOlayer2 options: layer, merged
    output_modeCOMBOall_layers3 options: single_layer, all_layers, merged
    previewBOOLEANfalse

    Outputs (4)

    NameTypeDescription
    imageIMAGE
    maskMASK
    filenameSTRING
    layer_nameSTRING