PS Images
Photoshop hands ComfyUI a picture — and its selection
- RGB
- ALPHA
- MASK
- width
- height
This is the front door of the pack. ComfyUI PS Bridge Nodes is the ComfyUI half of Vplugins, a local Photoshop↔ComfyUI bridge: you work in Photoshop, hit run, and a graph on your own machine does the generating and hands pixels back. PS Images is the node on the receiving end. No cloud, no API key - it's a socket contract between Photoshop and the machine you already own.
The reason it exists is small but real: a normal LoadImage gives you one IMAGE. This gives you the picture and the Photoshop selection as separate things. If you've ever wanted the lasso you drew in Photoshop to arrive in ComfyUI as a mask, this is where that happens. If you don't own Photoshop, it still works - the + button on the node loads a local file, so you can build and test the whole graph before you ever wire up the bridge.
How it works
You place one PS Images node per image slot, and the slot is picked with the Image Name widget: main plus IMG2–IMG6 for reference images (internally ref1–ref5). Up to six nodes per workflow, and no name twice.
On a Photoshop run the controller injects request_id and the node pulls the asset from the frozen run, checking it against the manifest binding first; in local mode it just opens the file on disk. Either way: Pillow loads it, RGB becomes a float 0–1 tensor, transparency becomes ALPHA, and the selection - an 8-bit grayscale image the same size as main - becomes MASK.
Inputs and outputs that matter
Day to day you touch exactly two things: Image Name and, for reference images, Required. The rest are advanced fields the UI or the Bridge fills in: file_name and selection_file are where the upload button writes paths, and request_id is the bridge's identity for the current run - leave all three alone.
- slot (Image Name) - the slot this node is:
mainorIMG2–IMG6. - required - boolean, only meaningful for references;
mainis always required. - file_name, selection_file, request_id - advanced, machine-managed.
Outputs are the whole point:
RGB- IMAGE. This is what feeds your graph.ALPHA- MASK, opacity: 1 is opaque, 0 is transparent.MASK- MASK: the Photoshop selection onmain, all white when there's no selection.width/height- INTs, useful for a resize or a latent-size input.
Three things get misread constantly. ALPHA and MASK are not the same mask and neither is applied for you - MASK doesn't cut your RGB, and ALPHA doesn't become a selection. Only main can carry a real selection; reference slots always output a white MASK. Typical wiring is RGB → your processing chain → Send to PS · RGB, with MASK → an inpaint node and ALPHA → Send to PS · ALPHA if you want transparency preserved.
Install
ComfyUI Manager may have it as ComfyUI PS Bridge Nodes; otherwise clone and install the two Python deps with the same Python that runs ComfyUI:
cd ComfyUI/custom_nodes
git clone https://github.com/AIGCTV/comfyui-ps-bridge-nodes.git
cd comfyui-ps-bridge-nodes
python -m pip install -r requirements.txt
That pulls rfc8785==0.1.4 and jsonschema - no model files, nothing heavy. Restart ComfyUI, then hard-refresh the browser (Ctrl+F5). Nodes appear under Add Node → 🔷PS Vplugins. The pack needs a ComfyUI with the V3 node API (the author verifies against core 0.34.0, Python 3.12), and it wants the classic canvas - Vue Nodes doesn't fully support this node's upload button, preview, or custom layout yet.
Where people get burned
- Upload does nothing. You're probably on Vue Nodes. Switch back to the classic canvas before blaming the node.
- Your file is refused. Local uploads are 8-bit only: static RGB, RGBA, grayscale, grayscale+alpha, palette. 16-bit PNGs are rejected by a header check, and animated files are rejected outright. EXIF orientation is applied for you, so don't pre-rotate.
- "Selection must be 8-bit grayscale matching main dimensions." The selection has to be mode
Land exactlymain's width and height; the error prints both sizes, so read it before resizing anything. - A reference image is missing and the graph quietly stops. Missing optional slots don't error - they block the three tensor outputs and report width/height 0, so everything downstream just never runs. (A missing
main, or a missingfile_namein a local run, does error.) That silent skip is the fanciest trap in the pack. - Duplicate name / too many nodes. Six PS Images max, one per name. Replacing a file with the same name does re-run - the node fingerprints the bytes, not the filename.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| slot | COMBO | main | 6 options: main, ref1, ref2, ref3, ref4, ref5 |
| required | BOOLEAN | true | — |
| file_name | STRING | — | |
| selection_file | STRING | — | |
| request_id | STRING | — |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| RGB | IMAGE | — |
| ALPHA | MASK | — |
| MASK | MASK | — |
| width | INT | — |
| height | INT | — |