Nodes/ComfyUI_Zwng_Nodes/Simple Photoshop Connector
ComfyUI Node

Simple Photoshop Connector

Pull your active Photoshop window and selection into ComfyUI

By za-wa-n-go·Created 2 years ago·Updated about a year ago· 7
Simple Photoshop Connector
    • Active Window
    • Selection to Mask
    password12341234
    Server127.0.0.1

    Photoshop has a remote-connection feature most users never touch: flip it on and any client that knows the password can talk to your open document over the network. ZwngSimplePhotoshopConnector is that client, wired into ComfyUI. Instead of exporting a PNG, dragging it into ComfyUI, drawing a mask by hand, and repeating that every time you tweak something in Photoshop, this node reaches into your live session and grabs what's already there: the active window as an image, and your current selection as a mask.

    How it works

    On the Photoshop side, you enable this under Edit > Preferences > Plugins, where there's a toggle for remote connections and a password field. Set a password there, put the matching password into this node, and the two can talk. The node then does two things on demand: it captures whatever document window is currently active as an IMAGE, and it converts whatever selection you have drawn (the marching-ants marquee, a lasso, whatever) into a MASK.

    That live selection-to-mask conversion is the actual point. Draw a rough lasso around the region you want to work on in Photoshop, queue the ComfyUI prompt, and the mask is already there, matched to the image, with no manual painting step in between.

    The inputs and outputs that matter

    Two inputs: password (default 12341234, a value you should change the moment you enable this on a machine that's reachable by anyone else) and Server, defaulting to 127.0.0.1 for the common case where ComfyUI and Photoshop are running on the same machine. If they're on separate machines on your network, swap that for Photoshop's actual LAN IP.

    Outputs are Active Window (an IMAGE) and Selection to Mask (a MASK). Wire the image into whatever you're about to process, and the mask straight into an inpainting or detailer chain.

    Worth knowing going in: this needs a live network path to a running Photoshop instance. That's trivial on a local install where both apps sit on the same desktop. It doesn't translate to a workflow running on a remote or cloud GPU worker, since that machine has no route to your desktop's LAN unless you go out of your way to expose it. Treat this as a local-install tool.

    How to install it

    Via ComfyUI Manager: search "ComfyUI_Zwng_Nodes" or "Zwng", install, restart. Or manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/za-wa-n-go/ComfyUI_Zwng_Nodes
    

    then restart. The Python side has no heavy dependencies to speak of; the real setup step happens inside Photoshop itself, turning on remote connections and setting the password.

    One thing worth going in with eyes open: if you're already the type to bridge a live editor into ComfyUI, most of that crowd reaches for the Krita plugin instead of Photoshop, mainly because it's free end to end and the feature set runs deeper. If you're already living in Photoshop and don't want to install a second art program just to test a workflow, this is the lighter-weight option, just don't expect the same polish.

    Common issues & troubleshooting

    Nothing connects. Double-check remote connections are actually toggled on in Photoshop's Preferences > Plugins, and that Photoshop has a document open and active. There's no "active window" to grab if nothing's open.

    Password rejected. It has to match exactly on both sides. Retype it in both places rather than assuming a copy-paste from memory got it right.

    Wrong Server value. If Photoshop and ComfyUI aren't on the same box, 127.0.0.1 will never connect; use the Photoshop machine's actual network IP, and make sure nothing on that machine is firewalling the connection.

    Mask comes back empty or covers the whole canvas. Make sure you've actually drawn a selection in Photoshop before queueing the prompt. No active selection means there's nothing meaningful to convert.

    CategoryZWNG

    Inputs (2)

    NameTypeDefaultDescription
    passwordSTRING12341234
    ServerSTRING127.0.0.1

    Outputs (2)

    NameTypeDescription
    Active WindowIMAGE
    Selection to MaskMASK