Nodes/ComfyUI-BerniniR Wrapper/Bernini-R Guidance Strength Schedule
ComfyUI Node

Bernini-R Guidance Strength Schedule

The per-step guidance curve that fixes 'great start, fried ending' video

By xiaolibai-sys·Created 2 months ago·Updated 2 months ago· 9
Bernini-R Guidance Strength Schedule
    • guidance_schedule
    steps20
    curvecosine
    guidance_start7.0
    guidance_end4.0
    hold_start0.05
    hold_end0.20
    guidance_mid5.5
    transition0.40

    A static guidance scale asks every denoising step to be equally obedient, and video generation doesn't work that way. Early steps shape structure and motion; late steps refine detail. BerniniR_GuidanceStrengthSchedule lets you give each step its own guidance ceiling - start hot, ease off, land soft - which is the fix for the classic failure where the beginning of a clip looks great and the detail phase gets overcooked or jittery.

    How it works

    The node builds a per-step guidance curve as a precomputed list, then hands it to the sampler as a BERNINI_GUIDANCE object. The sampler uses each value as that step's guidance ceiling (w_max), overriding the static cfg you set on the sampler. Guidance is applied in noise-residual space, not denoised space - which is a sentence you should remember, because it's the difference between this feature working and your video coming out gray.

    Three curve shapes:

    • cosine (default) - a smooth start-to-end rolloff with flat holds at both ends (hold_start, hold_end).
    • linear - straight line from start to end. Simple, predictable.
    • piecewise - start value, then a switch at transition to a middle value, then the end. For when you want a deliberate plateau.

    The inputs that matter

    • steps - the curve's step count. The tooltip says it auto-resamples to match the sampler's step count if they differ, so you genuinely don't need to keep them in sync. That's a nice quality-of-life detail.
    • guidance_start (7.0) - guidance at the first step.
    • guidance_end (4.0) - guidance at the last step.
    • curve - cosine / linear / piecewise.

    The cosine-only and piecewise-only knobs sit below those:

    • hold_start / hold_end - fractions of steps held flat at each end (cosine only). Default 0.05 / 0.20.
    • guidance_mid / transition - middle segment value and where it kicks in (piecewise only).

    Output and wiring

    One output: guidance_schedule → the guidance_schedule input on BerniniR_KSampler (or the DualExpertSampler). Works alongside BerniniR_GuidanceConfig - the schedule sets how hard at each step, the config sets which guidance method.

    Where people get burned

    This is one of the pack's actual troubleshooting entries. If your output comes out gray, flat, or noisy, the first thing to check is that this node is wired correctly with a sane curve - guidance in noise-residual space is unforgiving of a broken schedule. A common beginner misread: treating guidance_start and guidance_end as absolute values when the sampler also has a cfg. Once the schedule is connected, it overrides static cfg, so don't set both expecting them to interact. And don't go wild with the spread - starting at 7 and ending at 4 is a gentle, effective curve; something like 12 → 0.5 is how you get oscillation. The auto-resample is there so you can tune the shape, not so you can chase the sampler's step count.

    CategoryBernini-R/Sampling

    Inputs (8)

    NameTypeDefaultDescription
    stepsINT201–200Number of steps for the curve. Auto-resampled to match sampler steps if they differ — you don't need to keep them in sync manually.
    curveCOMBOcosine3 options: cosine, linear, piecewise
    guidance_startFLOAT7.00–100Guidance scale at the first denoising step.
    guidance_endFLOAT4.00–100Guidance scale at the last denoising step.
    hold_startFLOAT0.050–0.5Fraction of steps to hold guidance_start flat (cosine only).
    hold_endFLOAT0.200–0.5Fraction of steps to hold guidance_end flat (cosine only).
    guidance_midFLOAT5.50–100Guidance scale in the middle segment (piecewise only).
    transitionFLOAT0.400.05–0.65When to switch from guidance_start to guidance_mid (piecewise only).

    Outputs (1)

    NameTypeDescription
    guidance_scheduleBERNINI_GUIDANCE