Commit Graph
15 Commits
Author SHA1 Message Date
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 478ae8aa73 fix: use STRING output type for sampler/scheduler in FlakeDataSplitSelect (closes #173)
COMBO types (lists) are input-only in ComfyUI — using them as RETURN_TYPES
caused node registration to fail, hiding the node from the Add Node list.
STRING is the correct output type for passing sampler/scheduler values.
2026-05-14 18:19:54 -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 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 29d6a5bf70 fix: use type tuple for sampler/scheduler in _ALL_PINS to match KSampler
Flake Data Split (All) and Flake Data Split (Select) output pins for
sampler_name and scheduler used plain 'SAMPLER'/'SCHEDULER' string types
which did not match KSampler's input type (the actual sampler/scheduler
list tuples). This caused connection validation failures.

Change _ALL_PINS entries for sampler_name and scheduler to use the
_SAMPLER_TYPES tuple values imported from comfy.samplers.KSampler,
so output type keys match KSampler's input types exactly.

Fixes #154
2026-05-14 14:17:24 -04:00
Mehdi Chaid 1e39f1b5a1 fix: remove default values from IntoFlakeDataSelect optional inputs
Widget-only parameters (filename_prefix, width, height, steps, cfg, sampler_name,
scheduler) had default values, causing them to appear as node widgets even when
the input pin is not connected. Removing defaults makes them pin-only — widgets
only appear when the pin is manually added via the selector.
2026-05-14 11:13:59 -04:00
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 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 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 b727ce401f feat: dynamic pin add/remove for Flake Data Split/Into Select nodes 2026-05-13 16:48:30 -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 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 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 74bc0c20a9 feat: add Flake Data converter nodes for consolidated I/O pins (#112) 2026-05-13 10:29:51 -04:00