ComfyUI Node

⚓ Capitan Shift

Your flow model's shift knob, without the training wheels

By capitan01R·Created 8 months ago·Updated 6 months ago· 34
⚓ Capitan Shift
    • SIGMAS
    steps20
    shift3.0

    The Presets node in this pack hands you a dropdown and says "trust me." Capitan Shift is for when you'd rather understand the knob. It takes two numbers - steps and shift - and turns them into the sigma schedule your flow model samples along. If you've ever wanted to know why a setting works instead of just accepting it, this is the node you'll reach for.

    Two inputs, one output

    • steps - INT, default 20, range 1–10000.
    • shift - FLOAT, default 3.0, range 0.1–20.0.
    • Output: sigmas (SIGMAS), which feeds SamplerCustom.

    Mechanically, it's simple. The node builds steps + 1 evenly spaced timesteps from 1.0 down to 0.0, then applies the standard flow-matching shift formula:

    sigmas = shift * t / (1 + (shift - 1) * t)
    

    At shift 1.0 this collapses to a plain linear schedule - literally the same thing CapitanLinear outputs. As shift climbs, the schedule lingers at high noise longer, so more of your steps are spent establishing composition before detail gets nailed down. That's the whole story: shift 2.0 is light and fast, 3.0 is the balanced default, 6.0 is the quality sweet spot for Z-Image-Turbo's hidden 36-step mode.

    Why use it instead of the presets

    Three honest reasons. Your model might not be in the preset list yet - the dropdown covers Lumina2, Flux, SD3, and Z-Image-Turbo, and nothing else. You might want a value the presets don't offer, like shift 4.5 instead of a jump from 3.0 to 6.0. Or you're experimenting: because the shift is baked into the sigmas here, you can A/B shift values without touching your model node or any separate scheduler node. Same steps, same sampler, just change one number and compare.

    Wiring and the samplers

    Same wiring as its sibling: sigmas into SamplerCustom's sigmas port, and capitan_flowmatch selected via KSamplerSelect into the sampler input. If you wire into a KSampler instead, the sigmas won't apply - KSampler builds its own schedule.

    And a word about that sampler you're about to select: the three samplers this pack registers are all the same first-order Euler-style integration of the flow ODE, and the "advanced" variant is mathematically identical to the flagship. That's fine. On a near-straight flow trajectory, plain Euler on a conservative shifted schedule is a genuinely good choice. The schedule is the part doing the work; the sampler is just along for the ride.

    Troubleshooting

    • Shift seems to do nothing. Check what's downstream. If your sigmas aren't reaching SamplerCustom, or a custom scheduler in your graph applies its own shift and overrides yours, you'll see zero effect - some schedulers in packs like RES4LYF do exactly that. Feed the sigmas straight into SamplerCustom and sanity-check with shift 1.0 versus 6.0.
    • Defaults are a fine starting point. 20 steps / shift 3.0 matches the "Balanced" tier of the presets, which suits Flux and Lumina2. For Z-Image-Turbo quality you want 36 / 6.0. The README has the full recommended-settings table per model.
    • Burning or washed-out output. That's usually too much CFG or an aggressive scheduler, not the shift. Flow models are guidance-distilled; keep CFG at the model's recommendation.

    Install

    ComfyUI Manager → search ComfyUI-CapitanFlowMatch → install, restart. Or:

    cd ComfyUI/custom_nodes
    git clone https://github.com/capitan01R/ComfyUI-CapitanFlowMatch
    

    Then restart. One install covers Capitan Shift, Capitan Presets, and Capitan Linear, plus the samplers. No models to download, no pip dependencies.

    Categorysampling/custom_sampling/schedulers

    Inputs (2)

    NameTypeDefaultDescription
    stepsINT201–10000
    shiftFLOAT3.00.1–20

    Outputs (1)

    NameTypeDescription
    SIGMASSIGMAS