Local ComfyUI to Photoshop Bridge (Flux Kontext + Qwen + Qwen Edit + Upscaler)
Local ComfyUI to Photoshop Bridge
(Flux Kontext + Qwen + Qwen Edit + Upscaler)
Prepared by : Brice Pannetier / Atelier Designa
Date : 06/11/2025
Version : V2_Public
Overview
Photoshop ⇄ ComfyUI bridge for local Flux Kontext (Local) , Qwen Edit (Local), Qwen Inpainting (Local) or Upscaler (Local) workflows. This guide covers requirements, installation, first run, paths configuration, and troubleshooting. Screenshot placeholders are provided so you can paste your own images.
What’s Included
• Photoshop script: Local_ComfyUI-Kontext-Qwen.jsx
• ComfyUI workflows: Flux Kontext (Local) , Qwen Edit (Local), Qwen Inpainting (Local) or Upscaler (Local)
• LICENSE.txt (no‑resale EULA)
• This guide (DOCX)
Requirements
• Adobe Photoshop (current CC recommended; JSX scripting enabled).
• Windows Only
• ComfyUI running locally at http://127.0.0.1:8188 (default).
• Hardware capable of running your chosen models (GPU recommended; e.g., NVIDIA RTX 4070 or newer _ 8GB VRAM min, 12GB recommanded).
• All ComfyUI workflow JSON for Flux Kontext (Local) , Qwen Edit (Local), Qwen Inpainting (Local) or Upscaler (Local). (Included in the product)
• All models referenced in your workflow are downloaded and available in ComfyUI. (Free download)
Tip: Keep your ComfyUI output root handy (e.g., …/ComfyUI/output).
Install the Script
Unzip and Copy the JSX file into Photoshop’s Scripts folder:
• Windows: C:\Program Files\Adobe\Adobe Photoshop [version]\Presets\Scripts\
• Restart Photoshop
• Save the rest of the unzipped file in your preferred location (record this location as we will need it later to edit the Photoshop script file)
Prepare ComfyUI (before using the Photoshop script)
• Install a local/portable build of ComfyUI. (You can have more versions install on a single computer)
o Link : https://github.com/Tavris1/ComfyUI-Easy-Install
o Tutorial : https://www.youtube.com/watch?v=ycPunGiYtOk&t=329s
• Launch ComfyUI and open all of the included JSON workflows one by one.
• Download any required model files and place them in the correct ComfyUI folders, as referenced by the workflow.
• Ensure the workflow works in ComfyUI first
• As soon as the workflow have been updated to the local location save them.
• To save do “export API” and overwrite them in the the workflow folder.
• Leave ComfyUI running and open. The Photoshop script requires ComfyUI to be active before you click Generate.
Prepare the photoshop script
• Open the photoshop script (.jsx file) using “Visual Studio Code”
• Under “Workflows” Update the location where you saved the workflows
• Update Output_DIR : To where your comfyUI is saving outputs
• Go to that output folder from ComfyUI and create a folder called “Photoshop”
• Pick the location of the debug Dir to the desired location.
First Run (Quick Start)
• Open an image in Photoshop and make a selection where you want the result to appear.
• File ▸ Scripts ▸ Local_ComfyUI-Kontext-Qwen.
• Choose a Pipeline Flux Kontext (Local) , Qwen Edit (Local), Qwen Inpainting (Local) or Upscaler (Local)
• Enter your prompt and optionally check “Output to new document.”
• Prompts cleaned to be UTF-8-safe and ComfyUI-compatible — meaning:
- no forbidden symbols (
-,.,_) - only plain letters, numbers, and spaces
- no smart quotes or typographic symbols
- consistent capitalization (CamelCase or Title Case)
- Ex : "Transform this image into a contemporary timber and glass residence keeping the same composition but simplifying geometry and adding warm dusk lighting"
• Click Generate.
Behind the scenes, the script uploads your selection to ComfyUI, patches the workflow JSON, posts to /prompt, polls /history, fetches via /view (or from disk), and places the result back into Photoshop.
Common messages and fixes
• “Upload to ComfyUI failed.” – Ensure ComfyUI is running at http://127.0.0.1:8188; check firewalls/antivirus.
• “No output image (timeout or error).” – Increase MAX_POLL_SECONDS; verify the workflow produces output.
• “Failed to fetch output image from ComfyUI or disk.” – OUTPUT_DIR must point to the output root; ensure subfolder matches DEFAULT_SUBFOLDER or rely on /history.
• Nothing happens in the canvas – ensure an active selection exists before running.
• Windows‑only: If curl.exe is missing (rare), install or place it in C:\Windows\System32.
• Debug files (_last_payload.json, lasthistory.json, etc.) are written to DEBUG_DIR.
License Summary
• You may use Outputs commercially.
• You may not resell, redistribute, or share the script/code in whole or in part.
• See LICENSE.txt for the full EULA.
Credits
Built by Brice Pannetier / Atelier Designa. ComfyUI, Flux Kontext, and Qwen are trademarks of their respective owners.
Notes
Prompts must be encoded in UTF-8 (avoid unusual or unsupported characters).
Minimize switching between Flux Kontext and Qwen Edit, since each model has to load and unload, which slows down performance.
You’ll get a Photoshop ⇄ ComfyUI bridge that runs 100% locally with Flux Kontext + Qwen workflows.