Commit Graph
9 Commits
Author SHA1 Message Date
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 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 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 babfffc2f1 refactor: rename flake field 'options' to 'variants' (#93)
- YAML: write 'variants:' going forward; reads still accept 'options:'
  as a legacy alias and migrate it on next save.
- Flake.variants dataclass field renamed; entry payload now reads
  'variant' for the per-stack override (legacy 'option' still works).
- UI: button labels (+ variant group), field selector label (Variants),
  empty-state text, alert wording all updated.
- /flakes/meta returns both 'variants' and 'options' keys for one
  transitional release.
- README updated to reflect the new key.
2026-05-12 15:47:24 -04:00
Mehdi Chaid 00f4cf9956 fix: new flakes register under the family-prefixed name (#97)
save_flake() prepends img/<family>/ to the requested name when family
is set, but the API returned the original user-typed path, so the
freshly created grid item pointed at a non-existent name and any
subsequent run errored with FileNotFoundError. Return the resolved
name from the backend and use it for the grid entry.
2026-05-12 15:37:16 -04:00
Mehdi Chaid 41ae1349da fix: stop writing stray top-level path/strength and resolve cover_image to actual image (#100)
- Drop top-level path/strength keys on save when loras[] is present
- Strip them on read so the UI never sees the legacy duplicate
- Resolve LoRA-derived covers to the sibling image path on save so YAML
  never stores a .safetensors path under cover_image
- Backend cover lookup keeps fall-through support for legacy YAMLs that
  still point at a .safetensors weight
2026-05-12 15:33:22 -04:00
Mehdi Chaid b5fdf63cdb feat(flake-modal): default cover image from first LoRA's sibling (#63)
When the user selects a LoRA on a flake and no cover has been picked
yet, fetch the LoRA's sibling image (same basename, .png/.jpg/.webp/...)
from models/loras/ and use it as the flake's default cover.

Triggers from all three LoRA selection paths (file browser, dropdown
change, dropdown blur) but only for the first LoRA on the flake, and
only when no cover file has been chosen by the user. Adds a server
endpoint /flakes/lora_sibling_image mirroring the existing checkpoint
sibling endpoint, with a shared helper.
2026-05-05 16:29:51 -04:00
Mehdi Chaid 8754e7556c feat: add model family selection with flakes and presets filtering (#62) 2026-05-04 15:42:33 -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