Website: apix.sdvn.vn
English: UXP panel for Adobe Photoshop that runs ComfyUI and RunningHub workflows from the active document. Select a template, fill parameters, send images from Photoshop, run the workflow, and import results as new layers.
Tiếng Việt: Plugin UXP cho Adobe Photoshop — chạy workflow ComfyUI và RunningHub trực tiếp từ document đang mở. Chọn template, điền tham số, gửi ảnh từ Photoshop, chạy workflow và nhận kết quả về layer mới.
Companion to the aPix Builder web/desktop app (v1.0.0). Templates can be synced from the parent repo via npm run sync:templates.
Phiên bản hiện tại: v1 chính thức · tương thích aPix Builder 1.0.0
| File | Nền tảng | Cài đặt |
|---|---|---|
aPixBuilder_v1.ccx |
Adobe Photoshop 24+ (UXP) | Tải .ccx từ GitHub Releases → double-click hoặc cài qua UXP Developer Tool |
English: Download aPixBuilder_v1.ccx from GitHub Releases, install the package, then open Plugins → aPix Builder in Photoshop.
# Build CCX locally (optional)
npm run prepare:package
# Package output: package/aPixBuilder_v1.ccx| Component | Version |
|---|---|
| Adobe Photoshop | 24.0.0+ (2023 / v24.3+ recommended for Imaging API) |
| Adobe UXP Developer Tool | Latest |
| Node.js | 18+ |
| ComfyUI server | Local or remote (default http://127.0.0.1:8188) |
| RunningHub (optional) | API Key for RH App / RH Workflow modes |
- 3 execution modes: ComfyUI Local, RunningHub Workflow, RunningHub App
- ComfyUI server URL with connection test
- Bundled templates synced from main app defaults (see Templates)
- Optional custom workflow folder per mode (local / RH Workflow)
- Dynamic form UI from
app_build.yaml/app_build.json - Workflow patching via node-field IDs (e.g.
23-seed,14-resize_type.longer_size) - Image input from active document, active layer, or local file
- Selection-aware runs: export selected pixels; fit output to selection bounds
- ComfyUI: upload,
/prompt, WebSocket progress, history fallback,/interrupt - RunningHub: task submit, polling, output import as layers
- Default RH App list from
default-rh-apps.json(synced from parentconfig/default-rh/apps.json) - Dynamic model lists from ComfyUI
/object_info
npm install
npm run build
npm test # optionalLoad the plugin in Photoshop — see Load the Plugin.
When the main aPix_Builder repo is checked out as the parent directory:
npm run sync:templatesThis copies ../config/default → templates/, ../config/default-rh → templates-rh/, compiles YAML, syncs default-rh-apps.json, and regenerates manifest icons.
| Script | Description |
|---|---|
npm run build |
Compile app_build.yaml → app_build.json, bundle src/ → dist/main.js |
npm run sync:templates |
Pull default templates + RH apps from parent web app, then build |
npm run generate:icons |
Generate UXP icons from icons/sdvn-mark-black.png (macOS sips) |
npm run compile:templates |
Compile template YAML only |
npm run watch |
Rebuild bundle on source changes |
npm test |
Node unit tests |
npm run prepare:package |
build + icons + copy to package/aPix Builder/ |
After npm run build or npm run watch:
- Open Adobe UXP Developer Tool
- Add Plugin → select this folder (contains
manifest.json) - Load (or Load & Watch with
npm run watch) - Photoshop → Plugins → aPix Builder
npm run prepare:package- UXP Developer Tool → add folder
package/aPix Builder/ - Unload any previous copy of this plugin
- Load the packaged folder
- Photoshop → Plugins → aPix Builder
Regenerate
package/after changes tomanifest.json, icons, or templates. Thepackage/folder is gitignored.
- Unload in UXP Developer Tool (do not only close the panel)
- Load again
- Re-open the panel in Photoshop
| Mode | Use when |
|---|---|
| ComfyUI | Local or remote ComfyUI server |
| RH Workflow | YAML template + RunningHub workflow ID |
| RH App | Hosted RunningHub WebApp |
- Enter ComfyUI URL (default
http://127.0.0.1:8188) - Click Check — expect
Saved — ComfyUI connected - URL is saved in plugin storage
- Choose from Template dropdown (bundled or custom folder)
- ↻ reload bundled templates
- Folder pick a custom template directory
| UI type | Behavior |
|---|---|
image / file |
Document, Layer, or File |
image_mask |
Same as image (mask painting UI not available in PS yet) |
text / string |
Prompt fields |
int, float, slider, seed |
Numeric / random seed |
dropdown, menu, menu-sub |
Static or conditional choices |
checkpoints, loras, etc. |
From ComfyUI after connect |
note, markdown |
Read-only help |
Click Run → progress in status bar → outputs as new layers. Cancel sends ComfyUI /interrupt or aborts RH polling.
- Switch mode to RH App
- Enter API Key; pick app from dropdown (defaults from
default-rh-apps.json) or Custom WebApp ID - Load RunningHub Nodes → fill fields → Run
- Switch mode to RH Workflow
- Enter API Key; select template from
templates-rh/ - Fill form → Run
RH Workflow YAML requires a runninghub section:
runninghub:
workflowId: "2064644362323189762"
saveWorkflowJson: true
addMetadata: false
usePersonalQueue: false
accessPassword: ""RH Workflow templates do not need an output section — outputs come from task polling.
| Situation | Result |
|---|---|
| Image field set (Document/Layer/File) | That image is sent |
| No image, no selection | Active document exported |
| Selection active | First image input uses selection pixels; output fitted to selection |
| Multiple image inputs, no selection | Same export applied to all empty fields |
aPix_builder_pts/
├── manifest.json
├── index.html
├── styles.css
├── default-rh-apps.json # Default RH WebApp list (generated/synced)
├── dist/main.js # Bundled plugin (generated)
├── icons/ # sdvn-* UXP icons
├── src/
│ ├── main.js
│ ├── state.js
│ ├── services/
│ │ ├── photoshop.js
│ │ ├── comfy.js
│ │ ├── workflow.js
│ │ └── runninghub.js
│ ├── lib/
│ │ ├── menuChoices.js
│ │ └── templateFolder.js
│ ├── ui/form.js
│ └── utils/
│ ├── files.js
│ └── fetchRetry.js
├── templates/ # Local ComfyUI templates
├── templates-rh/ # RunningHub Workflow templates
├── scripts/
│ ├── build.mjs
│ ├── compile-templates.mjs
│ ├── sync-templates-from-app.mjs
│ ├── generate-icons.mjs
│ └── prepare-package.mjs
└── tests/
| ID | Description |
|---|---|
klein-edit-image |
Klein image editing |
sdvn-klein-upscale-ultimate |
SDVN Klein upscale |
| ID | Description |
|---|---|
klein-edit-image-lora |
Klein edit + LoRA (cloud) |
sdvn-klein-upscale-ultimate |
SDVN Klein upscale (cloud) |
Registered in src/state.js (BUILTIN_TEMPLATES, BUILTIN_RH_TEMPLATES). Edit app_build.yaml, then npm run build.
| File | Role |
|---|---|
app_build.yaml |
Source of truth (authors edit this) |
app_build.json |
Compiled config (generated — do not hand-edit) |
api.json |
ComfyUI workflow API JSON |
Runtime reads app_build.json + api.json. YAML is build-time only.
Pick a single template dir or a parent with multiple subdirs (one level). Each valid template needs api.json + (app_build.json or app_build.yaml). Path stored via UXP persistent token.
- Add files under
templates/<id>/ortemplates-rh/<id>/ - Register id in
BUILTIN_TEMPLATESorBUILTIN_RH_TEMPLATESinsrc/state.js npm run buildand reload plugin
Or run npm run sync:templates from parent web app defaults.
npm run prepare:packageOutput:
package/aPix Builder/
├── manifest.json
├── index.html
├── styles.css
├── default-rh-apps.json
├── dist/
├── templates/
├── templates-rh/
└── icons/
"network": { "domains": "all", "allowInsecureRequests": true }localFileSystem: fullAccess — file picker, temp exports, custom template folders.
Unload/reload plugin after changing manifest.json.
| Issue | Fix |
|---|---|
Manifest entry not found / Permission denied |
Unload + reload in UXP Tool; confirm correct folder |
| Connection check fails | Verify ComfyUI URL in browser; check firewall |
No templates found |
Run npm run build; check src/state.js ids match folders |
| Custom folder fails | Need both app_build.json and api.json |
| Validation error on select | Fix YAML id mapping vs api.json, then rebuild |
| No output layers | Check ComfyUI history / RH task; verify output node ids |
| Slow export | Use selection to limit area; PS 24.3+ for Imaging API |
npm testCovers workflow mapping, menu-sub choices, template folder scan, ComfyUI helpers, RunningHub utilities, and execution mode normalization. Photoshop DOM is verified manually.
Private project — see repository owner for distribution terms.