Nodes/ComfyUI_Mira/Steps & Cfg
ComfyUI Node

Steps & Cfg

Bundle two sampler settings into one node

By mirabarukaso·Created 2 years ago·Updated 5 days ago· 206
Steps & Cfg
    • STEPS
    • CFG
    steps30
    cfg7.00

    This node holds your step count and CFG scale together and outputs them as two values you can wire wherever they're needed. It sounds trivial - it is - but the annoyance it solves is real: in a two-pass workflow you set steps and CFG in the first sampler and again in the hi-res pass, and keeping them consistent (or deliberately different) means hunting through nodes. Set them once here, route the outputs to both samplers, and there's one place to change.

    It's a "single source of truth" node for the two settings you tweak most. If you're the kind of person who tunes CFG across a batch or wants your KSampler and your hi-res KSampler locked to the same steps, this saves you from editing the number twice and getting it wrong once.

    How it works

    There's no computation. You type a steps integer and a cfg float into the node, and it outputs them unchanged as STEPS and CFG. The value is purely organizational - it centralizes two numbers so they can fan out to multiple consumers from one widget.

    The inputs that matter

    • steps - sampler step count (default 30). More steps means more refinement up to a point of diminishing returns; anime SDXL checkpoints are typically happy in the 20–30 range.
    • cfg - classifier-free guidance scale (default 7). How hard the sampler follows your prompt: too low and it ignores you, too high and it over-saturates and gets crispy. WAI/Illustrious-family models tend to want a lower CFG than you'd expect - around 5–7 - so if you're used to cranking it, ease off.

    Outputs are STEPS (INT) and CFG (FLOAT), wired straight into any sampler's matching inputs.

    Where it fits

    Drop it upstream of your samplers and route STEPS/CFG to each. In a hi-res-fix pipeline that's the first-pass KSampler and the second-pass KSampler both drawing from this one node - so a single edit re-tunes the whole run. It pairs naturally with the pack's Create Canvas Advanced node, which does the same "set size once, fan out" trick for dimensions; between the two you get a tidy control panel for a two-pass workflow.

    Install

    ComfyUI Manager → Custom Nodes Manager → search ComfyUI_Mira → Install → restart. Or by hand: cd ComfyUI/custom_nodes && git clone https://github.com/mirabarukaso/ComfyUI_Mira.git, then restart. If the pack errors on load, run pip install -r requirements.txt in its folder. No downloads.

    Common issues

    Nothing mechanical goes wrong here - it's two numbers passed through. The only "issue" is settings judgment, and that's on the values, not the node: if images look washed out or over-cooked, your cfg is too high for the checkpoint (drop it toward 5–7 on anime models); if they look undercooked or noisy, add a few steps. Because both fan out from one node, remember a change here hits every sampler you wired it to - which is the feature, but worth keeping in mind if you actually wanted the two passes to differ.

    CategoryMira/Numeral

    Inputs (2)

    NameTypeDefaultDescription
    stepsINT30
    cfgFLOAT7.00

    Outputs (2)

    NameTypeDescription
    STEPSINT
    CFGFLOAT