Nodes/Eric_Krea2/Eric Krea2 Sweep → Preset
ComfyUI Node

Eric Krea2 Sweep → Preset

Turn a sweep winner into a saved preset before it gets away

By EricRollei·Created 2 months ago·Updated about a month ago· 11
Eric Krea2 Sweep → Preset
    • status
    manifest_path
    cell_index0
    preset_name
    save_scopeswept_only
    objective
    append_checkpointtrue

    The whole point of a parameter sweep is that the winning cell becomes your everyday starting point. This node is the "save as preset" step for that loop: it reads a finished sweep's sweep_manifest.json, pulls out the cell you point at, and writes it into ultra_presets.json - the same ★ preset library the Multi-Stage Ultra V2 node's dropdown reads. One queue item from characterization to a saved, reproducible recipe.

    What it saves and how

    The three required inputs are the whole story: manifest_path (wire from Ultra V2's sweep_manifest output, or paste the path), cell_index (the #index shown on the contact-sheet caption, in plan order), and preset_name. Two optional ones matter:

    • save_scope - swept_only saves just the keys the sweep changed (a partial preset that composes over any panel), full_recipe snapshots the entire resolved Ultra section. swept_only is the default and usually what you want: it's a delta, not a fossil.
    • append_checkpoint (default on) tags the name with [checkpoint name], so your preset library stays per-fine-tune by construction. objective is just a free-text tag like fast or quality stored with it for provenance.

    Under the hood it looks the cell up by index, refuses to promote cells that errored (nothing to promote - it raises rather than silently writing garbage), and stashes a _sweep_meta block (checkpoint, objective, sweep id, metrics, time) that's kept for provenance but ignored on apply. The seed is deliberately stripped - a preset should be a recipe, not a rerun of one lucky roll. It returns a status string, so wire it to a display or a log and you get a confirmation line.

    The full sweep → preset chain

    The intended wiring is three nodes in one queue:

    Sweep Plan → Ultra V2 (sweep) → Sweep Auto Pick → Sweep → Preset
    

    Right-click Sweep → Preset's cell_index widget and choose Convert widget to input, then feed it Auto Pick's cell_index output. The picker proposes and explains; this node commits. Metrics never write your preset library on their own - the preset only lands because you queued this node, which is a good safety property to keep in mind if you're tempted to automate the whole thing.

    Install

    Same pack as the rest of the Eric Krea2 family:

    cd ComfyUI/custom_nodes
    git clone https://github.com/EricRollei/Krea2_ComfyUI_Advanced
    

    Restart ComfyUI (or install via ComfyUI Manager, searching the pack title). The pack drives the genuine Hugging Face Krea2Pipeline, so a diffusers build with Krea2Pipeline is required - the README's --force-reinstall install from the HF git repo is the step people skip.

    Gotchas

    Presets land in ultra_presets.json inside the pack folder - they appear in the Ultra V2 preset dropdown after a graph reload, not instantly. If you set cell_index to a cell that's marked error in the manifest, the node raises a clear message; fix the index rather than the preset. And swept_only presets only make sense applied to a panel that shares the swept keys - applying a Stage-1-focused delta to a 3-stage panel does exactly what it says, no more, so pair your sweeps and your base recipes deliberately.

    CategoryEric/Krea2

    Inputs (6)

    NameTypeDefaultDescription
    manifest_pathSTRINGWire from Ultra V2's sweep_manifest output, or paste the path.
    cell_indexINT00–9999The #index shown on the contact-sheet caption (plan order).
    preset_nameSTRING
    save_scopeoptCOMBOswept_only2 options: swept_only, full_recipe
    objectiveoptSTRINGFree-text tag stored with the preset, e.g. 'fast', 'quality'.
    append_checkpointoptBOOLEANtrueAppend ' [checkpoint]' to the preset name - keeps presets per-fine-tune.

    Outputs (1)

    NameTypeDescription
    statusSTRING