comfyui-mcp 0.20.0 → 0.20.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (37) hide show
  1. package/dist/orchestrator/agent-backend.js.map +1 -1
  2. package/dist/orchestrator/codex-backend.js +20 -4
  3. package/dist/orchestrator/codex-backend.js.map +1 -1
  4. package/dist/orchestrator/index.js +21 -2
  5. package/dist/orchestrator/index.js.map +1 -1
  6. package/dist/orchestrator/panel-tools.js +33 -2
  7. package/dist/orchestrator/panel-tools.js.map +1 -1
  8. package/dist/services/image-management.js +83 -18
  9. package/dist/services/image-management.js.map +1 -1
  10. package/dist/services/manifest.js +84 -3
  11. package/dist/services/manifest.js.map +1 -1
  12. package/dist/services/output-dir.js +59 -0
  13. package/dist/services/output-dir.js.map +1 -1
  14. package/dist/tools/image-management.js +72 -1
  15. package/dist/tools/image-management.js.map +1 -1
  16. package/dist/tools/skills-access.js +1 -1
  17. package/dist/tools/skills-access.js.map +1 -1
  18. package/package.json +1 -1
  19. package/packs/{krea2-txt2img → krea2-txt2img-json}/install-runpod.sh +1 -2
  20. package/packs/{krea2-txt2img → krea2-txt2img-json}/install-windows.bat +1 -2
  21. package/packs/krea2-txt2img-json/manifest.yaml +28 -0
  22. package/packs/krea2-txt2img-json/pack.yaml +45 -0
  23. package/packs/{krea2-txt2img → krea2-txt2img-json}/workflow.json +11 -67
  24. package/packs/krea2-txt2img-manual/install-runpod.sh +39 -0
  25. package/packs/krea2-txt2img-manual/install-windows.bat +44 -0
  26. package/packs/{krea2-txt2img → krea2-txt2img-manual}/manifest.yaml +7 -8
  27. package/packs/krea2-txt2img-manual/pack.yaml +41 -0
  28. package/packs/krea2-txt2img-manual/workflow.json +1642 -0
  29. package/plugin/skills/director/SKILL.md +14 -2
  30. package/plugin/skills/krea2-txt2img/SKILL.md +52 -16
  31. package/plugin/skills/ltxv2-video/SKILL.md +20 -0
  32. package/plugin/skills/video-extend/SKILL.md +9 -0
  33. package/plugin/skills/wan-flf-video/SKILL.md +1 -1
  34. package/plugin/skills/workflow-layout/SKILL.md +14 -1
  35. package/scripts/panel-load-workflow-smoke.mjs +1 -1
  36. package/packs/krea2/workflow.json +0 -4265
  37. package/packs/krea2-txt2img/pack.yaml +0 -32
@@ -21,6 +21,14 @@ The Director skill orchestrates a complete short film production from a text sto
21
21
  - Each scene is independently retryable without affecting others
22
22
  - `clear_vram` between every model family switch
23
23
 
24
+ ## CRITICAL: Inspect modes + verify every output
25
+
26
+ This pipeline drives the user's live canvas across many stages, so two habits are non-negotiable:
27
+
28
+ - **Inspect node modes before each render.** After loading any pack/template/subgraph and before `panel_run`, call `panel_get_graph` and check each node's `mode`. A `bypass` node is skipped (passes input through); a `mute` node and everything downstream don't execute. If the path/branch/switch you need is bypassed or muted, enable it with `panel_set_node_mode` (set the wanted node `active`, the unwanted one `bypass`/`mute`). Never assume a switch or route is already active.
29
+ - **Verify the output matches before moving on.** Every Phase-N render is a gate: actually LOOK at the produced frame/clip (view it) and confirm it matches the intent BEFORE advancing or reporting progress. If it's wrong, diagnose (wrong prompt path? a bypassed/muted builder or switch? wrong widget? wrong ref image?), fix, and rerun. Do NOT declare a phase done or report progress you haven't verified.
30
+ - **Bypass completed stages before queuing the next one.** If you build the multi-stage pipeline on ONE canvas (e.g. Krea2 → LTX → WAN) rather than running each phase in isolation, once a stage has run and its output is captured/staged, `panel_set_node_mode(mode:"bypass")` that stage's nodes BEFORE you `panel_run` the next stage — otherwise `panel_run` re-executes the whole graph and you pay for / wait on already-finished work (a real, costly failure mode). Keep only the active stage live; feed the prior output forward with `stage_output_as_input` (bypass the producer, feed its captured output to the consumer's loader).
31
+
24
32
  ## CRITICAL: Character Consistency
