Commit Graph
152 Commits
Author SHA1 Message Date
Mehdi Chaid 9c11b8e33e fix: use valid string types for sampler/scheduler in _ALL_PINS
Fix FlakeDataSplitSelect not creatable: _ALL_PINS used _SAMPLER_TYPES[0] and [1]
which are tuples/lists when comfy.samplers imports successfully, not valid
RETURN_TYPES strings. Use plain 'SAMPLER'/'SCHEDULER' type names instead.
2026-05-14 11:13:10 -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
Mehdi Chaid c106775e67 feat: navigate to current model family folder by default in Select Preset picker
When opening the preset picker, set the initial folder to the family-specific subfolder (e.g. 'illustrious' for SDXL/Illustrious) instead of the root model_presets/ directory.
2026-05-13 12:47:44 -04:00
Mehdi Chaid f02d0d4192 feat: move sampler and scheduler under VAE/Text Encoder in preset edit overlay
Move sampler/scheduler dropdowns from a separate row below the number fields to inside the checkpoint column, below the VAE/Text Encoder row and to the left of the cover image. Reduce dropdown max-width for a more compact layout.
2026-05-13 12:46:56 -04:00
Mehdi Chaid 2390c94654 feat: add Preview Flake Data node with 4-item info grid
- Python backend: new PreviewFlakeData class that takes FLAKE_DATA input
  and passes it through unchanged, marked as OUTPUT_NODE for execution
- JavaScript frontend: custom widget showing a 2x2 grid with Models,
  Prompts, Parameters, and Metadata categories
- Clicking a category card opens an overlay with consolidated information
- Handles combo node scenarios by displaying all available data fields
- Registers the new node in __init__.py NODE_CLASS_MAPPINGS

Closes #122
2026-05-13 12:42:54 -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 d66c21b320 feat: align combo node styling and behavior with flake stack nodes
- Remove persistent [x] button, replace with hover Replace/Edit/Remove buttons
- Remove green border circling and upper-left check button for active state
- Use subtle blue accent border to indicate active combo item
- Add Flake Type ribbon to combo grid items
- Add double-click to edit on combo items
- Make combo grid items draggable/reorderable
- Add option dropdown (triangle button) with LoRA strength and variant controls
- Use full display name with word wrapping (matching flake stack logic)
- Fetch and cache display names for model combo presets

Closes #120
2026-05-13 12:36:49 -04:00
Mehdi Chaid 3d15d895f2 feat: redesign Flake Data Split/Into Select nodes with dynamic pin selector
Replace yes/no group toggles on FlakeDataSplitSelect with a dropdown + +/- button
UI for individually adding/removing output pins. Similarly, redesign
IntoFlakeDataSelect to use dynamic input pins instead of FLAKES_MODEL/COND/SAMPLER
bundle types, allowing override of individual fields from an incoming FLAKE_DATA.

- Python: Add selected_pins/active_pins hidden STRING widgets for state tracking
- Python: IntoFlakeDataSelect now takes individual optional inputs (MODEL, CLIP,
  VAE, etc.) and overrides only activated pins from the incoming FLAKE_DATA
- JS: Add flake-data-select.js with pin selector dropdown + button widgets
- JS: Register handlers for FlakeDataSplitSelect and IntoFlakeDataSelect nodes
- JS: Show/hide outputs and inputs based on selected pin state

Closes #119
2026-05-13 12:32:11 -04:00
Mehdi Chaid a5b5562ba1 fix: restore missing variable declarations in flake edit overlay
The refactor in commit 7276cae accidentally removed let/const declarations
for pathInput, familyDropdown, selectedType, typeChecks, and FAMILY_OPTIONS.
In ES module strict mode, these implicit global assignments throw
ReferenceError, causing the edit overlay to render only the title before
crashing.
2026-05-13 12:14:02 -04:00
Mehdi Chaid 72e784ae0c fix: remove duplicate entries in VAE and text encoder dropdowns
The _shorten_filenames function was adding both the full filename and the
stem (without extension) to dropdown lists, causing models like VAEs and
text encoders to appear twice (e.g. 'ae' and 'ae.safetensors'). Now only
the stem is returned.

