Add a multi-window board so Generate stays live while refs feed vision.

Keep action buttons only on the latest patch, spin Apply+Generate while busy, and greet on first open.

Co-authored-by: Cursor <cursoragent@cursor.com>
This commit is contained in:
Leonid Pershin
2026-08-21 20:56:50 +03:00
co-authored by Cursor
parent 57b2023a50
commit bb8cb990aa
7 changed files with 959 additions and 234 deletions
+12 -3
View File
@@ -21,7 +21,8 @@ A JSON block named "Live SwarmUI context" is attached. Treat it as ground truth:
- Respect current width/height/steps/cfg/seed/sigma_shift/sampler unless the user asks to change them or the pack is `fix_params`.
- `wildcards` lists installed wildcard names (`__name__` syntax in prompts).
- `prompt_image_count` > 0 means Prompt Images are attached — warn if they may dominate.
- **Init / inpaint:** `has_init_image`, `has_mask_image`, `init_creativity` (aka denoise, 01), `mask_blur`, `mask_grow`. `has_vision_image` is the Assistent pane reference (can become Init/Mask).
- **Init / inpaint:** `has_init_image`, `has_mask_image`, `init_creativity` (aka denoise, 01), `mask_blur`, `mask_grow`.
- **Board (image windows):** `image_slots` lists windows. `generate` is the live current generation (view only unless attached). `ref1`… are user references. `attached_slot_ids` / `has_vision_image` = which windows are actually sent as vision this turn. To look at a window that was not attached, emit `look_at`.
## Output contract (mandatory)
@@ -47,6 +48,11 @@ A JSON block named "Live SwarmUI context" is attached. Treat it as ground truth:
"clear_mask_image": false,
"mask_blur": null,
"mask_grow": null,
"look_at": ["generate"],
"slot_to_init": null,
"slot_to_mask": null,
"snapshot_generate": false,
"select_slot": null,
"actions": ["generate"],
"search_query": null,
"notes": "one-line why"
@@ -63,8 +69,8 @@ A JSON block named "Live SwarmUI context" is attached. Treat it as ground truth:
### Init image / inpaint
- **img2img:** set `use_init_image: true` (uses Assistent vision / current Generate image) and `init_creativity` (0 = almost copy, 1 = almost new). Typical edits: **0.250.45**; restyle: **0.50.7**. Alias `denoise` is accepted.
- **Inpaint:** needs Init + Mask. Set `use_init_image: true` and `use_mask_image: true` only when the vision pane holds a proper mask (white = edit, black = keep). If the user has not painted a mask, tell them to use Swarm **Edit Image** / paint a mask, or press **As Mask** with a prepared mask — do not invent pixel masks.
- **img2img:** set `use_init_image: true` and optionally `slot_to_init: "generate"` or `"ref1"` (uses that board window) plus `init_creativity` (0 = almost copy, 1 = almost new). Typical edits: **0.250.45**; restyle: **0.50.7**. Alias `denoise` is accepted.
- **Inpaint:** needs Init + Mask. Set `use_init_image: true` and `use_mask_image: true` only when a board window holds a proper mask (white = edit, black = keep). Point to it with `slot_to_mask`. If the user has not painted a mask, tell them to use Swarm **Edit Image** / paint a mask, or press **As Mask** — do not invent pixel masks.
- `clear_init_image` / `clear_mask_image` to leave img2img mode.
- Prompt Images ≠ Init Image. Prefer Init for structural edits; Prompt Images for style refs (and warn they can dominate).
@@ -74,6 +80,9 @@ A JSON block named "Live SwarmUI context" is attached. Treat it as ground truth:
- `"use_init"` / `"use_mask"` — same as the boolean flags (optional).
- `"search_civitai"` — Civitai search; user must **Confirm** downloads.
- `"interrupt"` — stop generation.
- `look_at: ["generate", "ref1"]` — ask the UI to send those board windows as vision (a follow-up hop). Use when you need to see a slot that was not attached.
- `slot_to_init` / `slot_to_mask` — which board id to copy into Swarm Init / Mask.
- `snapshot_generate: true` — copy the live Generate window into a new/empty Ref.
- Pure Q&A with no prompt/param change: omit the JSON patch entirely (do not burn GPU).
### Auto-apply note