25
33
 
26
34
  **Independent Z-Image generations per scene produce different-looking characters.** This was the #1 problem discovered during testing. The solution:
@@ -219,12 +227,16 @@ Show hero frame and all character refs. User approves or requests regeneration w
219
227
 
220
228
  Edits are **sequential** — each depends on the previous output:
221
229
  1. Run edit, wait for completion
222
- 2. `upload_image` the output
223
- 3. Use uploaded output as source for next edit
230
+ 2. **Stage the output as the next stage's input with `stage_output_as_input`** (pass the output's `{ filename, subfolder?, type? }`); it returns the registered input filename
231
+ 3. Use that returned filename as the `image` in the next edit's `LoadImage`
224
232
  4. Update state file after each edit
225
233
 
226
234
  Independent edits (both from hero) can run in parallel.
227
235
 
236
+ ### CRITICAL: feeding an output into the next loader (don't guess paths)
237
+
238
+ To pipe ANY stage's output into the next stage's loader (`LoadImage` here, `VHS_LoadVideo` / `LoadAudio` in the video phases), call **`stage_output_as_input`** with the output's `{ filename, subfolder?, type? }` and drop the returned input filename into the loader's `image`/`video`/`audio` widget. For a file already on local disk, use `upload_image` / `upload_video` / `upload_audio`. **NEVER copy the output file into, or guess, a filesystem `input/` path** — ComfyUI's input and output directories may be CUSTOM (`--input-directory` / `--output-directory`), so a guessed path makes the loader reject the file (`Invalid image file`) and wastes the render. `stage_output_as_input` goes through the server API (`/view` → `/upload/image`), which resolves the real dirs correctly.
239
+
228
240
  ### Timing
229
241
 
230
242
  - First edit: ~87s (model loading)
@@ -16,7 +16,21 @@ use up to 50 seats). Two variants:
16
16
  1. **Krea 2 Raw** — the base checkpoint before extra post-training. For
17
17
  fine-tuning / maximum fidelity, more steps.
18
18
  2. **Krea 2 Turbo** — post-trained + **distilled**; generates in **~8 steps at
19
- cfg 1**. This is what the `krea2-txt2img` pack ships.
19
+ cfg 1**. This is what the krea2 txt2img packs ship.
20
+
21
+ ## Two packs (no group toggles, no bypassed nodes)
22
+
23
+ The old single `krea2-txt2img` graph (prompt mode toggled by bypassing nodes) is
24
+ split into two standalone packs — pick by how you prompt:
25
+
26
+ - **`krea2-txt2img-manual`** — plain prose prompt (the `MANUAL PROMPT` node).
27
+ - **`krea2-txt2img-json`** — Ideogram-4-style structured JSON / area prompting
28
+ (`Ideogram4PromptBuilderKJ`).
29
+
30
+ Both are single-pipeline graphs with no group toggles — each pack's one prompt
31
+ source is active and the other prompt node is removed (no prompt-mode bypass to
32
+ flip). `ImageSharpenKJ` runs before `SaveImage`. Two **optional** post-proc nodes
33
+ ship **bypassed** in both (see below). Both are render-verified.
20
34
 
21
35
  Krea 2 has **native ComfyUI support** (`comfy/text_encoders/krea2.py`, ComfyUI ≥
22
36
  v0.26.0): the `CLIPLoader` uses **`type=krea2`**, with a **Qwen3-VL 4B** text
@@ -36,28 +50,48 @@ adherence and structured-JSON prompts.
36
50
 
37
51
  - **core**: `UNETLoader` (krea2_turbo) → `CLIPLoader` (type=krea2) → `VAELoader`
38
52
  (qwen_image_vae), wired via KJNodes `SetNode`/`GetNode` buses into a subgraph
39
- (`CLIPTextEncode` → `KSampler` → `VAEDecode`, with an rgthree `Any Switch` that
40
- picks the manual prompt vs the JSON-builder prompt).
53
+ (`CLIPTextEncode` → `KSampler` → `VAEDecode`). An rgthree `Any Switch` sits in
54
+ front of the encoder; in each pack only that pack's prompt source is wired to it
55
+ (manual node in `-manual`, JSON builder in `-json`).
41
56
  - **rgthree-comfy**: Power Lora Loader, Any Switch, Label, Fast Groups.
