Nodes/ComfyUI_StarNodes/⭐ Star PSD Saver 2 (Optimized)
ComfyUI Node

⭐ Star PSD Saver 2 (Optimized)

Ten layers, ten masks, one .psd — without leaving ComfyUI

By Starnodes2024·Created 2 years ago·Updated 2 days ago· 106
⭐ Star PSD Saver 2 (Optimized)
  • layer1
  • mask1
  • layer2
  • mask2
  • layer3
  • mask3
  • layer4
  • mask4
  • layer5
  • mask5
  • layer6
  • mask6
  • layer7
  • mask7
  • layer8
  • mask8
  • layer9
  • mask9
  • layer10
  • mask10
    filename_prefixmultilayer2
    output_dirPSD_Layers

    If your workflow ends in a Photoshop round-trip - compositing, retouching, color grading, delivering a file an editor can actually open - the standard ComfyUI save path is a dead end: it flattens everything into one PNG. Star PSD Saver 2 (Optimized) writes a genuine layered .psd straight from your graph, with up to ten image layers and ten matching masks. You get a file that opens in Photoshop, GIMP or Affinity with every element still on its own layer, exactly the way you'd want to hand it to a human.

    The "(Optimized)" in the name is the pack's promise this is the faster sibling of the original Star PSD Saver (Dynamic) - same layered output, leaner code path. It's part of the StarNodes PSD family that the README flags as one of the pack's headline features, alongside the Advanced Layers variant (grab that one if you need dynamically growing layer slots).

    How it works

    It's an output node: connect up to ten IMAGE tensors as layer1 through layer10, optionally a matching mask1 through mask10 for each, and it composites them into a PSD file with each input as its own layer. Masks become actual layer masks in the file, so you can still toggle, soften or delete them in Photoshop - not baked-in transparency. The node saves to output_dir (default PSD_Layers) under your ComfyUI output folder, named with filename_prefix plus a counter.

    Inputs that matter

    • filename_prefix (default multilayer2) - base name for the file.
    • output_dir (default PSD_Layers) - subfolder inside ComfyUI's output directory.
    • layer1…layer10 - the image layers, bottom-up or top-down depending on how you wire them. Only the ones you connect get included, so a three-layer composite doesn't waste anything.
    • mask1…mask10 - optional layer masks. Connect a mask to any layer and it rides along.

    No outputs - it just writes the file.

    Install

    Ships in the Starnodes2024/ComfyUI_StarNodes pack. The dependency that actually matters here is psd-tools:

    cd ComfyUI/custom_nodes
    git clone https://github.com/Starnodes2024/ComfyUI_StarNodes
    cd ComfyUI_StarNodes
    pip install -r requirements.txt
    

    psd-tools is in that requirements file. Restart and search star on the canvas. If the node doesn't appear, the pack's console message will tell you exactly which package is missing.

    Where people get burned

    Layer order trips everyone once. There's no z-order input - order is whatever order you connect in, so label your layers and wire deliberately, or you'll be re-sorting in Photoshop. Also, all layers get saved as full-canvas images: if your layers are different sizes, expect them to be positioned by their top-left corner rather than auto-centered. And this node doesn't embed ComfyUI workflow metadata in the PSD - if you need that, keep a PNG sibling from the same workflow.

    Category⭐StarNodes/Image And Latent

    Inputs (22)

    NameTypeDefaultDescription
    filename_prefixSTRINGmultilayer2
    output_dirSTRINGPSD_Layers
    layer1optIMAGE
    mask1optMASK
    layer2optIMAGE
    mask2optMASK
    layer3optIMAGE
    mask3optMASK
    layer4optIMAGE
    mask4optMASK
    layer5optIMAGE
    mask5optMASK
    layer6optIMAGE
    mask6optMASK
    layer7optIMAGE
    mask7optMASK
    layer8optIMAGE
    mask8optMASK
    layer9optIMAGE
    mask9optMASK
    layer10optIMAGE
    mask10optMASK

    Outputs (0)

    No outputs