The Lab
ToolBy Greg Przezdziecki·

GPC Photoshop: ComfyUI Inside Photoshop

  • Photoshop
  • ComfyUI
  • AI
  • Free download
Share
View on GitHub

For my image work, I'd been juggling three tools: Photoshop, Krita and Magnific. Krita was my Photoshop-esque bridge to ComfyUI, Magnific was my bridge to the paid models, and everything always had to end up back in Photoshop. Those round trips were annoying, and having Krita open alongside everything else was eating precious VRAM while I worked.

I wanted fewer tools open, so I built a Photoshop panel that does the round trip for me. Select an area, write what you want, click the button. The panel sends the selection and its surroundings to ComfyUI, runs a workflow, and places the result back over the selection, lined up, blended in, at full resolution. Edit locally with Flux 2 Klein, or with Google's Nano Banana through a Magnific API key, all without leaving Photoshop.

The best part: it works in older Photoshops too (2022 or newer), with no Creative Cloud app or Adobe sign-in needed. It's free and open source, and the code is on GitHub.

The house by day, and the same house at night from Nano Banana 2.1
One prompt in the Magnific tab: “Turn this into a night photograph: deep blue sky after dusk, warm light glowing from every window, the porch light on…”

What it does#

TabForBundled template
EditChanging what's inside a selection with an instruction, optionally with reference imagesFlux 2 Klein 4B
RefineImg2img: repainting a selection or the whole image while keeping its shapesSDXL (Juggernaut XL) with a tile ControlNet to help avoid hallucination, tiled automatically for bigger selections
UpscaleMaking the whole image, or part of it, 2–4× larger with new detailZ-Image Turbo, running a custom UltimateSDUpscale-style tiled upscale
MagnificEditing with Nano Banana 2.1, Pro or Pro Flash (paid, online, with your own Magnific API key)No local model needed
  • Results show up as thumbnails, and the first one previews in the document right away. Keep the ones you like as layers, discard the rest.
  • Results land exactly over the area they were made for, as layers or smart objects, with soft edges.
  • Any ComfyUI workflow can become a panel template by adding a few small marker nodes. No code needed.
  • It's a classic CEP panel, which is why it runs in Photoshop 2022 and newer without a Creative Cloud app or sign-in.
Edit tab: prompt, reference slots and strength
Edit
Refine tab: prompt, negative, strength and tile ControlNet
Refine
Upscale tab
Upscale
Magnific tab with three results
Magnific
A tour of the panel: the four tabs, the Advanced settings, and a Magnific run with three results
A quick tour: a prompt in each tab, every Refine setting under Advanced, and a Magnific run whose three results arrive as thumbnails.

Examples#

Before and after a Flux 2 Klein edit
Edit with Flux 2 Klein: "make the garage doors white".
Soft trees before and after an SDXL refine: the leaves come out
Refine with SDXL (strength 0.75, ControlNet strength 0.6): soft, smeared trees get real leaves (detail). Best for smallish images and selections; things get weird past 2048×2048.
A detail of the original next to the Z-Image 2× upscale: stone, window frame and shrubs come out sharp
Upscale 2× with Z-Image Turbo, the same small area before and after. Similar to Refine, but it can push images to much larger resolutions.

Quick start#

You need Photoshop 2022 (v23) or newer on Windows or macOS, and a working ComfyUI.

  1. Install the node pack into ComfyUI and restart it:
    cd ComfyUI/custom_nodes
    git clone https://github.com/gprzzzz/ComfyUI_GPC_Photoshop.git
  2. Close Photoshop and run the panel installer from the photoshop folder: install_windows.bat or install_mac.sh.
  3. Start Photoshop and open Window › Extensions (legacy) › GPC ComfyUI. The dot at the top right turns green when the panel reaches ComfyUI.
  4. Get the models for the templates you want to use. The panel tells you what's missing.

A few tips#

  • For Edit and Magnific, describe the change: "make the garage doors white". For Refine, describe the whole picture: "a photograph of a house surrounded by trees".
  • Refine strength: 0.3 polishes, 0.6 reworks, 1 starts over. Keep the tile ControlNet on above ~0.5 or SDXL will redraw the scene freely.
  • For soft vegetation, try Refine at strength 0.75 with ControlNet strength at 0.6: the shapes stay, and SDXL is free to draw new leaves.
  • Reference images can be named right in the prompt: Add flowers like the ones in <Reference 1> by the front steps
  • Ctrl+Enter in the prompt runs it. Lock the seed to repeat a result while you tweak something else.

The full install, usage and template guides (models per template, making your own templates, troubleshooting) live in the GitHub repo. If you try it on a project, I'd love to see what you make with it.

GPL-3.0. The bundled workflows follow the graphs of Krita AI Diffusion, rebuilt for Photoshop. Not affiliated with Adobe, Magnific, Google or Black Forest Labs.