Commit Graph
61 Commits
Author SHA1 Message Date
Mehdi Chaid 0dc0cc77a4 feat: Flake Animate Stack previews the first active input image (#442) 2026-10-21 17:53:05 -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 f07dcfaaa7 feat: Import Flake into Flake Animate grids (#433) 2026-10-21 13:39:55 -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 c5f335ed80 feat: Load Existing Flake folder tiles show a cover thumbnail (#424) 2026-10-21 13:17:37 -04:00
Mehdi Chaid ae4f534076 fix: variant choice flake links open the picker, show in the grid dropdown and Generation Data (#420)
The choice menu's Flake Link called openFileLoadPicker, whose import was
dropped in #386; the ReferenceError was swallowed by the catch, so the
picker never opened and no link was added. Use pickFlakeTarget instead.

Choice links get per-choice grid overrides (variant_link_overrides), show
under a "<group>: <choice>" heading in the linked column, are listed in
Generation Data, and use the shared link override editor.
2026-10-19 20:37:46 -04:00
Mehdi Chaid 6491125cf2 fix: flake link dropdowns show the linked flake's default variant choice (#419) 2026-10-19 12:44:24 -04:00
Mehdi Chaid a54800eac5 feat: drag & drop flake items between Flake Stack / Flake Combo nodes (#415) 2026-10-19 10:53:48 -04:00
Mehdi Chaid 4ee3899f4b feat: flake links override the linked variant choice LoRA strengths (#414) 2026-10-19 10:51:20 -04:00
Mehdi Chaid be9e60435e feat: variant choice LoRA strength overrides in Flake Stack / Combo dropdowns (#413) 2026-10-19 10:49:31 -04:00
Mehdi Chaid 1739446843 feat: variant dropdown lists None first and marks the default choice (#405) 2026-10-18 23:08:48 -04:00
Mehdi Chaid 2e30997519 feat: favorite flakes (#402) 2026-10-18 18:58:35 -04:00
Mehdi Chaid c217d2bb51 feat: Applies by default checkbox and default variant display (#388) 2026-10-16 19:33:29 -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 6fe2a36a87 feat: shared accent-button styling for Activate-all toggle on all 3 nodes (#338) 2026-06-19 22:39:37 -04:00
Mehdi Chaid 92ebdc82df style: remove » duplicate button panel, keep glyph with drop shadow (#337) 2026-06-19 22:37:47 -04:00
Mehdi Chaid e488b7fc85 fix: restyle Flake Stack activate-all toggle to look native (#333) 2026-06-19 18:22:47 -04:00
Mehdi Chaid f80dd956c3 fix: hide type ribbon for flakes without a flake_type (#276)
makeTypeRibbon now returns null when entry.flake_type is missing, so newly
saved flakes that don't have a type no longer display a misleading 'O'
(first letter of 'Other') in the grid.
2026-06-19 14:13:57 -04:00
Mehdi Chaid 89d186a7b6 feat: toggle-all activate/deactivate button on Stack/Combo/Model Combo (#315)
A button above the grid flips every flake/preset between active and bypassed in
one click; its label reflects the current state. Node height accounts for the
extra row.
2026-06-19 12:01:39 -04:00
Mehdi Chaid 7c63753c01 feat: duplicate (») button on grid items for Stack/Combo/Model Combo (#316)
Each flake/preset item gets a bottom-right » button that inserts a deep copy of
itself beside it (Model Combo also copies the preset's overrides), so the user
can quickly make multiple versions with different overrides.
2026-06-19 11:37:25 -04:00
Mehdi Chaid b6ebfd2b6d feat: Flake Stack per-item activate checkbox (replace click-the-type-tag) (#314)
The type ribbon is now a static indicator and a top-right enable/disable checkbox
toggles the flake's bypassed state, mirroring Flake Combo / Flake Model Combo.
2026-06-19 11:15:06 -04:00
Mehdi Chaid f50f90936b fix: grid nodes compute real column count so they stop padding with empty space (#317)
The grid DOM widget computeSize hardcoded 2 columns ((len+1)/2), but the grid
uses auto-fill minmax(72px,1fr). On a wide node the real column count is higher,
so the node over-counted rows and reserved empty space above/below the grid on
reload. Derive cols from the node width (≈76px per item) on Flake Stack, Flake
Combo and Flake Model Combo.
2026-06-19 10:56:43 -04:00
Mehdi Chaid 0c41f60db7 feat: show selected variant choice initials as [P, C] line on flake grid (#298) 2026-06-17 00:21:32 -04:00
Mehdi Chaid 9f250dcdca feat: show flake LoRA tags on a dimmer line on grid and load picker (#297) 2026-06-17 00:20:47 -04:00
Mehdi Chaid ed48d013f9 feat: flake-link picker overlay and multiple links per flake (#275)
Replace the single flake_link dropdown with a picker overlay (search +
folders, reusing openFileLoadPicker) and support multiple links per flake.

- Schema: flake_link (single) -> flake_links (list); legacy single still
  read on load and at runtime (backward compatible).
- Backend: Flake.flake_links list, _flake_from_raw parses both formats,
  _apply_flake_link loops over links with per-link grid overrides
  (entry.flake_link_overrides[i], legacy flake_link_override -> index 0).
- Modal: fieldState.flake_links array; add/change via overlay, per-link
  variant + lora-strength override cards; serialized as flake_links.
- Stack/Combo grid panels render one linked-override section per link.
- Document flake_links in the README flake-file format.
2026-06-09 19:56:29 -04:00
Mehdi Chaid b83ef26b72 feat: add LoRA tag-name checkbox affecting stem, path, and grid name (#274)
Add a "Tag flake with this LoRA's name" checkbox to each LoRA card. When
checked, the LoRA name (slugged) is appended after the display name in the
Output Path and Output Stem prefills, and appended to the flake grid item
's
display name across all entry-creation paths (create, load, replace, edit-
save). Persist tag_name per LoRA in the YAML; runtime parsing ignores the
extra key.
2026-06-09 09:36:34 -04:00
Mehdi Chaid 18e09480f8 fix: hide model_family widget whenever flake_data input is connected (#261)
Visibility was gated on the upstream family being inferable, so a
connected-but-uninferable input left the widget visible-but-disabled.
Hide based on the input link being present; still set the widget value
from the upstream family when it can be read.
2026-06-02 19:11:54 -04:00
Mehdi Chaid e1abb97643 fix: ensure default flake serialization and always re-infer controlnet model from preset family (#251) 2026-06-02 11:48:01 -04:00
Mehdi Chaid 03e7145a4b feat: grid dropdown shows linked flake tunables as a second panel (#235)
When a host flake on the FlakeStack / FlakeCombo grid has a flake_link,
the option dropdown now shows a SECOND panel to the right of the
native panel:
- Title with the linked flake's display name (and full target path in
  tooltip).
- One slider per lora on the linked flake, defaulting in priority:
  per-grid override -> yaml flake_link default -> linked flake's own
  default. Writes go to entry.flake_link_override.lora_strengths[i].
- One dropdown per variant group on the linked flake, with the same
  override precedence. Writes go to entry.flake_link_override.variant.

Implementation:
- Restructure the option panel from a single-column popout into a
  two-column flex row (nativeColumn + linkedColumn). nativeColumn
  keeps the existing rendering; linkedColumn is display:none until
  loadOptions discovers a flake_link on the host.
- loadOptions also fetches the linked flake's data when the host
  declares a flake_link, so we know its loras + variants for the
  linked panel.
- Per-placement overrides ride along with the entry through
  flakes_json (FlakeStack) / _combo_flakes (FlakeCombo) without any
  extra wiring — JSON.stringify already includes the field.

Applied to both flake-stack.js and flake-combo.js with the same
two-column structure.

Refs #232, closes #235
2026-05-22 11:27:25 -04:00
Mehdi Chaid 567870271a fix: more aggressive model_family widget hide via setWidgetHidden helper (#216)
The previous hide mechanism (computeSize/type/hidden/draw overrides
inline in each widget setup) didn't take effect on the user's frontend
version — model_family stayed visibly rendered when flake_data was
connected.

Refactor into a single setWidgetHidden(widget, hide) helper in utils.js
that stacks every known hide signal:
  - widget.computeSize = () => [0, -4]   (collapse row height)
  - widget.type = "hidden"               (LiteGraph + frontend flag)
  - widget.hidden = true                 (older frontend flag)
  - widget.draw = no-op                  (LiteGraph canvas path)
  - widget.options.serialize = true      (keep value in serialized JSON)
  - widget.element.style.display = none  (modern DOM-widget path)
  - widget.inputEl.style.display = none  (DOM input path)
And the inverse on unhide via a per-widget saved-state WeakMap.

Refs #216
2026-05-21 13:27:03 -04:00
Mehdi Chaid 13da022e49 fix: revert widget detach in #216 — keep model_family in node.widgets (#223)
Closes #223. The previous #216 fix (commit 2db236a) detached the
familyWidget from node.widgets to hide it. That introduced three
regressions:

1. Generation failed with "Required input is missing: model_family".
   The widget was the only carrier for the required model_family value
   in the serialized prompt; once detached, prompt validation rejected
   every job.

2. Node sizes were reset on reload. _updateFamilyVisibility called
   node.setSize(node.computeSize()) on every state transition, and on
   workflow load the 200ms poll fired a transition after onConfigure
   restored the saved size — overriding it.

3. Flake Stack items vanished on reload. Detaching the widget shifted
   the widget value order in the saved JSON: only [flakes_json_value]
   was serialized, but the reload code (correctly) still has the
   widget present, so the saved JSON string landed in model_family
   and flakes_json kept its empty default.

Fix:
- Keep familyWidget permanently in node.widgets so serialization is
  stable and the required input is always sent.
- Hide it visually by stacking computeSize=[0,-4], type="hidden",
  hidden=true, AND a no-op draw override (covers ComfyUI frontends
  that don't honor type/hidden for canvas-drawn COMBO widgets).
- Drop node.setSize from the visibility transition (rely on
  setDirtyCanvas to repaint).
- Defer the initial sync to setTimeout(0) so onConfigure has hydrated
  link state before we read it.
- Add _recoverShiftedWidgets in flake_stack.js onConfigure for
  FlakeStack and FlakeCombo: if model_family looks like JSON and
  flakes_json is at its empty default, swap them so workflows saved
  by the broken version recover their stack contents on next open.
2026-05-20 23:38:41 -04:00
Mehdi Chaid 2db236a8a8 feat: hide model_family on Stack/Combo when flake_data is connected (#216)
The previous attempt (#204 / 36620bd) only set `widget.hidden = true`,
`widget.type = "hidden"`, and zeroed computeSize. On the modern ComfyUI
frontend these flags are not enough — the canvas-drawn COMBO widget
still renders. Result: the model_family dropdown stayed visible on
FlakeStack and FlakeCombo even when an upstream flake_data pin was
connected.

Detach the widget entirely from node.widgets when the input is
connected (saving its prior index so it can be re-inserted in place
when disconnected) and re-add it on disconnect. Also drop the
DOM-querying `_getFamilyWidgetEl` fallback — it relied on label text
that doesn't exist in canvas-drawn widgets and never worked. Run an
initial sync at setup so loaded workflows hide the widget on open
without waiting for the 200ms poll.

Closes #216
2026-05-20 18:37:10 -04:00
Mehdi Chaid 36620bdebf feat: Hide Model Family dropdown when flake_data input is connected (#204) 2026-05-20 10:09:25 -04:00
Mehdi Chaid 2d1c627045 utils: close other option dropdowns when opening a new one
Add global _registerOpenPanel/_unregisterOpenPanel registry in utils.js.
flake-combo.js and flake-stack.js now register their option panels so
opening one automatically closes any other open panel.
2026-05-19 14:22:49 -04:00
Mehdi Chaid 101110af3a feat: add optional Variant Choice Image field per variant choice (#183)
Each variant choice can now have an optional image (picked from the
ComfyUI input browser) stored as variants.<group>.<choice>.image. The
grid item's cover swaps to that image when the choice is selected on a
Flake Combo or Flake Stack, falling back to the base cover otherwise.
Served via new /flakes/variant_image endpoint resolving from the input
directory or the LoRA tree.
2026-05-15 18:28:44 -04:00
Mehdi Chaid a322726f19 feat: show selected variant choice after flake name on grid (#182)
Adds variantSuffix() helper and a refreshName() per grid item so the
displayed name updates live to 'Name (Choice)' when a variant is
selected via the option dropdown, for both Flake Combo and Flake Stack.
2026-05-15 17:52:08 -04:00
Mehdi Chaid 2ef2c5eb00 fix: close option dropdown menu when clicking outside (#185) 2026-05-15 17:48:28 -04:00
Mehdi Chaid 5c1d70869d fix: remove redundant override button and _pendingData edit-caching (#184)
The Edit overlay already persists flakes to disk via PUT /flakes/save, so
the override button (which called an unimported saveFlakeApi) was both
broken and redundant. Refetch flake data after edit instead of caching it
in _pendingData. The per-instance Output Stem override now lives in a
dedicated _output_stem_override field, read server-side accordingly.
2026-05-15 17:46:53 -04:00
Mehdi Chaid a65c84fc6c fix: invalidate list cache on new flake, fix search, default to extra model path (closes #168, closes #169, closes #170)
#168: Call invalidateList() after handleNew so the load picker sees
newly created flakes without a page refresh.

#169: Pre-fetch the full flat LoRA/checkpoint list on browser open;
use it for search so results aren't limited to the current directory.

#170: Auto-select the last (extra) root path in create mode when
more than one base path is configured.
2026-05-14 18:19:11 -04:00
Mehdi Chaid b31f85ba4a fix: move option dropdown button to bottom edge and reorder panel fields (closes #162, closes #163)
Triangle button repositioned from bottom:30% to bottom:3px so it sits
at the grid item's bottom edge without overlapping hover buttons.
Panel field order changed to: Output Stem → LoRA sliders → Variants.
2026-05-14 15:54:48 -04:00
Mehdi Chaid 8f850de4c6 feat: show display name in Load Existing Flake overlay
Add display_names to /flakes/list API response and use them in the
Load Existing Flake picker to show the flake's display name instead
of the path filename as the grid item label.

Closes #137
2026-05-13 21:20:40 -04:00
Mehdi Chaid 906ca729f7 fix(ui): unify grid item hover overlay across Flake Stack, Flake Combo, and Flake Model Combo
- Extract shared grid item helpers (makeGridItemOverlay, makeHoverButton,
  makeTypeRibbon, makeBypassStrike, svgIcon, TYPE_COLORS) into utils.js
- Fix overlay not covering full item in Flake Stack (was using top/left/
  right/bottom:4px instead of inset:0)
- Fix option dropdown button position inconsistency between Stack and Combo
- Use same hover overlay style (inset:0, border-radius:3px) for all three
- Make hover buttons 50% bigger (33px instead of 22px)
- Make triangle dropdown button 50% bigger (18px font instead of 12px)
- Dark overlay always present (not conditional on hasCover), matching
  Model Combo style

Closes #138
2026-05-13 21:11:19 -04:00
Mehdi Chaid 992969f98f feat: redesign Edit/New Flake overlay top section (#130)
- Make cover image bigger (160x200)
- Rename Output_stem label to Output Stem, move to same row as Display Name
- Remove Model family field from New Flake overlay (inferred from node)
- Put Base field on same row as Flake type dropdown
- Add Concept option to Flake type, convert checkboxes to dropdown
- Put Output Path in its own row with resolved path preview
- Strip img/<model_family> prefix from Output Path input, show full resolved path below
- Make Output Stem editable in grid item options dropdown
- Make triangle button appear on hover (white, visible)
- Add Concept to TYPE_COLORS in grid
- Remove Output Filename Stem from Add flake field dropdown (now in top section)
2026-05-13 16:33:14 -04:00
Mehdi Chaid 51acc08e24 style: change disabled bar to diagonal and brighter
- Rotate bypassed bar from horizontal (-) to diagonal (/) with -30deg
- Increase bar thickness from 2px to 2.5px
- Brighten bar color from rgba(200,60,60,0.7) to rgba(230,90,90,0.85)
- Applied to both flake-stack and flake-combo grid items

Closes #129
2026-05-13 16:19:47 -04:00
Mehdi Chaid 0de72d4bae fix: hover buttons overlap grid item sides and options dropdown not clickable (closes #128)
- Add 4px inset padding to hover button overlay so buttons stay within
  grid item bounds when node size increases
- Raise triangle button z-index from 2 to 4 (above hover buttons at 3)
  so it remains clickable when hover buttons are visible
2026-05-13 16:16:51 -04:00
Mehdi Chaid 84c304dbb2 feat: add bypassed state toggle to Flake Type ribbon
- Clicking the ribbon toggles a flake between active and bypassed states
- Bypassed flakes show greyed out appearance with a red strikethrough line
- Bypassed ribbon is dimmed with click-to-activate tooltip
- Backend (FlakeStack.execute) skips bypassed flakes during processing
- Bypassed state stored as 'bypassed' field in flakes_json entries
- Works in both FlakeStack and FlakeCombo grid items

Closes #121
2026-05-13 12:40:15 -04:00
Mehdi Chaid 6aa6b3d4aa feat: use same SVG icons as Model Preset for Flake Stack grid buttons (#109) 2026-05-13 10:25:39 -04:00
Mehdi Chaid 1cbe049c0e feat: configurable output base path + flake path for flakes (#91)
Mirror the model-preset base-path support on the flake side:

Backend:
- save_flake() now accepts base_root_index, output_path, and old_name,
  using the same semantics as save_preset(). Renames/moves migrate the
  YAML and its cover image.
- /flakes/save now passes those through to save_flake.

Frontend:
- Base Path dropdown + Output Path text field on the flake create AND
  edit overlays (populated from /flakes/roots?type=flakes).
- Path prefill from display name + flake type only fires in create
  mode; edit mode seeds from the existing flake name and treats it
  as user-edited.
- Save call now uses /flakes/save with base_root_index/output_path/
  old_name, and flake-stack.js updates the entry's name if the saved
  canonical name differs (i.e. the flake was moved).
2026-05-12 16:13:45 -04:00
Mehdi Chaid 3cfa7320b2 feat: drag-and-drop reorder on full flake card; remove side handle (#89)
Set draggable on the whole grid item and remove the 3px vertical bar
on the left. Buttons inside the card cancel the drag so clicks on
Replace/Edit/Remove still work, and double-click-to-edit remains
intact (the browser only kicks off a drag after meaningful pointer
movement).
2026-05-12 15:51:35 -04:00
Mehdi Chaid 181637caea feat: Replace/Edit/Remove hover buttons on Flake Stack grid items (#88)
Mirror the Flake Model Preset hover-button pattern: each non-default
flake card shows three centered buttons on hover (Replace, Edit,
Remove). Removes the static top-right ✕. Double-click-to-edit is
preserved; the override (💾) badge stays pinned top-right when the
entry has unsaved in-memory changes. Replace opens the existing load
picker and swaps the entry in place.
2026-05-12 15:50:53 -04:00