OpenLayer is an open-source Photoshop ComfyUI plugin for local AI layers.
OpenLayer is an open-source Adobe Photoshop UXP plugin that connects Photoshop to a locally running ComfyUI server for text-to-image, image-to-image, sketch-to-image, preview, and importing AI results into the active Photoshop document as editable layers.
v0.6.0-alpha is the current public alpha checkpoint. It is intended for testing the core local workflows and the refreshed compact Photoshop UXP interface, not for production work yet.
New in v0.6.0-alpha:
- Redesigned the Home dashboard into a compact Adobe-style tool launcher with clearer available, experimental, and unavailable states.
- Added sticky tool headers and a determinate ComfyUI progress bar driven by numeric generation progress.
- Added collapsible Advanced settings, status tones, toggle feedback, import success feedback, and compact experimental-info controls.
- Standardized form gutters and panel spacing across tool screens.
- Hardened header spacing, progress geometry, typography, preview zoom, and long textarea behavior for the real Photoshop UXP renderer.
- Enlarged prompt editors and made the Prompt from Layer generated-text field three times taller without unreliable auto-grow behavior.
- Removed obsolete
control_after_generatefields from bundled workflow JSON files.
Included in this alpha:
- Local ComfyUI connection from Photoshop UXP
- Checkpoint loading from ComfyUI
- Compact Adobe-style Home launcher with tool rows for current and planned workflows
- Settings theme selector with
Compact Adobe Darkas the default andClassic v0.4as an optional legacy visual style - Text-to-image generation with the
txt2img-basicpreset - Experimental Flux1-dev fp8 Text to Image preset using the attached checkpoint-style ComfyUI workflow
- Image-to-image generation with the
img2img-basicpreset - Active Photoshop layer capture for Image to Image using Photoshop UXP Imaging API
- Canvas capture option for Image to Image source input
- Experimental Sketch to Image generation with the
sketch2img-linecn-basicLINECN preset - Active Photoshop layer or canvas capture for Sketch to Image source input
- ComfyUI setup validation for required LineArt/ControlNet nodes and models
- Experimental checkpoint mode with SD 1.x, SDXL, SD3, and Flux compatibility warnings
- Source image preview before upload to ComfyUI
- Result preview inside the OpenLayer panel
- Import generated output into the active Photoshop document as a new layer
- Settings persistence for ComfyUI URL, selected checkpoint, and generation defaults
- Passive local ComfyUI active port finder
- GPU-aware model recommendations in Settings using ComfyUI
/system_stats - Beginner-friendly model family guidance for SD 1.x, SDXL, SD3, Flux, and Z_image_Turbo
- Workflow compatibility foundation that separates checkpoint presets from future diffusion-model-stack presets
- Settings workflow health checker for registered presets, required ComfyUI node classes, and required model-stack files
- Readable Settings diagnostics center with grouped workflow health cards, collapsed technical details, summary counts, and Copy Diagnostics support
- Experimental Z_image_Turbo Text to Image and Image to Image presets using a dedicated diffusion-model-stack workflow path
- Global Cancel Generation button path for Text to Image, Image to Image, Sketch to Image, Inpaint, Outpaint, and Prompt from Layer using ComfyUI's local interrupt endpoint
- Prompt from Layer workflow using Florence-2 PromptGen to describe a captured layer or canvas when the local setup is installed
- Experimental Flux Fill Outpaint workflow using
ImagePadForOutpaint - Image to Image
Import Automaticallytoggle for sending generated results straight back into Photoshop - Upscale screen using ComfyUI pixel/model upscale, not generative upscale
upscale-basicworkflow usingLoadImage,UpscaleModelLoader,ImageUpscaleWithModel, andSaveImage- PNG/lossless source capture for Image to Image and Sketch to Image using raw Photoshop Imaging API pixels
- Experimental Inpaint/Repaint Selection screen with safe Photoshop selection detection
- PNG/lossless selected-region capture and temporary-layer grayscale mask export for Inpaint
- Experimental SD 1.x
inpaint-basicworkflow with source image and mask upload to ComfyUI - Friendly Inpaint guardrails when no Photoshop selection exists, mask export fails, or required ComfyUI inpaint nodes are unavailable
- Automated CI and unit test foundation for workflow, settings, model compatibility, and error helpers
- Session history for recent generated previews with prompt, model, workflow preset, seed, dimensions, source mode, tool type, timestamp, and import status where available
- Shared OpenLayer AI layer metadata model for generated/imported results, currently used by session history and prepared for future Photoshop layer persistence
- Best-effort Photoshop layer metadata writer with an explicit unsupported fallback when the host does not expose safe layer metadata persistence
- Reuse Settings action for recent generated-image history entries
- Optional auto-import after generation
- Responsive panel spacing fixes for narrow and wide Photoshop panels
- Official OpenLayer icon and GitHub Pages landing page
The v0.6 dashboard is denser, clearer about tool availability, and designed for narrow Photoshop panels. The accepted UXP layout adds sticky tool headers, determinate generation progress, larger prompt editors, and consistent spacing without changing the local workflow engine.
See the earlier dashboard design
The earlier card-based dashboard established OpenLayer's honest available/experimental/coming-soon model. v0.6 keeps that information architecture while using less space and fitting Photoshop more naturally.
v0.6.0-alpha tester focus:
- Confirm the compact dashboard, sticky tool headers, progress bar, Advanced settings, long prompt entry, and unavailable-tool dimming in Photoshop UXP.
- Confirm Text to Image, Image to Image, Z_image_Turbo, and experimental Flux1-dev fp8 Text to Image generation.
- Confirm Prompt from Layer with the local Florence-2 PromptGen workflow.
- Confirm Upscale with a local pixel/model upscale model such as
4x-UltraSharp.pth. - Confirm Workflow Health, Cancel Generation, session History metadata, and Reuse Settings.
- Test Flux Fill Inpaint and Flux Fill Outpaint as experimental workflows only.
- Confirm inpaint-basic and Flux Fill Inpaint retain the v0.5.5 upload filename and alignment fixes, including Import to Layers.
- Confirm Cancel Generation on both a running prompt and a queued prompt when ComfyUI is busy.
Known v0.6.0-alpha boundaries:
- Image to Image is an early foundation path, not a full production workflow yet.
- Sketch to Image is limited to the first SD 1.x LINECN starter workflow.
- Sketch to Image is currently tested with
epicrealism_naturalSinRC1VAE.safetensorsandcontrol_v11p_sd15_lineart_fp16.safetensors. - Active-layer and canvas capture now encode raw Photoshop Imaging API pixels as PNG/lossless source images.
- Inpaint can detect and capture the selected rectangular region as a PNG/lossless source image.
- Inpaint now attempts a temporary-layer grayscale PNG mask export and can run the experimental SD 1.x
inpaint-basicworkflow when ComfyUI has the required nodes. - Inpainting is available for testing, but output quality and Photoshop alignment are not confirmed stable yet.
- The first Inpaint preset is intended for SD 1.x checkpoints. SDXL, SD3, Flux, and Z_image_Turbo inpainting need dedicated future presets.
img2img-basicis the default SD 1.x/SDXL preset. SD3, SD3.5, and Flux checkpoints remain visible but are marked experimental because they usually need dedicated future workflow presets.- Z_image_Turbo presets are experimental and use
UNETLoader,CLIPLoader, andVAELoaderinstead of the checkpoint loader. txt2img-flux1-dev-fp8is an experimental checkpoint-style Flux Text to Image preset forflux1-dev-fp8.safetensors.- Generic Flux diffusion-model-stack Text to Image and Image to Image presets remain disabled until validated API workflow JSON files are added.
- Cancel Generation uses ComfyUI's interrupt endpoint and stops OpenLayer watchers/polling for active generation tools, but cancellation cannot undo work ComfyUI already completed.
- The Settings workflow health checker reports local readiness, but it does not auto-fix missing models, missing nodes, or workflow mappings.
- Workflow Health now gives beginner-friendly next checks for missing models, missing ComfyUI nodes, missing workflow JSON, setup-required presets, and experimental presets.
- Persistent Photoshop layer metadata is not confirmed safe in this UXP environment yet. OpenLayer keeps structured metadata in session history and prepares a serialized payload for future persistence.
- Copy Diagnostics prepares a setup report for testers. It does not send data anywhere.
- Prompt from Layer requires
comfyui-florence2,comfyui-custom-scripts, andFlorence-2-base-PromptGen-v2.0. - Outpaint is experimental and currently uses
outpaint-flux-fill-basicwithflux1-fill-dev.safetensors,clip_l.safetensors,t5xxl_fp16.safetensorsor the accepted T5 fp8 fallback, andae.safetensors. - Upscale currently uses a simple pixel/model upscale path. It does not use prompts, latent upscale, tiled diffusion, or creative enhancement.
- Upscale needs ComfyUI's
UpscaleModelLoaderandImageUpscaleWithModelnodes plus an installed upscale model such as4x-UltraSharp.pthorRealESRGAN_x4plus.pth. - The v0.6.0 release focuses on the compact UXP interface. Generation and Photoshop integration behavior should remain compatible with v0.5.5.
- Layer, canvas, and mask capture is limited to 16 megapixels (4096 x 4096) until a downscale option is added.
- Live sampler previews require ComfyUI to be started with
--preview-method auto, and the preview panel may flicker between steps until a future UI polish pass. - Classic v0.4 theme preserves the older visual feel, but it does not duplicate every old layout detail.
- SDXL, SD3, Flux, and Z_image_Turbo Sketch to Image workflows need dedicated future presets.
- Workflow node IDs may need adjustment for custom ComfyUI workflows.
- Dedicated selected-layer PNG file export, selection preservation, aligned regional workflows, advanced ControlNet-style workflows, and generative upscaling are not included yet.
- The UI is functional and responsive enough for testing, but final visual polish will continue in later releases.
The static landing page is in:
docs/index.html
For GitHub Pages, publish from the docs folder on the main branch.
OpenLayer includes a beginner-friendly guide for local model choices, VRAM tiers, and why diffusion model stacks such as Z_image_Turbo do not appear in the checkpoint selector:
docs/model-guide.md
The current experimental inpainting status and next debugging checklist are documented in:
docs/inpainting.md
Key technical decisions for the project are tracked in:
docs/technical-decisions.md
Working foundation:
- Photoshop UXP panel scaffold for Photoshop 2024+
- Dark, minimal UXP-friendly TypeScript UI
- Photoshop-dark Home dashboard with Text to Image, Image to Image, Sketch to Image, Inpaint, Prompt from Layer, Settings, History, and future workflow cards
- Experimental Outpaint card and screen for Flux Fill canvas expansion testing
- Configurable local ComfyUI server URL
- ComfyUI connection check
- Checkpoint/model selector loaded from ComfyUI
- Settings page with saved local defaults and diagnostics
- Settings hardware advisor for detecting ComfyUI GPU/VRAM and recommending safe model families
- Session history for recent generated images
txt2img-basicworkflow generation- Experimental
txt2img-z-image-turboworkflow generation img2img-basicworkflow generation foundation- Experimental
img2img-z-image-turboworkflow generation foundation sketch2img-linecn-basicSketch to Image generation foundation- Experimental
prompt-from-layer-florence2text workflow with Task and Num beams controls - Experimental
upscale-basicpixel/model upscale workflow - Active-layer or visible-canvas source capture and ComfyUI image upload
- Experimental Inpaint/Repaint Selection screen with Photoshop selection detection, selected-region PNG source capture, grayscale mask export, and SD 1.x
inpaint-basic - Experimental checkpoint mode for trying non-SD/SDXL model families with clear warnings
/promptsubmission/history/{prompt_id}polling/viewimage retrieval- Result preview in the panel
- Import result into the active Photoshop document as a new layer
Future placeholders are included for regional import alignment and selection preservation.
- Adobe Photoshop 2024 or newer
- Adobe UXP Developer Tool
- Node.js 18+
- A local ComfyUI server for OpenLayer running at
http://127.0.0.1:8190
OpenLayer is local-first. The Photoshop UXP manifest currently requests filesystem and network access because:
- local filesystem access is used for temporary files and Photoshop import tokens
- network access is used to communicate with the user's local ComfyUI server
- Copy Diagnostics prepares a local text report only
OpenLayer does not send diagnostics, images, prompts, or model information anywhere automatically.
npm installBuild the plugin:
npm run buildLoad the generated dist folder in Adobe UXP Developer Tool.
Run local checks:
npm run typecheck
npm testThese checks do not require Photoshop or ComfyUI.
For fast UI iteration outside Photoshop, you can run:
npm run devThe dev server is useful for panel layout work, but the Photoshop-specific APIs only run inside Photoshop through UXP.
npm run packageThis creates a zip package from dist in the packages folder. For the current alpha, the expected package name is:
packages/openlayer-v0.6.0-alpha.zip
- Open Adobe UXP Developer Tool.
- Click
Add Plugin. - Select
dist/manifest.jsonafter runningnpm run build. - Click
Load. - Open Photoshop and find OpenLayer in the Plugins panel.
Start ComfyUI locally using your normal ComfyUI launch command. Confirm the server is reachable:
curl http://127.0.0.1:8190/system_statsIn OpenLayer, keep the default server URL or enter your own:
http://127.0.0.1:8190
OpenLayer uses port 8190 by default so it does not interfere with another plugin that may already be using ComfyUI on port 8188.
If your other plugin is already using ComfyUI on 8188, start a second ComfyUI instance for OpenLayer on 8190, for example:
python main.py --listen 127.0.0.1 --port 8190 --preview-method auto--preview-method auto is optional but recommended: it makes ComfyUI stream live KSampler step previews into the OpenLayer result preview while generating.
Click Check ComfyUI before generating.
- Open a Photoshop document.
- Open the OpenLayer panel.
- Open Settings and click
Find ComfyUI Active PortorCheck ComfyUIto load the available checkpoints. - Optional: click
Detect GPU & Recommend Modelsto see hardware-aware model suggestions. - Choose a checkpoint.
- Enter a prompt.
- Optionally enter a negative prompt.
- Keep the workflow preset set to
txt2img-basic. - Click
Generate. - Wait for the preview.
- Click
Import Result as New Layer, or enableImport Result Automaticallybefore generating.
The imported layer is named like:
OpenLayer_Generated_YYYYMMDD_HHMM
- Open a Photoshop document.
- Select the layer you want to use as the source.
- Open the OpenLayer panel and choose
Image to Image. - Click
Capture Active Layer, or clickCapture Canvasto use the visible document. - Confirm the source preview appears.
- Enter a prompt describing how to reinterpret the source.
- Choose a checkpoint and keep the workflow set to
img2img-basic. - Click
Generate Image to Image. - Wait for the result preview.
- Click
Import to Layers.
The imported layer is named like:
OpenLayer_Img2Img_YYYYMMDD_HHMM
- Install or confirm this SD 1.x checkpoint is available in ComfyUI:
epicrealism_naturalSinRC1VAE.safetensors
- Install or confirm this SD 1.5 LineArt ControlNet model is available in ComfyUI:
control_v11p_sd15_lineart_fp16.safetensors
- Open a Photoshop document with a visible source layer or canvas.
- Open the OpenLayer panel and choose
Sketch to Image. - Click
Capture Active Layer, or clickCapture Canvas. - Confirm the source preview appears.
- Enter a prompt describing the final image.
- Keep the workflow set to
sketch2img-linecn-basic. - Choose
epicrealism_naturalSinRC1VAE.safetensors. - Click
Generate Sketch to Image. - Wait for the result preview.
- Click
Import to Layers.
The imported layer is named like:
OpenLayer_Sketch_YYYYMMDD_HHMM
This alpha includes the first experimental SD 1.x mask-based inpainting path.
- Open a Photoshop document.
- Make a rectangular or freeform selection in Photoshop.
- Open the OpenLayer panel and choose
Inpaint. - Click
Capture Selection. - Confirm the source preview appears and the status shows the selection bounds.
- Confirm the mask preview appears as a black/white PNG mask.
- Enter a prompt and click
Generate Inpaint. - Wait for the result preview.
- Click
Import to Layers.
The first inpaint-basic preset is experimental and intended for SD 1.x inpaint checkpoints first. inpaint-flux-fill-basic is also available as an experimental Flux Fill path when your local ComfyUI exposes the required Flux Fill model stack.
Inpaint output quality, mask interpretation, and Photoshop alignment are still being tested. Use this path for debugging and feedback rather than production work.
Use this quick pass before reporting a v0.6.0-alpha test result:
- Start ComfyUI on
http://127.0.0.1:8190. - Build OpenLayer and load
dist/manifest.jsonin Adobe UXP Developer Tool. - Open Photoshop, create or open a document, and launch OpenLayer.
- Confirm unavailable dashboard tools are visibly dimmer than available and experimental tools.
- Open two tool screens; confirm the Back to Tools control, icon, title, and progress track have clear spacing and remain visible while scrolling.
- Paste a long prompt, confirm it remains editable and scrollable, and confirm the Prompt from Layer generated-text field is substantially taller than other fields.
- Open Settings and click
Check ComfyUI; confirm checkpoints load. - Click
Check Workflow Health; confirm each registered preset shows Ready, Experimental, Missing model, Missing ComfyUI node, Missing workflow JSON, or Setup required. - Confirm Settings shows readable summary counts and collapsed technical details without overlapping cards.
- Click
Copy Diagnostics; confirm the report is copied or appears in the read-only diagnostics box. - Generate one
txt2img-basicimage and import it as a new layer; confirm the determinate progress bar advances cleanly. - Select
txt2img-flux1-dev-fp8withflux1-dev-fp8.safetensorsif available, generate once, and confirm the result preview appears. - Start one Text to Image generation and click
Cancel Generation; confirm the status changes toGeneration cancelled.and the next generation still works. - Open
Image to Image, capture either the active layer or canvas, generate withimg2img-basic, and clickImport to Layers. - Toggle Image to Image
Import Automatically, generate once, and confirm the result imports as a new Photoshop layer. - Open
Upscale, capture either the active layer or canvas, choose4x-UltraSharp.pthor another listed upscale model, generate, and clickImport to Layers. - Open
Sketch to Image, capture either the active layer or canvas, generate withsketch2img-linecn-basic, and clickImport to Layers. - Open
Inpaint, make a Photoshop selection, clickCapture Selection, and confirm the selected-region preview and mask preview appear. - Generate with
inpaint-flux-fill-basicif your Flux Fill stack is installed, then clickImport to Layers; keepinpaint-basicas experimental/debug-only if it does not match the source. - Start and cancel one longer Image to Image, Sketch, Outpaint, Inpaint, Prompt from Layer, or Upscale run if your ComfyUI setup supports it; confirm the next generation still works.
- Open History after a generation; confirm prompt, model, workflow, seed, dimensions, source mode, tool type, timestamp, import status, Preview, Import, and Reuse Settings are visible.
- Resize the panel narrow and wide; confirm Settings, workflow health cards, buttons, preview, and footer remain readable and reachable.
For a step-by-step beginner smoke test, see:
docs/testing-v0.1-alpha.md
The included workflows are realistic starter ComfyUI workflows using common built-in nodes:
src/workflows/api/txt2img-basic.jsonsrc/workflows/api/txt2img-flux1-dev-fp8.jsonsrc/workflows/api/prompt-from-layer-florence2.jsonsrc/workflows/api/img2img-basic.jsonsrc/workflows/api/sketch2img-linecn-basic.jsonsrc/workflows/api/inpaint-basic.jsonsrc/workflows/api/inpaint-flux-fill-basic.json
You may need to replace the checkpoint name and node IDs for your own ComfyUI setup.
OpenLayer now keeps workflow files in two folders:
src/workflows/api/for runnable API workflows submitted to ComfyUIsrc/workflows/source/for GUI-editable ComfyUI source workflows
See docs/workflow-files.md, docs/custom-workflows.md, and docs/comfyui-object-info-audit-v0.2.2.md for the workflow file structure, custom workflow mapping requirements, and the local node schema audit used by the workflow compatibility foundation.
The workflow builder injects:
- prompt
- negative prompt
- width
- height
- seed
- steps
- cfg
Image to Image and Sketch to Image use Photoshop's UXP Imaging API to capture the active layer or canvas, encode the raw pixels as PNG, then send the source image to ComfyUI using /upload/image. JPEG source capture has been removed from this path so clean edges, masks, transparency, and linework are not degraded by lossy compression.
Inpaint uses the same PNG/lossless Imaging API path, clipped to a padded context around the active Photoshop selection when Photoshop exposes selection bounds. In v0.4.1-alpha, OpenLayer also creates a temporary white-filled selection layer, captures it as a grayscale PNG mask, deletes the temporary layer, and uploads both source and mask to ComfyUI.
The first inpaint-basic preset requires ComfyUI's standard LoadImage, ImageToMask, InpaintModelConditioning, KSampler, VAEDecode, ImageCompositeMasked, and SaveImage nodes. It is currently aimed at SD 1.x inpaint checkpoints.
The experimental inpaint-flux-fill-basic preset requires:
flux1-fill-dev.safetensorsthroughUNETLoaderfrommodels/diffusion_modelsclip_l.safetensorsthroughDualCLIPLoader.clip_name1frommodels/text_encoderst5xxl_fp16.safetensorsthroughDualCLIPLoader.clip_name2frommodels/text_encoderst5xxl_fp8_e4m3fn.safetensorsas an accepted T5 fallback when the fp16 file is not installedae.safetensorsthroughVAELoaderfrommodels/vaeDifferentialDiffusion,FluxGuidance,ConditioningZeroOut,InpaintModelConditioning,KSampler,VAEDecode, andSaveImage
Flux Fill follows the reference-style graph in src/workflows/source/inpaint-flux-fill-basic.workflow.json. That graph expects one LoadImage node whose alpha channel becomes the mask. OpenLayer preserves the Photoshop source PNG and embeds the white repaint mask into the uploaded PNG alpha channel before submission. Inpaint import currently uses aligned context import only. The earlier transparent outside-mask PNG experiment is disabled because Photoshop UXP canvas/blob compositing is not trusted yet. Output quality, mask polarity, and alignment are not confirmed stable yet, and Photoshop-native layer mask import remains planned future work.
For debugging, OpenLayer records source, mask, raw result dimensions, import mode, and temporary local debug copies of the source PNG, mask PNG, and raw generated PNG after an Inpaint run.
img2img-basic is intended for SD 1.x and SDXL-style checkpoints. SD3, SD3.5, and Flux checkpoints are shown in the selector for transparency, but OpenLayer warns before running them because those model families often need different loader, text encoder, and VAE nodes.
Sketch to Image uses the same Photoshop capture and ComfyUI upload path, then runs sketch2img-linecn-basic. This preset requires:
epicrealism_naturalSinRC1VAE.safetensorscontrol_v11p_sd15_lineart_fp16.safetensorsLineArtPreprocessorControlNetLoaderControlNetApplyAdvanced
The first LINECN preset is intentionally narrow. It is a working SD 1.x foundation, not a universal sketch workflow for SDXL, SD3, Flux, or Z_image_Turbo.
If you export a different workflow from ComfyUI, update the node IDs in src/comfy/presetRegistry.ts.
Make sure GitHub Pages is configured to publish from:
main / docs
The landing page entry file is docs/index.html.
Run npm run build, then load:
dist/manifest.json
in Adobe UXP Developer Tool. After loading, open Photoshop and use the Plugins menu to open OpenLayer.
Confirm ComfyUI is running on:
http://127.0.0.1:8190
You can test it in a browser or terminal:
curl http://127.0.0.1:8190/system_statsIf another local tool is already using 8188, keep OpenLayer on 8190 and start a separate ComfyUI instance for OpenLayer.
Click Check ComfyUI after ComfyUI is fully started. If it is still empty, confirm your models are installed in ComfyUI and that the server URL in OpenLayer matches the running ComfyUI port.
Check that the selected checkpoint exists in ComfyUI and that the selected workflow node IDs still match the starter workflow. Custom workflows currently require manual mapping in:
src/comfy/presetRegistry.ts
See docs/custom-workflows.md for the current custom workflow process.
Use an SD 1.x or SDXL checkpoint with img2img-basic first. If you select SD3, SD3.5, Flux, or another newer model family, OpenLayer will keep it visible but warn that it is experimental for this preset. Those checkpoints usually need a dedicated workflow preset before they can run reliably.
Open a Photoshop document before importing. OpenLayer imports into the active document and will show an error if no document is open.
.
|-- docs/
|-- scripts/
|-- src/
| |-- comfy/
| |-- photoshop/
| |-- ui/
| |-- utils/
| |-- workflows/
| |-- index.html
| |-- main.ts
| |-- manifest.json
| `-- styles.css
|-- package.json
|-- tsconfig.json
`-- vite.config.ts
MIT
OpenLayer™ — the OpenLayer name and logo may not be used by derivative works without permission.


