31 Commits
Author SHA1 Message Date
Mehdi Chaid 58b7b32332 feat: Generation Data overlay shows the auto-caption under the input image (#485) 2026-11-09 21:36:30 -05:00
Mehdi Chaid 0caf422e1d feat: queue captions animate start images before the video jobs (#484) 2026-11-09 21:35:18 -05:00
Mehdi Chaid 4b97c8a573 perf: fewer node renders and cached preset/list requests on load (#453) 2026-10-22 23:25:19 -04:00
Mehdi Chaid 959862c1d0 feat: Flake Animate Stack / Combo per-item input image lists (#441) 2026-10-21 17:50:17 -04:00
Mehdi Chaid 2e6aef56a0 feat: Flake Generate Animation node with video overlay (#434) 2026-10-21 13:39:07 -04:00
Mehdi Chaid b9fe43f4fc feat: Flake Animate Stack and Combo nodes (#432)
Compose animate flakes onto flake_anim_data: LoRAs model-only (high/low on Wan 2.2), joined prompts, stems and an optional start image. The Flake Stack/Combo widgets, load picker and queue combos take an anim kind.
2026-10-21 13:35:49 -04:00
Mehdi Chaid 5a5870990b feat: Flake Animate Preset and Preset Combo nodes (#430) 2026-10-21 13:30:22 -04:00
Mehdi Chaid 7cfa5536f0 feat: Generate overlay opens on the combination being generated (#423) 2026-10-21 13:14:05 -04:00
Mehdi Chaid 08d1db2109 feat: Flake Combo Multiple variant choices with Randomize (#406) 2026-10-18 23:12:12 -04:00
Mehdi Chaid 4ea6165025 fix: overlay previews break when Flake Combo grid items are reordered (#383)
Combo keys use a persistent per-item uid (Flake Combo entry _uid, Flake Model Combo _combo_uids) instead of grid positions, and a sorted group=choice sub-key for All Variants items. Results, live previews, progress bars and generating highlights follow the item when it moves. The overlay now also has an axis for FlakeStack All Variants flakes.
2026-10-16 19:37:33 -04:00
Mehdi Chaid b4ce9ca0f7 fix: live preview never shows because ComfyUI previews are off by default (#380)
Prompts with a FlakeGenerate request latent previews (auto) when the Live preview setting is "default" and the server runs with --preview-method none. api.queuePrompt is wrapped once for the session; batch prompt_id capture goes through the same wrapper. FlakeGenerate previews are no longer also drawn by core on the node.
2026-10-16 19:37:19 -04:00
Mehdi Chaid 61683d4cad feat: live sampling previews in Flake Generate node and overlay (#374)
queue.js keeps the latest b_preview_with_metadata blob URL (revoking the previous one) with its node and prompt id, mapped to the running batch combination. The Flake Generate node shows it while it samples and the overlay shows it for the selected running combination; the result replaces it on executed. Plain runs now record their result under the empty key so the overlay shows it after the preview.
2026-10-15 21:11:23 -04:00
Mehdi Chaid ecf7aceef4 fix: combo highlights and overlay results lost across tab switches and reconnects (#373)
Batch state (running combo per node id, results per FlakeGenerate node id, progress) now lives in a per-workflow store in queue.js. Nodes read it when they render and after a workflow load; the overlay reads results through a getter and re-renders when one arrives. On websocket reconnect or when the tab becomes visible, finished prompts are backfilled from /history and the running one from /queue. Results are cleared at batch start.
2026-10-15 21:11:23 -04:00
Mehdi Chaid 258939740b fix: UI batch count now multiplies combinations (#348)
app.queuePrompt ignored batchCount and ran each combination once. Now each combination runs batchCount times in a row (seed advances per run via control_after_generate), for combinations.length * batchCount total jobs. setupBatchTracking takes totalJobs for the completion check and [i/N] label; a comboIndexByPrompt map keeps combo highlighting/image storage correct now that prompt-id count exceeds the combination count.
2026-06-20 21:30:09 -04:00
Mehdi Chaid 7c2ba941d3 feat: All Variants override expands a flake into one generation per variant combo (#343)
Adds an 'All Variants' checkbox to the Flake Combo and Flake Stack override panels (entry._all_variants). At queue time, queue.js expands such flakes: a combo flake becomes one axis item per variant combination, and a stack flake becomes an extra combinatorial axis. comboKeys carry a per-variant sub-key so each generation stays distinct; computeJobCount reflects the multiplied total (best-effort from cached meta). Non-all-variants combos/stacks are unchanged.
2026-06-20 18:25:33 -04:00
Mehdi Chaid e50ea96f9d feat: Generation Data overlay layout + ADetailer A/B toggle (#324, #328)
- Widen the overlay and switch the combo view to a 33/67 left/right split.
- Increase the preview/composite image size to 384px.
- Make combo-axis card grids wrap instead of horizontal-scroll.
- Add ADetailer/Upscale settings as a new 'Generation settings' section.
- Store ADetailer A/B outputs per combo key in queue.js; add an A/B toggle
  below the image dimensions to switch between regular and ADetailer outputs
  in the overlay (#328).
2026-06-19 14:22:49 -04:00
Mehdi Chaid ff46e2789c fix: exclude bypassed/muted combo nodes from generation (#304) 2026-06-17 14:17:13 -04:00
Mehdi Chaid 85f030a874 feat: per-instance model-preset overrides (filename/steps/cfg/sampler/scheduler) (#279) 2026-06-15 15:34:03 -04:00
Mehdi Chaid a4dd9357ba feat: per-preset enable/disable toggle in Flake Model Combo (#266) 2026-06-04 20:32:58 -04:00
Mehdi Chaid 01eb1e0154 fix: nest combo batch loops by graph connection order (#265) 2026-06-04 20:26:15 -04:00
Mehdi Chaid 9c927b5011 fix: combo highlight + progress for first generation (#241)
Two parts:

1. queue.js: websocket events (execution_start / executed / etc.) can
   arrive on the websocket transport BEFORE the REST response that
   gives us their prompt_id. The previous handlers looked up the pid
   in promptIds and bailed when it wasn't found — so the very first
   generation in a batch consistently lost its highlight and per-combo
   image stamp, and the overlay missed its progress events.

   Add a pendingByPid event buffer. When an event arrives for an
   unknown pid, queue it. When the patched api.queuePrompt finally
   resolves and registers the pid, replay the buffered events for it.
   Snapshot _currentBatchComboKey at call time so the queued combo key
   stays correct even if the await resolves out of order.

2. generation-data.js: when the overlay opens mid-batch, seed the
   progress bar on the currently-running combo's grid cards by
   reading _activeBatch.runningPromptId synchronously. Without this,
   a late-opened overlay only started showing progress on the *next*
   running combo.

Closes #241
2026-05-22 10:10:25 -04:00
Mehdi Chaid d79b3f6904 feat: overlay panel split, dedup, width, progress bars, aspect ratio (#228, #229, #230, #231)
#228 — combinationData() now returns separate {commonLoraRows,
commonPromptRows} (from Model Preset + Flake Stack) and
{comboLoraRows, comboPromptRows} (from ALL flake-axis selected
entries, not just the first). The right panel renders only common;
the left panel below the combo grids renders only combo. Previously
the right panel showed both, and the left panel only showed the
first combo axis — so second-combo data leaked right and was missing
on the left.

#229 — Reduce overlay max-width from min(1400px, 95vw) to
min(980px, 66vw) (30% smaller per the spec). Shrink the gap between
left and right panels from 14px to 8px.

#230 — Progress bars on combo grid items while the corresponding
combo is the currently-running job. queue.js exports an _activeBatch
view (promptIds + comboKeys + runningPromptId); the overlay
subscribes to the ComfyUI api `progress` websocket event, maps the
running prompt_id back to its comboKey, parses the comboKey into
[nodeId, itemIdx] pairs, and updates the matching cards' progress
bars. Cleared on execution_success/error/interrupted and unsubscribed
on overlay close.

#231 — Composite preview image aspect ratio now matches the output
resolution (combinationData reports {width, height} from the active
preset). applyAspectRatio() sizes the image to fit within a 256px
square while preserving the output's ratio (e.g. a 1200x800 preset
yields a 256x171 preview).

Closes #228
Closes #229
Closes #230
Closes #231
2026-05-21 15:15:24 -04:00
Mehdi Chaid d865208f3d feat: Flake Generate node — Total jobs label, [i/N] done progress, narrower button (#227)
- Rename "Jobs: N" → "Total jobs: N".
- Add "[i/N] done" sub-label below it, updated as each prompt in the
  batch finishes. queue.js writes _batch_completed_count and
  _batch_total_count onto every FlakeGenerate node and invokes the
  node's _batch_progress_render() callback; resets to 0/N at batch
  start.
- Shrink the Generation Data button to fit its label + a bit of
  padding (flex:0 0 auto, inline-flex, white-space:nowrap) instead of
  stretching across the row.

Closes #227
2026-05-21 14:56:04 -04:00
Mehdi Chaid 6156aa11e0 fix: capture prompt_id via api.queuePrompt patch for combo highlight (#207, #222)
Devtools console confirmed the previous defensive fallback's warning:
\`[flakes] queuePrompt result missing prompt_id; combo highlight may
not work for this batch.\` In current ComfyUI frontends, app.queuePrompt
returns void — the {prompt_id, number, node_errors} response only
flows through the lower-level api.queuePrompt call inside it.

Patch api.queuePrompt for the duration of each batch. The outer loop
sets _currentBatchComboKey before each combo's queue call; the patch
captures the returned prompt_id and pushes [promptId, comboKey] into
the parallel arrays the event listeners read. Restore the original
api.queuePrompt in the tracker cleanup.

This unblocks both:
- #207: setComboHighlight via execution_start now matches the right
  combination, so the blue border draws on the correct grid item.
- #222: per-combo image storage via the executed event now writes to
  the right combo key on the FlakeGenerate node, so the overlay
  composite image stops collapsing to the last-generated combo.

Closes #207
Closes #222
2026-05-21 13:26:54 -04:00
Mehdi Chaid 3c2a8a15c0 fix: per-combo image storage races, defensive batch tracking (#222, #207)
#222 — flake-generate.js used `node._pending_combination_key` to tag
the upcoming prompt's combo, and the FlakeGenerate node read that key
in onExecuted to stamp the generated image into _images_by_combo. But
queue.js's batch loop advanced the key for the next combo *before* the
previous onExecuted fired, so every image ended up filed under the
last combo's key — the overlay then only displayed the last option.

Move the per-combo storage into queue.js, keyed by prompt_id via the
`executed` websocket event. Maintain a `comboKeys` array parallel to
`promptIds` so an event's prompt_id maps unambiguously to the combo
that produced it, regardless of how many prompts are in flight.
flake-generate.js still records the empty-key image as a safety net
for single-prompt (no combo) runs.

#207 — Make batch tracking defensive against frontend variation:
- Resolve the ComfyUI api singleton from several known locations
  (comfyAPI.api.api, comfyAPI.api, app.api, window.app.api) and warn
  to the console if none are found instead of silently failing.
- Warn when _originalQueuePrompt returns no prompt_id (highlight and
  per-combo image tagging both depend on it).

Closes #222
Refs #207 (defensive helpers; runtime verification still pending the user)
2026-05-20 18:38:12 -04:00
Mehdi Chaid 043c50ff72 feat: highlight current combo item during batch generation (#207)
Use ComfyUI execution_start / execution_success / execution_error /
execution_interrupted websocket events to track which queued prompt
is currently running, and highlight the corresponding flake/preset
grid item in FlakeCombo and FlakeModelCombo nodes. Highlights are
cleared only after all batch jobs finish, not immediately after the
queuePrompt HTTP response.
2026-05-20 10:39:21 -04:00
Mehdi Chaid f8c82d4ea4 feat: combine Models+Inputs into Generation Data combination overlay (#188, #189, #190, #191)
Replaces the two Models/Inputs preview buttons with a single Generation
Data button (#188) opening a split overlay:

- Left half: one horizontal-scroll grid per upstream Flake Model Combo /
  Flake Combo node, defaulting to the first item, selectable (#189).
- Right half: model/output/LoRA/prompt data for the selected combination
  only, pulling fixed preset + common stack flakes + the chosen combo
  flake per axis (#190).
- Top of right half: k-d-tree composite of the selected combo covers
  (top half + bottom quarters for the 3-item case), with a
  'No image generated yet' label that swaps to the actual output +
  filename once that combination has been generated (#191).

queue.js stamps an order-independent combination key onto FlakeGenerate
before each queued prompt so onExecuted can map outputs to combinations.
closes #187
2026-05-15 21:57:43 -04:00
Mehdi Chaid 9ff0abc2b0 feat: highlight active combo item during generation (#181)
While queueing the cartesian product of jobs, each FlakeCombo and
FlakeModelCombo node highlights (blue border + glow) the flake/preset
being used for the current combination via a transient
_combo_generating_index, cleared when generation finishes.
2026-05-15 19:27:07 -04:00
Mehdi Chaid 1cba0f8e4c feat: replace queue confirmation popup with live 'Jobs: N' label (#180)
Removes the 'This will queue N prompts. Continue?' confirm() and adds a
Jobs: N label to the Flake Generate node (left of the preview buttons)
that polls computeJobCount() and updates as flakes are added/removed in
connected FlakeCombo / FlakeModelCombo nodes. Bypassed flakes excluded
(shared with #179 logic).
2026-05-15 19:22:33 -04:00
Mehdi Chaid 91de1adde4 fix: exclude bypassed flakes from FlakeCombo job queue (#179)
Bypassed (crossed-out) combo flakes were still multiplied into the
cartesian product of queued jobs. They are now filtered out so the job
count reflects only active flakes (e.g. two 4-flake combos with 2
bypassed each = 4 jobs, not 16).
2026-05-15 19:16:17 -04:00
Mehdi Chaid 6ab581f040 refactor: split flake_stack.js into focused modules
Decomposes the ~3800-line flake_stack.js monolith into maintainable
modules:

- api.js        – all server API calls
- utils.js      – DOM helpers, sliders, inputs, drag indicators
- modal.js      – overlay modal infrastructure
- flake-modal.js – flake create/edit modal
- preset-modal.js – preset create/edit modal + preset option refresh
- pickers.js    – file browser, flake picker, preset picker
- widgets/      – per-node widget setups
  - flake-stack.js
  - flake-combo.js
  - flake-model-preset.js
  - flake-model-combo.js
- queue.js      – frontend combination queueing logic
- flake_stack.js – entry point, imports everything and registers extension

Fixes #59
2026-05-01 15:06:12 -04:00