Commit Graph
162 Commits
Author SHA1 Message Date
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 9f9a2a446a feat: show output image path as read-only field below generated image (#186)
Adds a read-only monospace field under the Flake Generate image showing
the path relative to ComfyUI's outputs/ folder (subfolder/filename).
Refactors image display into shared showImage/clearImage helpers.
2026-05-15 19:18:56 -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 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 3ec644a18b fix: rebuild preview from graph on configure to keep Inputs button active after refresh (#176) 2026-05-15 11:42:39 -04:00
Mehdi Chaid 06847f8713 fix: remove overflow:hidden from FlakeCombo block clipping the options panel (#175) 2026-05-15 11:39:53 -04:00
Mehdi Chaid 82e70abd5a feat: merge 4 preview buttons into 2 (Models + Inputs) with full upstream chain data (closes #166, closes #167)
Reduce preview buttons from 4 to 2 in both FlakeGenerate and PreviewFlakeData:
- Models: checkpoint, VAE, text encoder, LoRAs with strengths, width, height,
  steps, CFG, sampler, scheduler
- Inputs: prompts grouped by source with selected variants + ControlNet info

Static preview (before generation) now walks the full upstream chain:
FlakeModelPreset → FlakeStack(s)/FlakeCombos → FlakeGenerate, fetching
preset and flake configs from the API to populate both panels.
2026-05-14 18:24:00 -04:00
Mehdi Chaid f0d6205ce7 fix: hide optional field widgets in IntoFlakeDataSelect and improve dropdown style (closes #172)
Auto-created ComfyUI widgets for optional numeric/string fields
(filename_prefix, width, height, steps, cfg, sampler_name, scheduler)
are now hidden on setup — they only appear as input pins when the user
explicitly adds them via the [+] button.

Dropdown appearance updated to use appearance:auto for closer match
to native ComfyUI COMBO widget style.
2026-05-14 18:21:44 -04:00
Mehdi Chaid 9c0dbd416e feat: cover image fills node width and scales with node resize (closes #174)
Remove max-width:200px constraint and add computeSize that derives image
height from node width at a 2:3 aspect ratio so the cover scales when
the node is resized.
2026-05-14 18:20:40 -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 0bc7720214 fix: rewrite FlakeDataSplitSelect and IntoFlakeDataSelect nodes (closes #164, closes #165)
FlakeDataSplitSelect (#164):
- Remove 'selected_pins' STRING from Python INPUT_TYPES (was causing node load failure)
- Store pin selection purely in node.properties._split_pins
- Rewrite JS widget with attached-button dropdown style

IntoFlakeDataSelect (#165):
- Remove all optional fields from Python INPUT_TYPES; use None-sentinel pattern
  so only connected inputs override the original flake_data
- JS now uses node.addInput/removeInput for dynamic pins — no default pins,
  no hidden widget fields interfering with click events
- Dropdown styled as select + attached button (matching Load Image node)
- Chips show active pins with x to remove
2026-05-14 15:58:31 -04:00
Mehdi Chaid 8fda21e4bb feat: improve Edit/Create overlay layout for Base Directory and Flake Type fields (closes #161)
- Rename 'Base' to 'Base Directory' and expand to full width (flex:1, same as Display name)
- Reduce Flake Type to fixed 140px width (same as Output Stem)
- Show abbreviated full path in Base Directory dropdown options instead of just drive letter
2026-05-14 15:55:35 -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 0d07a6d277 feat: preview buttons open popup modal and activate on flake_data connect (closes #158, closes #159)
Replace inline absolute overlay with full-page modal via openOverlay().
Add onConnectionsChange hook that walks upstream FlakeStack nodes,
fetches flake configs from the API, and populates preview data so
buttons are clickable before any generation is run.
2026-05-14 15:53:35 -04:00
Mehdi Chaid 459a6a54c3 fix: prevent duplicate image display in FlakeGenerate node (closes #160)
Rename 'images' key to 'flake_images' in UI output so ComfyUI's default
image renderer is not triggered. The custom JS widget reads 'flake_images'
directly, so only one image is shown.
2026-05-14 15:47:55 -04:00
Mehdi Chaid ad2929a80c fix: redesign FlakeDataSplitSelect and IntoFlakeDataSelect pin management
FlakeDataSplitSelect could not be added to workflow because removeInitialPins
called node.removeOutput/addOutput which could fail during node creation.
Switch to applyPinVisibility (hide/show existing pin slots) instead of
dynamically removing/adding pins, which is safer and avoids the crash.

IntoFlakeDataSelect: hide widget-type fields (filename_prefex, width, height,
steps, cfg, sampler_name, scheduler) by default; show them as label + widget
rows only when added via dropdown. Redesign [+] button with neutral Load Image
style styling and add hover effect. Remove dedicated [-] button since chips
have individual delete (x) buttons. For widget-type pins, display inline
label + input widget instead of a square input pin.

Fixes #152, Fixes #153
2026-05-14 14:17:52 -04:00
Mehdi Chaid dead12ca45 fix: pass correct model family and default path in preset selector and edit modals 2026-05-14 14:10:53 -04:00
Mehdi Chaid 85c758ca0e fix: ensure hover buttons stay square with overflow hidden and line-height 1 2026-05-14 14:10:11 -04:00
Mehdi Chaid 23ff16ae3a fix: raise triangle button z-index above hover wrap overlay 2026-05-14 14:09:43 -04:00
Mehdi Chaid 2073d5dcf7 fix: move block-scoped declarations to function scope in edit overlay 2026-05-14 14:09:23 -04:00
Mehdi Chaid 66727b4a58 fix: shrink hover buttons, add padding, fix option dropdown triangle
- Reduce HOVER_BTN_SIZE from 33 to 26 and add 4px padding to hoverWrap
- Replace display:none with opacity:0 on triangle, bright white, 30% larger
- Shift triangle 30% from bottom, add pointer-events:auto for clickability
2026-05-14 11:17:13 -04:00
Mehdi Chaid ebf0e5d924 fix: realign full path label below Base/Cover in preset and flake modals
Preset modal: resolved path was inside Output path column, now spans below Base.
Flake modal: resolved path was inside path row (cut by cover image), now below Cover.
2026-05-14 11:16:36 -04:00
Mehdi Chaid 28d7e8f2fe fix: handle both output shapes in PreviewFlakeData onExecuted
Support output.preview_data and output.ui.preview_data to be robust against
different ComfyUI frontend versions.
2026-05-14 11:15:46 -04:00
Mehdi Chaid b9c82af501 fix: constrain overlay width and remove Model family from Preset overlays
- Set fixed 680px width on overlay panel to prevent horizontal expansion
  when typing in text fields
- Remove Model family dropdown from Preset create and edit overlays;
  family is now inferred from the Flake Model Preset node selection
2026-05-14 11:10:21 -04:00
Mehdi Chaid 2f02ce0a43 feat: use native ComfyUI seed widget for Flake Generate node
Remove custom seed row from JS widget and stop hiding the native seed
widget, allowing ComfyUI's built-in seed control (with control_after_generate
toggle) to render directly. Move preview grid and image display below the
native seed widget.
2026-05-14 11:08:29 -04:00
Mehdi Chaid 8fb97a3626 fix: export DEFAULT_SPLIT_PINS and DEFAULT_INTO_PINS constants
These were declared with const but imported as named exports by
flake_stack.js, causing a module load error that prevented the entire
extension from registering. All custom DOM widgets (FlakeStack grid,
FlakeModelPreset cover image, FlakeCombo, etc.) were silently disabled.
2026-05-14 10:32:22 -04:00
Mehdi Chaid 6e2fe634db feat: add Flake Generate node - KSampler + VAE Decode + Save Image wrapper (#141)
Creates FlakeGenerate node that takes flake_data input, runs KSampler, VAE Decode, and SaveImage internally. Displays seed widget with randomize/increment/decrement controls, 2x2 preview grid (reusing flake-preview.js), and generated image preview in a single DOM widget.
2026-05-14 10:12:27 -04:00
Mehdi Chaid c346e0cad5 feat: improve model preset output path and add filename prefix
- Remove model_family folder prefix from auto-generated output path
- Auto-fill filename prefix from preset display name
- Add read-only resolved path label below output path
- Strip path prefix when editing existing presets
- Include filename_prefix in save payload
2026-05-14 09:36:58 -04:00
Mehdi Chaid fb039296ab feat: show preset display name in Select a Preset overlay
Add list_preset_display_names to flake_io.py and return display_names
from the /flakes/presets API endpoint. Use the display name (falling
back to last path segment) in the preset picker grid thumbnails.
2026-05-14 09:36:17 -04:00
Mehdi Chaid 9b0d572896 feat: single-click to edit numerical slider values
Change the makeComfySlider widget from double-click to single-click for
entering input mode, and prevent input mode after a drag interaction.
2026-05-14 09:35:33 -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 cba2916cfa fix(ui): dynamic pin add/remove for Flake Data Split/Into Select nodes
- Replace hide/show visibility approach with dynamic addOutput/removeOutput
  and addInput/removeInput for proper pin management
- On node creation, remove all default pins and add only selected ones
- On workflow load (onConfigure), clear all dynamic pins and rebuild from
  saved properties
- Remove OUTPUT_NODE from FlakeDataSplitSelect (not an output node)
- Add pin selector UI with +/- buttons that dynamically adds/removes pins
- Export DEFAULT_SPLIT_PINS and DEFAULT_INTO_PINS for use in onConfigure

Closes #139
2026-05-13 21:16:22 -04:00
Mehdi Chaid 122c50d174 fix: implement Preview Flake Data with 2x2 grid and click-to-view overlays 2026-05-13 21:13:51 -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 e8a0dfac35 fix(edit-overlay): move baseRootSelectRef declaration before first use to fix TDZ error
The edit overlay was broken because baseRootSelectRef was assigned on
line 85 but declared with let on line 219, causing a ReferenceError due
to the temporal dead zone. This made the overlay render only the title.

Closes #136
2026-05-13 17:46:16 -04:00
Mehdi Chaid b727ce401f feat: dynamic pin add/remove for Flake Data Split/Into Select nodes 2026-05-13 16:48:30 -04:00
Mehdi Chaid 1d8ff68929 feat: controlnet type dropdown, input image file selector, auto cover image (#131)
- Make controlnet type a dropdown listing available types (openpose, depth, canny, etc.)
- Replace input image text field with file selector (left side) with image preview
- Redesign CN card layout: image preview on left, type/model/sliders on right
- Add labeled sliders (Str, Start, End) for controlnet
- Auto-set cover image from first controlnet input image if no cover exists
- Add /flakes/cn_types endpoint for listing controlnet types
- Add 'inputs' browse type for file picker to select input images
- Add fetchCnTypes API function
2026-05-13 16:38:39 -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 0cea67f912 style: reduce prompts section height
- Reduce textarea rows from 5 to 3 and min-height from 100px to 78px
  for both positive and negative prompt fields so the preset page fits
  in view without scrolling

Closes #125
2026-05-13 16:19:23 -04:00
Mehdi Chaid 55d9a0c5fe style: tweak numerical slider button sizing and input mode behavior
- Narrow -/+ buttons from 28px to 22px (value span flexes to fill)
- Replace click-to-input with double-click contentEditable so slider
  layout stays identical regardless of interaction state
- Reduce top margin between Numerical Sliders and previous section

Closes #123
2026-05-13 16:18:49 -04:00
Mehdi Chaid 1cf16ca563 fix: model section layout — align arrow/icon, remove [...] button, swap sampler and text encoder 2026-05-13 16:17:25 -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 b35b08fd85 fix: replace browser datalist with custom dropdown for searchable fields (closes #126)
- Add dropdown arrow button to searchable fields (VAE, Text Encoder, embeddings)
- Fix dropdown positioning by using a custom dropdown panel positioned
  directly below the input field instead of browser-native datalist
- Show dropdown on focus, arrow click, and double-click
- Backward-compatible datalist proxy for dynamic option population
2026-05-13 16:16:11 -04:00
Mehdi Chaid d798761722 feat: use consistent slider control for all numeric fields in preset edit overlay
Replace makeComfyNumberInput (Width/Height) and makeComfyValueSlider (ClipSkip/Steps/CFG) with makeComfySlider across all five fields. This gives consistent center-aligned values, minus/plus buttons on every field, and fixed box sizing when editing.
2026-05-13 12:50:05 -04:00