Nodes/ComfyUI_Promptfix/🎨 PromptFix Input (From Photoshop)
ComfyUI Node

🎨 PromptFix Input (From Photoshop)

Your Photoshop canvas, live in ComfyUI

By shaaraaΒ·Created 5 months agoΒ·Updated 5 months agoΒ· 0
🎨 PromptFix Input (From Photoshop)
    • Canvas
    • Mask
    • Width
    • Height

    The pitch is simple and genuinely nice: Photoshop stays your canvas, ComfyUI does the generating, and this node is the front door between them. You make a selection in Photoshop, hit a button in the plugin, and suddenly the canvas and that exact selection show up here in your graph - ready to feed an inpaint or image-edit workflow. It's the "from" half of the two-node PromptFix bridge, and it's the reason you'd bother installing the pack at all.

    One honest caveat before you get excited: the ComfyUI side is free, but the Photoshop side is a paid product - the NanoBanana Seedream AI Plugin on Gumroad. Without it installed and active, this node doesn't error out in a helpful way; it just quietly hands you black 256Γ—256 placeholders. This is a companion to a commercial plugin, not a standalone tool, and the README says so in bold. Worth knowing before you go wiring up your whole workflow around it.

    How it works

    The pack runs a tiny WebSocket server inside ComfyUI (registered on /promptfix/ws). Your Photoshop plugin pushes base64-encoded canvas and selection data over that socket; the backend decodes it and drops two files into custom_nodes/ComfyUI_Promptfix/data/ps_inputs/ - PS_canvas.png and PS_mask.png.

    Then it's a polling game. This node takes no inputs at all, so how does it know when to run? The classic always-rerun trick: its IS_CHANGED method MD5-hashes both PNGs and returns float("NaN") whenever either hash changes. Since NaN != NaN even against itself, ComfyUI's cache comparison always says "changed" and re-executes the node (and everything downstream of it) every time Photoshop sends new data. It's the same mechanism every file-watching and random-picker node uses, and the same one that makes a stuck node feel like your graph is haunted - here it's doing exactly the job it was built for. There's even a 2.5-second retry loop (five half-second sleeps) to avoid racing the backend while it's still writing the file.

    The outputs that matter

    It has no inputs; the whole point is the four wires it pushes out:

    • Canvas (IMAGE) - your Photoshop canvas as RGB, normalized to 0–1. This is the thing you feed a VAE Encode for img2img, or straight into an image-editing model.
    • Mask (MASK) - your selection, converted to grayscale. Photoshop hands it over as a black/white color image, so the node drops the alpha channel, converts to luminance, pastes over black if it's transparent, and floors anything at or below 1/255 to exactly 0 so "almost black" counts as fully masked. Grey in your selection comes through as a soft mask.
    • Width and Height (INT) - the original canvas dimensions, handy when you want your output to line up pixel-perfect with the source.

    A typical graph: Canvas and Mask into a masked img2img or an inpainting chain, Width/Height into whatever geometry math your workflow needs. The README's own suggestions are edit models like Qwen Image Edit 2509/2511 or Flux Klein/Kontext - the Qwen Edit line is very much the open editing standard these days, so that's a solid default pairing.

    Installing it

    No model downloads, no heavy dependencies. The pack only uses aiohttp, PIL, torch, and numpy - all already in ComfyUI. ComfyUI Manager search "Promptfix" works, or do it by hand:

    cd ComfyUI/custom_nodes
    git clone https://github.com/shaaraa/ComfyUI_Promptfix.git
    

    Then restart ComfyUI. That's the entire install story for the ComfyUI side.

    Gotchas

    • Black 256Γ—256 output means the plugin isn't connected or sent nothing - check the console for [PromptFix] Could not load ... and make sure the plugin is active in Photoshop.
    • Auto-queue needs the browser tab open. File transfer is server-side and works headless, but the "trigger Queue Prompt from Photoshop" feature rides the JavaScript extension, which runs in your ComfyUI browser tab. Closed tab, no auto-queue.
    • This is a brand-new, tiny pack (first commit April 2026, essentially zero community chatter anywhere). Expect rough edges and no crowd of StackOverflow answers. The source is small and readable if you're curious how a given edge case behaves.
    CategoryPromptFix

    Inputs (0)

    No inputs

    Outputs (4)

    NameTypeDescription
    CanvasIMAGEβ€”
    MaskMASKβ€”
    WidthINTβ€”
    HeightINTβ€”