Flake Stack
Stack LoRAs, prompts, and ControlNets from one YAML file
- flake_data
- flake_data
Flake Stack is the flagship of the ComfyUI Flakes pack, and it exists to kill the most tedious part of batch work: the LoRA loaders, the prompt concat nodes, the resolution box, and the ControlNet pins that all have to be rewired every time you want a different character or style. Instead of that rat's nest, you keep reusable YAML presets - "flakes" - in ComfyUI/models/flakes/ and stack them on a single flake_data wire. Swap characters, styles, poses, or checkpoints by dragging one item in a grid instead of rewiring half the graph.
Where it sits. The node expects an incoming flake_data bundle - normally from a Flake Model Preset or Flake Model Combo - and hands you an updated flake_data bundle out the other side. Feed that into Flake Generate to render, or into the split nodes if you'd rather drive your own sampler. That's the whole architecture of this pack: one fat wire in, one fat wire out.
How it works. The bundle carries three things: the model trio (model, clip, vae), the generation data (conditioning, latent, resolution, prompt text), and the sampler settings (steps, cfg, sampler, scheduler). Flake Stack takes that bundle and composes your list of flakes on top of it, in order. Each flake's LoRAs get applied to the model with LoraLoader, then its prompt fragments are appended to the text and everything is re-encoded with CLIPTextEncode. Positive fragments from separate flakes are joined with BREAK, so each flake acts as an independent CLIP region - useful when two flakes describe different subjects and you don't want their tags bleeding into each other. The first flake in the stack that declares a resolution wins, and any ControlNets declared in flakes are applied with their start/end percent ranges. It even carries the ControlNet chain forward from upstream nodes so controlnets don't silently vanish when the prompt is re-encoded.
The inputs you actually set. flake_data comes from upstream. model_family (default SDXL/Base) tells the pack which ecosystem you're in - SDXL/Base, Illustrious, Pony, Z-Image, Anima, or Flux/Klein - and drives where outputs land. flakes_json is the JSON list of flake entries, and you almost never type it by hand: the node's grid widget manages it, lets you add new flakes, drag to reorder, toggle them on/off, and tweak variant choices or LoRA strengths per instance without touching the file on disk.
The flake file itself only needs a name. Everything else is optional: prompt (positive/negative), a loras list (path under models/loras/, strength, optional civitai URL), resolution, variants (pick-one-per-group prompt fragments), controlnets (type, model, image, strength, start/end percent), output_stem for the filename, and flake_links to pull other flakes in. A flake's stable identifier is its filename relative to models/flakes/, so characters/musashi.yaml loads as characters/musashi.
Install. ComfyUI Manager → search ComfyUI Flakes → Install, or:
cd ComfyUI/custom_nodes
git clone https://github.com/JeyzerMC/comfyui-flakes
then restart. No extra Python dependencies - requirements.txt is just PyYAML, which ships with ComfyUI core.
Where people get burned. The LoRA path in a flake must resolve to a real file under models/loras/, or you'll get a FileNotFoundError telling you exactly that. ControlNet images need to live in ComfyUI/input/ (subfolders allowed). And if you hand-edit flakes_json instead of using the widget, it has to stay valid JSON - the node raises a clear error otherwise. Beyond that, the usual gotcha is flake hygiene: name files with meaningful paths from the start, because the filename is the identifier and renaming it later breaks every workflow that references it.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model_family | COMBO | SDXL/Base | 7 options: SDXL/Base, SDXL/Illustrious, SDXL/Pony, ZImage/Base, ZImage/Turbo, Anima/Base, +1 |
| flake_data | FLAKE_DATA | — | |
| flakes_json | STRING | [] | JSON-encoded list of flake entries. Managed by the Full Flakes widget. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| flake_data | FLAKE_DATA | — |