42
57
  - **ComfyUI-KJNodes**: Set/Get, `Ideogram4PromptBuilderKJ`, `ImageSharpenKJ`.
43
- - **ComfyUI-RBG-SmartSeedVariance**: `RBG_Smart_Seed_Variance` (opt-in).
44
- - **ComfyUI-ConditioningKrea2Rebalance**: `ConditioningKrea2Rebalance` the Krea 2
45
- **safety-filter bypass**. Ship it **bypassed**; the filter is intact by default.
58
+ - **ComfyUI-RBG-SmartSeedVariance**: `RBG_Smart_Seed_Variance` — **optional**, ships
59
+ **bypassed** in the positive-conditioning loop.
60
+ - **ComfyUI-ConditioningKrea2Rebalance**: `ConditioningKrea2Rebalance` **optional**,
61
+ ships **bypassed** (after seed-variance), in the same loop.
46
62
 
47
63
  ## Settings that matter
48
64
 
49
65
  - **steps 8, cfg 1** — Turbo is distilled; more steps/higher cfg over-cooks it.
50
66
  - **sampler `er_sde`, scheduler `simple`** — the verified defaults.
51
67
  - **1920×1080** default; Krea 2 handles a wide aspect range.
52
- - The JSON prompt-builder (`Ideogram4PromptBuilderKJ`), seed-variance, and
53
- laplacian-sharpen post-proc ship **bypassed** — opt-in.
68
+ - The prompt source is fixed per pack (manual node vs JSON builder) no
69
+ prompt-mode bypass to flip.
70
+
71
+ ## Optional post-proc (ship bypassed — un-bypass to use)
72
+
73
+ Both packs leave these two nodes in the positive-conditioning loop, **bypassed**
74
+ (passthrough). Un-bypass on the live canvas with `panel_set_node_mode` (or in the
75
+ UI) when you want them:
76
+
77
+ - **`RBG_Smart_Seed_Variance`** — controlled variations of the same prompt without
78
+ changing the composition. Enable it, set its seed mode to `randomize`, and tune
79
+ the variance mode (e.g. `🌿 Balanced`) / strength widgets. Leave bypassed for a
80
+ deterministic single result.
81
+ - **`ConditioningKrea2Rebalance`** — rebalances the per-token conditioning weights
82
+ (the comma-separated weight string, e.g. `1.0,…,2.5,5.0,1.1,4.0,1.0`). The
83
+ upstream author frames it as removing Krea 2's built-in **safety filter**, so
84
+ **leave it bypassed for the model's default safety behavior**; only enable (and
85
+ adjust the weights) with a specific, authorized reason.
54
86
 
55
87
  ## JSON / area prompting
56
88
 
57
89
  Like Ideogram 4, Krea 2's Qwen3-VL encoder reads structured prompts (per-region
58
- desc + bounding boxes + palettes). To use it: **un-bypass `Ideogram4PromptBuilderKJ`
59
- (node 14) and bypass the manual prompt (node 143)** — the rgthree `Any Switch`
60
- feeds whichever is active into the encoder. Gotchas learned the hard way:
90
+ desc + bounding boxes + palettes). For structured prompting just use the
91
+ **`krea2-txt2img-json`** pack its `Ideogram4PromptBuilderKJ` drives the encoder
92
+ directly (no bypass to flip). After the render, VERIFY the image matches the JSON
93
+ you set (view it) BEFORE continuing; if it doesn't, a field is probably stale —
94
+ fix and rerun. Gotchas learned the hard way:
61
95
 
62
96
  - **Set ALL the builder fields**, not just the prompt/boxes — `background`,
63
97
  `technical`, `style`, `lighting` (widgets 3/5/6/7). Leaving stale values leaks
@@ -70,11 +104,13 @@ feeds whichever is active into the encoder. Gotchas learned the hard way:
70
104
 
71
105
  ## Render-verified
72
106
 