Backend resolution helpers (_resolve_model_name) are added to translate
stem-only names back to full filenames when loading checkpoin/vae/
text_encoder/controlnet models, ensuring backwards compatibility with
existing YAML files that store full filenames.
2026-05-13 12:01:48 -04:00
Mehdi Chaid dfb0411819 refactor: replace 3-pin model_bundle/generation_data/sampling_preset with single flake_data pin (#112)
- FlakeModelPreset now outputs a single FLAKE_DATA pin
- FlakeStack now takes and returns a single FLAKE_DATA pin
- FlakeDataSplit(All/Select) now output all 12 individual types directly
- IntoFlakeData(All/Select) now take individual Comfy types as optional inputs
- Removed FlakesModel, FlakesCond, FlakesSampler (replaced by FlakeDataSplitAll)
- Removed flake_unpack_nodes.py entirely
2026-05-13 11:04:42 -04:00
Mehdi Chaid ddf8997723 feat: unify path field naming and remove autocomplete listing (#113) 2026-05-13 10:30:55 -04:00
Mehdi Chaid 74bc0c20a9 feat: add Flake Data converter nodes for consolidated I/O pins (#112) 2026-05-13 10:29:51 -04:00
Mehdi Chaid 7276caeeef feat: put display name and model family on same line, larger cover image in flake edit (#111) 2026-05-13 10:27:56 -04:00
Mehdi Chaid 66fa28f2dd feat: put output base path and path on same line in flake edit modal (#110) 2026-05-13 10:26:40 -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 867c1f2eb9 feat: put positive and negative embeddings on same line in preset modal (#107) 2026-05-13 10:23:23 -04:00
Mehdi Chaid 55f197b0fa feat: fit all numerical sliders on one line in preset modal (#106) 2026-05-13 10:22:29 -04:00
Mehdi Chaid 577efe9f32 feat: redesign checkpoint area with cover image, VAE, and text encoder in preset modal (#105) 2026-05-13 10:21:05 -04:00
Mehdi Chaid 06b572b334 feat: put preset name and model family on same line (#104) 2026-05-13 10:14:18 -04:00
Mehdi Chaid 507b857729 feat: put output base path and output path on same line in preset modal (#103) 2026-05-13 10:13:28 -04:00
Mehdi Chaid cfe9a2a458 feat: display only preset display_name on node, not output path (#102) 2026-05-13 10:11:19 -04:00
Mehdi Chaid 22c86d66e7 fix: show folder structure in Select Preset overlay (#108) 2026-05-13 10:09:58 -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 62c60d8226 feat: configurable output base path + output path for model presets (#83)
Backend:
- /flakes/roots?type=model_presets exposes registered roots so the UI
  can label Default vs Extra base paths.
- save_preset() now accepts base_root_index (which root to write to)
  and output_path (relative location under that root), and old_name
  (so renames/moves migrate the YAML and its cover image cleanly).
- Returns the canonical saved name so the UI can register the new
  preset under the actual on-disk path.
- ModelPreset gained a display_name field stored alongside the YAML.

Frontend:
- New Base Path dropdown and Output Path text field on the create/edit
  preset overlay. Output path auto-prefills from family_folder/preset_name
  (snake-cased) until the user types in it.
- Preset name input is now a display name; the file path is independent.
- Edit mode passes old_name so the backend moves the YAML when the
  user changes either the base path or the output path.
2026-05-12 16:10:47 -04:00
Mehdi Chaid 23766dddac feat: display Clip Skip as a positive value (CivitAI convention) (#86)
Slider now ranges 1..24 and shows the absolute value. On save we
negate it before writing so CLIPSetLastLayer keeps receiving the
expected negative index. Existing YAMLs with negative clip_skip
values still display correctly via Math.abs on load.
2026-05-12 15:58:08 -04:00
Mehdi Chaid 36eef539dc feat: place Checkpoint and Cover Image on the same row in preset modal (#87)
Wrap the checkpoint label/URL toggle/dropdown/edit button into a left
column and the cover-image preview into a right column inside a flex
row so they sit side-by-side instead of stacking vertically. Shrunk
the cover box to 100x100 so it fits next to the checkpoint controls.
2026-05-12 15:55:58 -04:00
Mehdi Chaid ea4177b572 fix: render Select Preset and Create Preset labels on a single line (#101)
Drop flex-direction: column on the placeholder buttons and add
white-space: nowrap so both labels stay on one line, matching.
2026-05-12 15:52:31 -04:00
Mehdi Chaid 46dd9bae65 feat: double-click model preset cover to open edit overlay (#84) 2026-05-12 15:52:17 -04:00