Commit Graph
28 Commits
Author SHA1 Message Date
Mehdi Chaid d3460dffdc Fix drag-to-reorder for optional fields in flake edit overlay
- Add proper dragstart/dragover/drop/dragend handlers to field drag handles
- Visual drop indicator shows between fields during drag
- Reorders activeFields array and re-renders on drop

Closes #36
2026-04-28 14:03:56 -04:00
Mehdi Chaid e6ac25c62a Add triangle toggle for URL fields in Preset and LoRA editors
- Model Preset: checkpoint URL hidden by default, toggle with triangle button
  next to Checkpoint label. Blue link icon appears when URL is populated.
- Flake LoRA: replace [...] button with triangle toggle. Header shows LoRA name
  and blue link icon when URL is populated. Full URL no longer shown in header.

Closes #33, closes #34
2026-04-28 14:02:34 -04:00
Mehdi Chaid e18f75df38 Support multiple LoRAs per flake with name, URL, and strength
Backend:
- Add LoraEntry dataclass with name, url, path, strength
- Flake dataclass now has loras[] list; legacy lora_path/strength kept for compat
- _flake_from_raw parses both new multi-LoRA and legacy single-LoRA formats
- resolve() applies multi-LoRA strength overrides from grid entries
- full_flake_node.py applies all LoRAs in order

Frontend:
- Flake edit modal: each LoRA gets its own section with name, URL, path picker,
  strength slider. +Add LoRA button to add more. [...] button edits name/URL.
- Grid dropdown: shows one strength slider per LoRA, labeled with LoRA name
- Grid entries store loras[] array of strengths for overrides
- Backward compatibility: old entries with single strength auto-converted

Closes #30
2026-04-28 13:15:36 -04:00
Mehdi Chaid 46da579d5a Add cover image support for Model Presets
- Backend: add save_preset_cover, read_preset_cover, _preset_cover_path helpers
- Backend: add /flakes/preset_cover GET/POST endpoints
- Frontend: add cover image upload box in preset edit modal
- FlakeModelPreset node: displays preset cover image under the dropdown
- FlakeModelCombo grid items: use preset cover as background with dark overlay

Closes #26
2026-04-28 12:56:13 -04:00
Mehdi Chaid c85bd9e149 Implement Python-backed file browser for correct base paths
- Add /flakes/browse API endpoint that returns directory listings
  filtered by file type (checkpoints, loras, flakes)
- Build custom file browser overlay in JavaScript
- Replace all browser-native file pickers with the Python-backed browser:
  - Checkpoint selection defaults to models/checkpoints/img/
  - LoRA selection defaults to models/loras/img/
  - Load Existing defaults to models/flakes/img/
- Remove unused createFilePicker helper

Closes #29
2026-04-28 12:53:24 -04:00
Mehdi Chaid 99ffab6640 Fix drag indicator position and add rightmost drop target
- Replace inset box-shadow with absolutely positioned indicator at left:-3px
  so the blue line appears in the gap between items rather than on the item
- Add dragover/drop handlers to the Add block for dropping after the last item
- Clear all indicators on drag end

Closes #28
2026-04-28 12:47:39 -04:00
Mehdi Chaid 24e4323265 Fix LoRA strength slider missing in grid dropdown and has_lora detection
- Update has_lora flag after editing/saving a flake (both defaultUpdated and saved cases)
- Update has_lora after overriding pending changes to disk
- Fix incorrect lora_path field name: raw YAML uses 'path', not 'lora_path'

Closes #27
2026-04-28 12:43:53 -04:00
Mehdi Chaid 2a9d475f46 Add checkpoint URL field to Model Preset
- Added checkpoint_url to ModelPreset dataclass and load/save
- Added optional URL input field in the preset edit overlay
- Defaults to empty string

Closes #25
2026-04-28 12:40:39 -04:00
Mehdi Chaid f030f6fe98 Add Output Filename Stem support connected to Save Image filename_prefix
- Model Preset initializes filename prefix with <PresetName>/
- New optional 'Output Filename Stem' field in flakes editor
- FlakeStack collects stems from all flakes and builds prefix:
  - Folder stems (containing '/') are appended to path
  - Date folder <YYYY-MM-DD> inserted after last folder stem
  - Filename starts with <HH-MM-SS> followed by _ separated file stems