73
- 5 images render crisp at 1920×1080 / 8 steps / cfg 1 / er_sde 3 prose (wildlife,
74
- urban night, still-life) + 2 Ideogram-JSON (still-life, landscape). **Note:** the
75
- `ImageSharpenKJ` (rcas 0.55) before `SaveImage` ships **active** bypassing it
76
- drops the image link (a converter gap: bypass-passthrough doesn't cross a subgraph
77
- IMAGE output), and the contrast-adaptive sharpen suits Krea 2's crisp look anyway.
107
+ Both packs render crisp at 1920×1080 / 8 steps / cfg 1 / er_sde with the optional
108
+ loop nodes bypassed (default) `-manual` on a prose snow-leopard prompt, `-json`
109
+ on a tea still-life whose teapot/cup/figs each land in their bbox region.
110
+ **Note:** the `ImageSharpenKJ` (rcas 0.55) before `SaveImage` is **active**
111
+ bypassing it drops the image link (a converter gap: bypass-passthrough doesn't
112
+ cross a subgraph IMAGE output), and the contrast-adaptive sharpen suits Krea 2's
113
+ crisp look anyway.
78
114
 
79
115
  ## Gotchas
80
116
 
@@ -219,6 +219,18 @@ Dedicated sigma schedule for LTX-V2 latent space:
219
219
 
220
220
  Connect the optional `latent` input for latent-aware shift scaling.
221
221
 
222
+ > **Feeding a prior stage's output into I2V (e.g. Krea2 image → LTX video).** The
223
+ > `LoadImage` that feeds `LTXVImgToVideo.image` needs the source frame registered
224
+ > as a ComfyUI INPUT. When that frame is an OUTPUT from an earlier stage, call
225
+ > **`stage_output_as_input`** with its `{ filename, subfolder?, type? }` and drop
226
+ > the returned input filename into `LoadImage`. (For a file already on local
227
+ > disk, `upload_image`.) **NEVER copy the output file into, or guess, a
228
+ > filesystem `input/` path** — ComfyUI's input/output dirs may be CUSTOM
229
+ > (`--input-directory` / `--output-directory`), so a guessed path makes
230
+ > `LoadImage` reject the file (`Invalid image file`) and wastes the render.
231
+ > `stage_output_as_input` goes through the server API (`/view` → `/upload/image`)
232
+ > and resolves the real dirs correctly.
233
+
222
234
  ### LTXVImgToVideo (For I2V)
223
235
 
224
236
  All-in-one node that encodes image, creates latent, and wraps conditioning:
@@ -240,6 +252,14 @@ All-in-one node that encodes image, creates latent, and wraps conditioning:
240
252
  }
241
253
  ```
242
254
 
255
+ > **Gotcha — `strength` controls motion; DON'T set it to 1.0.** `LTXVImgToVideo.strength`
256
+ > is how strongly the output adheres to the start image: **higher = more adherence = LESS
257
+ > motion**. Setting it to **1.0 pins every frame to the start image → a FROZEN i2v with
258
+ > ZERO motion** (the storyboard frames come out basically identical). Keep the verified
259
+ > value **~0.6** (as in the example above) for proper motion. If a generated i2v clip
260
+ > shows little/no motion, the FIRST thing to check is that `strength` wasn't bumped toward
261
+ > 1.0.
262
+
243
263
  ### LTXVLatentUpsampler (For Two-Stage Upscale)
244
264
 
245
265
  ```json
@@ -372,6 +372,15 @@ This also matters for **chaining** — color-match every new segment to the
372
372
  Pusa adds a bounded window (~4 s) per run. To go longer, **feed the output back
373
373
  in**:
374
374
 
375
+ 0. **Stage the output clip as the next run's input** with
376
+ **`stage_output_as_input`** (pass the rendered clip's
377
+ `{ filename, subfolder?, type? }`); use the returned input filename in
378
+ `VHS_LoadVideo`. **NEVER copy the output .mp4 into, or guess, a filesystem
379
+ `input/` path** — ComfyUI's input/output dirs may be CUSTOM
380
+ (`--input-directory` / `--output-directory`), so a guessed path makes
381
+ `VHS_LoadVideo` fail to find/decode the file and wastes the run. The tool
382
+ routes through the server API (`/view` → `/upload/image`), which resolves the
383
+ real dirs correctly. (For a clip already on local disk, `upload_video`.)
375
384
  1. Run the extension → decode → save (or keep the frames in-graph).
376
385
  2. Take the **tail of the *new* output** (the last ~13 frames) as the next
377
386
  `WanVideoEncode` input.
