Nodes/RES4LYF/ModelTimestepPatcher
ComfyUI Node Runs on cloud

ModelTimestepPatcher

Set the timestep shift for flow-matching models

By ClownsharkBatwing·Created 2 years ago·Updated 18 days ago· 1,222
ModelTimestepPatcher
  • model
  • model
scalingexponential
shift3.00

On a flow-matching model - Flux, Wan, Chroma, SD3.5, Z-Image - the single knob that actually pays off isn't the scheduler anymore, it's shift. ModelTimestepPatcher is RES4LYF's standalone way to set it. You patch the model once and it changes how sampling effort splits between building the composition early and resolving detail late.

That's worth unpacking, because it's the thing that replaced scheduler-tuning when the field moved to flow matching. Old DDPM-style models (SD 1.5, SDXL) had a curved denoising trajectory, so reshaping the noise curve with something like Karras was a genuine correction. Flow-matching models train on a near-straight trajectory - there's much less for a clever schedule to fix, and much more for it to break. What you tune instead is the timestep shift: push it up and the model spends more of its budget on the large-scale layout; pull it down and more goes to fine detail. If you've used ComfyUI's ModelSamplingFlux or ModelSamplingAuraFlow, this is the same value those nodes set. ClownsharkBatwing built RES4LYF specifically around rectified-flow and probability-flow models, so having a clean shift patcher in the pack keeps a whole workflow inside one ecosystem.

How it works

It wraps your model and rewrites how sigmas map to timesteps before sampling. Nothing downstream changes - you just feed the patched MODEL into your sampler instead of the raw one.

The inputs and outputs that matter

Three inputs, all required, and only two you'll really touch:

  • model (MODEL) in, model (MODEL) out - wire the output straight into your sampler.
  • shift (default 3) - the whole point of the node. Higher values bias toward composition, lower toward detail. Model-specific: ComfyUI's own default is 3, but flow-matching checkpoints often want more - Z-Image Turbo, for instance, likes something closer to 7. Start from whatever the model card says, then nudge.
  • scaling (exponential or linear) - how the shift is applied. exponential is Flux's default and usually the better pick; linear is what SD3.5 and AuraFlow use natively and has a few niche cases.

How to install it

The whole pack installs as one unit. Easiest is ComfyUI Manager: open Manager, search RES4LYF, install, restart. Manual is just as fast:

cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
cd RES4LYF
pip install -r requirements.txt

Then restart ComfyUI and hard-refresh the browser (F5, not the small reload button). No model downloads - this node only patches the model already in your graph.

Common issues & troubleshooting

You changed shift and nothing happened. This is the classic RES4LYF trap and it's almost always the scheduler, not this node. Some of the pack's schedulers - bong_tangent is the notorious one - apply their own internal sigma shift and ignore whatever the workflow sets. If shift appears dead, switch to a plain scheduler like beta or simple and confirm it's alive before blaming the patcher.

You're stacking two shift setters. If you already have ModelSamplingFlux/ModelSamplingAuraFlow in the graph, don't also run this - pick one. Two nodes setting the same value just fight each other.

Wrong scaling for the model. If images fall apart when you switch scaling, you probably crossed families: keep exponential for Flux-style models and only reach for linear on SD3.5/AuraFlow where it's the native choice.

CategoryRES4LYF/model_shift

Inputs (3)

NameTypeDefaultDescription
modelMODEL
scalingCOMBOexponential2 options: exponential, linear
shiftFLOAT3.00-100–100

Outputs (1)

NameTypeDescription
modelMODEL