- FlakesGenerationData converter outputs filename_prefix as 6th pin

Closes #24
2026-04-28 11:44:52 -04:00
Mehdi Chaid aba0f00ff5 Add file pickers for checkpoint, LoRA, and load existing
- Checkpoint field in preset editor now opens a file picker filtered to .safetensors
- LoRA field in flake editor now opens a file picker filtered to .safetensors
- Load Existing now opens a file picker filtered to .yaml/.yml
- Each picker attempts to map the selected file name back to the backend's full path
- Manual text entry is still available via a small '...' button next to each picker

Note: Browsers do not allow setting the default directory of a file picker for security reasons.

Closes #18, closes #20, closes #22
2026-04-28 11:30:23 -04:00
Mehdi Chaid ce7620656b Add triangle options button and LoRA strength slider to grid items
- Replace inline LoRA slider with a bottom-center triangle button
- Triangle opens a dropdown panel with options and LoRA strength
- LoRA strength slider uses the same comfy styling and allows -10 to 10
- Right-click still opens the same panel
- Changes in the panel do not affect the yaml file

Closes #19
2026-04-28 11:23:53 -04:00
Mehdi Chaid 53328785f8 Fix flake grid drag-and-drop reordering
- Use inset box-shadow instead of inserting an indicator element, preventing items from being pushed during drag preview
- Fix insert index calculation when dragging from before to after target
- Clear box-shadow styles properly on drag end and leave

Closes #16
2026-04-28 11:19:54 -04:00
Mehdi Chaid dfa204e488 Model Preset: Allow editing preset name in edit overlay
- Adds a Preset name field in edit mode
- On rename, saves under new name and deletes the old preset

Closes #12
2026-04-28 11:17:10 -04:00
Mehdi Chaid 6af85d01db Flake editor improvements: remove auto-prompt, widen LoRA range, optional choice prompts
- New flakes no longer auto-add a prompt field (#15)
- LoRA strength sliders now allow -10 to 10 (#14)
- Option choices no longer auto-add positive/negative; use +positive/+negative buttons instead (#21)

Closes #14, closes #15, closes #21
2026-04-28 11:16:01 -04:00
Mehdi Chaid 66f16018d3 Update Model Preset default values: 832x1216, CFG 4, sampler dpmpp_2m
Closes #13
2026-04-28 11:12:48 -04:00
Mehdi Chaid 3795fd2e37 feat: implement frontend queueing for FlakeCombo and FlakeModelCombo 2026-04-27 18:23:50 -04:00
Mehdi Chaid a843597442 feat: redesign flake edit overlay with optional fields, cover image, separate prompts, improved LoRA selector 2026-04-27 17:22:33 -04:00
Mehdi Chaid f15ce907de feat: extract preset UI to FlakeModelPreset widget, update grid with override button, LoRA slider, drag handle, drop indicator 2026-04-27 17:17:36 -04:00
Mehdi Chaid 9763468460 UI fixes 2026-04-26 23:37:17 -04:00
Mehdi Chaid 8495c424d9 new model preset improvements 2026-04-26 22:16:56 -04:00
Mehdi Chaid 443a69a47e fix model preset create button 2026-04-26 19:18:06 -04:00
Mehdi Chaid 4b3a0b7819 model preset 2026-04-26 19:08:11 -04:00
Mehdi Chaid 7c5881c31c Update styling to match comfyUI widgets 2026-04-26 15:17:27 -04:00
Mehdi Chaid 67fd78fb5f Flake packs and preset 2026-04-26 12:38:47 -04:00
Mehdi Chaid 678bb15cfd full flakes 2026-04-26 11:27:44 -04:00
Mehdi Chaid e0220855c7 Improve flake stack 2026-04-25 15:50:55 -04:00
Mehdi Chaid abaf147bf5 Grid UI + on disk write/read of flakes 2026-04-25 15:18:24 -04:00
Mehdi Chaid 6e02eb300d Initial commit 2026-04-25 12:53:38 -04:00