SDPPP Get Selection
Your Photoshop selection, as a mask you can wire into anything
- document
- bound
- mask
Every mask-based workflow starts with a mask, and this node is the laziest way to get one that actually means something: whatever marquee selection you have active in Photoshop - lasso, magic wand, saved selection, whatever - arrives in ComfyUI as a MASK. Draw a shape in your image editor, run the workflow, and that shape drives an inpaint region or a regional prompt without you ever touching a mask editor in ComfyUI.
How it works
You give it a DOCUMENT handle (from SDPPP Get Document) so it knows which open file you mean. On run it calls the plugin's getSelection action over the Socket.IO bridge; Photoshop renders the active selection to a grayscale buffer and sends it back, and the node turns it into a normalized MASK tensor - 1.0 inside the selection, 0.0 outside, feathered edges preserved.
Inputs and outputs
- document - a
DOCUMENThandle. This is required, so wire aSDPPP Get Documentnode in front of it. - bound (optional) - a
MASKthat crops the region you actually want, if you don't need the whole canvas.
The single output, mask, is a MASK at document resolution. From there it can go anywhere masks go: into CLIP Text Encode PS Regional as a regional prompt region, into an inpaint pipeline (masked denoise), or into a compositing step.
Why this is the good version of the idea
Most mask workflows make you paint the mask blind in ComfyUI. This one lets you use the selection tool you already know - which for anything feathered, multi-part, or lasso-drawn is a much better editor than clicking pixels in a tiny preview. It also updates live: change the selection in Photoshop, re-run, and the mask reflects it. The mask comes back at full document resolution too, so it lines up exactly with layer images pulled by the other Get nodes.
Install and gotchas
Install via ComfyUI Manager (search sd-ppp / Photoshop) or git clone https://github.com/zombieyang/sd-ppp into ComfyUI/custom_nodes, then restart; python-socketio and jsonpatch auto-install on first import. The Photoshop plugin is a .ccx from sdppp.zombee.tech - double-click to install with Creative Cloud, or rename to .zip and extract into the Photoshop Plug-ins folder.
Standard pack trap: plugin and node pack must be on the same version or Photoshop won't connect ("version mismatch, please reinstall PS plugin"). And the obvious one: there has to actually be a selection - if the output mask is all black, you have marching ants somewhere other than the document you picked, or none at all. Also remember this grabs the selection as a bounding shape with feathering, not the content of the selection; if you want the pixels inside the selection, use Get Image From Photoshop Layer with the layer instead.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| document | DOCUMENT | — | |
| boundopt | MASK | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| mask | MASK | — |