ComfyUI Node

Load PSD

Start a workflow from an actual layered PSD — not a flat PNG

By ericpaulsnowden·Created 2 months ago·Updated 3 days ago· 1
Load PSD
    • IMAGE
    • MASK
    • LAYERS
    psd
    edit_originalfalse
    on_saveRe-run workflow
    flatten_groupsfalse

    ComfyUI's built-in LoadImage can't read a PSD, and until recently nobody was too bothered - you'd just flatten and export. But once you've got a 40-layer document from a designer, flattening before you even start is throwing away the one thing that makes the file useful. Load PSD is the front door for the layered half of the Photoshop Bridge pack: it pulls a .psd, .psb, .tif, or .tiff straight out of ComfyUI's input folder, gives you a flattened IMAGE + MASK to run your generation on, and hands you the file's actual layer stack as a LAYERS output you can rearrange, process, or write back out as a real layered PSD.

    What you get

    • IMAGE - the flattened file (via the PSD's embedded Maximize-Compatibility composite, falling back to psd-tools' own recompositing).
    • MASK - transparency as 1 - alpha, all zeros if there's none.
    • LAYERS - the real stack: every layer's pixels, name, position, opacity, blend mode, and visibility. This is ComfyUI 0.31+'s first-class LAYERS type, so it plugs straight into core's Create Layered Image node (the full-screen layer editor) or into this pack's own Compose Layers to PSD to write a layered document back out. On pre-0.31 ComfyUI it's still just a socket type, so Load PSD → Compose round-trips with nothing else installed.

    A few honest notes on the layer output: text and smart-object layers arrive rasterized, adjustment layers are skipped (both logged), and ComfyUI composites blends in linear space while Photoshop uses sRGB - so arrangement carries over exactly, but partial-opacity and non-normal-blend pixels render close to, not identical to, Photoshop. The written PSD in Photoshop is always the authoritative render. And 16-bit/CMYK/Grayscale/Lab files get converted to RGB8 on the way in.

    The widgets that matter

    • psd - a dropdown of every accepted file in the input folder. TIFF loads fine; .ai and camera raw deliberately don't (they route through Photoshop itself).
    • edit_original - off by default, edits save to a safe copy and your original is never touched. Turn it on and right-click Edit Original in Photoshop to save back into the very file you loaded.
    • on_save - what a save does: Re-run workflow (default), Update only (don't re-run) (picks up the edit without firing the graph), or Ignore - useful when you want to open the PSD, shuffle layers, and push one back without the graph re-running on every save. It's enforced server-side, so it governs the plugin's Send button too.
    • flatten_groups - off lists every layer individually (group opacity/visibility applied to its members); on collapses each top-level group into one layer.

    Install

    Same as every node in this pack - Manager → Install via Git URL, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/ericpaulsnowden/comfyui-photoshop-bridge.git comfyui-photoshop-bridge
    pip install -r comfyui-photoshop-bridge/requirements.txt
    

    …with ComfyUI's own Python, then restart. The plugin is optional for loading - that's all server-side. Round-tripping an edit back uses Tier 1 (file watch) without it, instant + cross-machine with it. Pre-1.0 and actively developed, so expect the odd breaking change; the author ships annotated example workflows including a load-psd-start-a-workflow.json and a layered round-trip you can load straight into ComfyUI.

    CategoryPhotoshop Bridge/Handoffs

    Inputs (4)

    NameTypeDefaultDescription
    psdCOMBOThe .psd, .psb, .tif, or .tiff file to load, from ComfyUI's input folder.
    edit_originalBOOLEANfalseWhen on, an edit saves back to your own original file in place instead of a separate managed copy. When off (default), edits are saved to a safe copy and your original file is never touched.
    on_saveCOMBORe-run workflowWhat a save in Photoshop should do. 'Re-run workflow' re-runs the graph automatically so the edit reaches the outputs. 'Update only (don't re-run)' picks up the edit (gallery and badges update) but leaves the workflow alone until you queue it yourself. 'Ignore (do nothing)' skips the save entirely, as if this node weren't watching it.
    flatten_groupsBOOLEANfalseHow the layers output treats layer groups. Off (default): every layer appears individually in one flat list, with group opacity and visibility applied to its layers. On: each top-level group is flattened into a single layer. Does not affect the image output.

    Outputs (3)

    NameTypeDescription
    IMAGEIMAGEThe flattened image, or the latest edit if one has been saved back.
    MASKMASKMarks any transparent area of the image (1.0 = transparent, 0.0 = opaque). All zero when the image has no transparency.
    LAYERSLAYERSThe file's actual layers as a ComfyUI layer stack (LAYERS): every layer's pixels, name, position, opacity, blend mode, and visibility. Connect it to ComfyUI's Create Layered Image node (ComfyUI 0.31+) to rearrange layers in its editor, or to this pack's Compose node to write a layered PSD. Always reflects the file on disk -- text and smart-object layers arrive rasterized, and adjustment layers are skipped. Blending in ComfyUI's compositor looks close to, but not identical to, Photoshop.