Nodes/ComfyUI Flakes/Flake Model Preset
ComfyUI Node

Flake Model Preset

Model, VAE, prompts, sampler, resolution

By JeyzerMC·Created 4 months ago·Updated 2 months ago· 1
Flake Model Preset
    • flake_data
    model_familySDXL/Base
    preset
    overrides_json

    A model preset is the "base layer" of the Flakes ecosystem: everything about how a checkpoint gets loaded and sampled, captured in one YAML file that you can reuse, swap, and share. Where a flake is a character or a style, a model preset is the checkpoint itself - the file, the VAE, the clip skip, the default resolution, the sampler settings, even baked-in prompt text if you want a default subject. It's the thing you'd otherwise rebuild by hand every time you switch bases.

    Flake Model Preset loads one of those presets and hands you a single flake_data pin, ready to wire into Flake Stack, Flake Combo, or straight into Flake Generate. Presets live in ComfyUI/models/flakes/model_presets/ as YAML. The fields that matter: checkpoint (path under models/checkpoints/), optional vae and text_encoder overrides, clip_skip (defaults to -2, shown positive CivitAI-style in the UI), steps (20), cfg (4.0), sampler (dpmpp_2m), scheduler (karras), width/height (832×1216), and a filename_prefix. If you leave the VAE and text encoder out, it uses what's baked into the checkpoint.

    How it works, under the hood. The node resolves the checkpoint, loads it with load_checkpoint_guess_config, applies clip skip by cloning the CLIP and setting its layer, swaps in the optional VAE or text encoder if you provided one, encodes the preset's positive and negative prompts, and builds an empty latent at the preset resolution. Then it bundles all of that with the sampler settings into flake_data. The interesting bit: the node's IS_CHANGED is keyed on the preset file's modification time, so editing a preset on disk re-runs the node on the next queue - no restart, no cache headaches. That's a small thing that saves a lot of friction.

    The inputs. model_family (default SDXL/Base) tells the pack which ecosystem you're in - SDXL/Base, Illustrious, Pony, Z-Image, Anima, or Flux/Klein - and the model preset output folder is derived from it (output/img/<family>/...). preset is the dropdown of every preset file it finds; it'll say "Select a preset..." until you create one. And overrides_json lets you override steps/cfg/sampler/scheduler/filename_prefix per-instance without editing the file - the widget manages it, and it's exactly what you want when you're A/B-testing a sampler on the same checkpoint. Empty fields in the override JSON are ignored, so the preset's own values pass through.

    Install. ComfyUI Manager → search ComfyUI Flakes → Install, or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/JeyzerMC/comfyui-flakes
    

    then restart. PyYAML is the only dependency and ComfyUI already ships it.

    The honest caveats. Model presets are currently SDXL-first - the README says so plainly, and the other model families in the dropdown are groundwork rather than fully-tested paths. And the preset dropdown only helps once you have presets; there's no sample file bundled, so you'll create your first one via the edit UI. If the node throws a FileNotFoundError about a checkpoint, the file named in your preset isn't where the pack expects it under models/checkpoints/ - fix the path in the YAML, not the node.

    Categoryflakes

    Inputs (3)

    NameTypeDefaultDescription
    model_familyCOMBOSDXL/Base7 options: SDXL/Base, SDXL/Illustrious, SDXL/Pony, ZImage/Base, ZImage/Turbo, Anima/Base, +1
    presetCOMBO2 options: Select a preset..., No model preset is selected
    overrides_jsonoptSTRINGJSON override of steps/cfg/sampler/scheduler/filename_prefix. Managed by the Flake widget.

    Outputs (1)

    NameTypeDescription
    flake_dataFLAKE_DATA