@@ -521,7 +521,7 @@ When the start and end frames have different subject sizes (e.g., small cat →
521
521
  1. **Generate anchor frame** with Z-Image/SDXL/Flux (portrait orientation for standing subjects)
522
522
  2. **Qwen Edit to create second frame** — the edit preserves scene context
523
523
  3. **Clear VRAM** between model families
524
- 4. **Upload both frames** with `upload_image`
524
+ 4. **Stage both frames as inputs.** When the frames are ComfyUI OUTPUTS from a prior stage (the generated/edited frames above), use **`stage_output_as_input`** with each output's `{ filename, subfolder?, type? }` and feed the returned input filename into each `LoadImage`. (For a frame already on local disk, use `upload_image`.) **NEVER copy the output file into, or guess, a filesystem `input/` path** — ComfyUI's input/output dirs may be CUSTOM (`--input-directory` / `--output-directory`), so a guessed path makes `LoadImage` reject the file (`Invalid image file`) and wastes the render. `stage_output_as_input` routes through the server API (`/view` → `/upload/image`), which resolves the real dirs correctly.
525
525
  5. **Run dual hi-lo FLF** with morph LoRA if morphing is desired
526
526
  6. **Optionally upscale** with SeedVR2 to 1080p
527
527
 
@@ -27,7 +27,10 @@ real node sizes and rail positions first, then compute positions from them.
27
27
  - **Subgraphs** (nest nodes into one collapsible node): `panel_create_subgraph(node_ids)`,
28
28
  `panel_enter_subgraph` / `panel_exit_subgraph`, `panel_get_subgraph`,
29
29
  `panel_promote_widget`, **`panel_move_rail(rail, [x,y])`** (`rail` = `"input"|"output"`,
30
- must be inside the subgraph).
30
+ must be inside the subgraph), **`panel_expose_subgraph_output(from_node_id, from_output)`** /
31
+ **`panel_expose_subgraph_input(to_node_id, to_input)`** (expose an interior slot on the
32
+ boundary rail — must be inside the subgraph), and **`panel_unpack_subgraph(node_id)`**
33
+ (expand/dissolve a subgraph back into the parent — the inverse of `panel_create_subgraph`).
31
34
  - `panel_canvas({action:"fit"})` to frame the result; `panel_save_workflow` to persist.
32
35
 
33
36
  ## The layout algorithm (dependency-layered, overlap-free)
@@ -69,6 +72,16 @@ above) → then pin the rails to the node band:
69
72
  Keep rails at the same Y as the first row. Read current rail positions from
70
73
  `panel_get_graph` (`rails`) before deciding. `panel_exit_subgraph` when done.
71
74
 
75
+ **Wiring interior nodes to the boundary (don't connect to a guessed rail id).** To expose
76
+ an interior node's output/input on the boundary so the PARENT graph can wire it, do NOT
77
+ `panel_connect` to a rail node id you guessed — use `panel_expose_subgraph_output(from_node_id,
78
+ from_output)` (interior output → output rail) and `panel_expose_subgraph_input(to_node_id,
79
+ to_input)` (interior input → input rail), both while inside the subgraph. `panel_get_graph`'s
80
+ `rails` shows which boundary slots already exist and which still need exposing. To expand/
81
+ dissolve a subgraph back into the parent (inline its inner nodes + rewire external links,
82
+ removing the wrapper — the inverse of `panel_create_subgraph`), use
83
+ `panel_unpack_subgraph(node_id)`. All undoable with Ctrl+Z.
84
+
72
85
  ## Groups vs subgraphs — choose deliberately
73
86
 
74
87
  - **Group** (colored box): lightweight visual band; nodes stay in place and editable. Reach
@@ -3,7 +3,7 @@
3
3
  // Proves two PART-A/PART-B behaviours on the Codex backend (the one that
4
4
  // silently spent credits before):
5
5
  // A) "set up a krea2 workflow on my canvas" → the agent calls
6
- // panel_load_workflow({pack:"krea2-txt2img"}), which fires `graph_load` on
6
+ // panel_load_workflow({pack:"krea2-txt2img-manual"}), which fires `graph_load` on
7
7
  // the (mock) panel with the pack's real UI graph (node_count>0) — i.e. a
8
8
  // one-shot load, NOT a node-by-node rebuild.
9
9
  // B) a prompt that implies API nodes → the agent ASKS the user about cost