ModelSamplingAdvanced
The shift knob that actually matters on flow-matching models
- model
- model
On Flux, Z-Image, SD3.5 and the rest of the flow-matching crowd, the old game of picking a clever scheduler mostly went away - and shift is where that tuning energy went instead. ModelSamplingAdvanced is RES4LYF's version of the ModelSampling node, and it sets that shift. It decides how sampling effort splits between the big-picture composition (early, high-noise steps) and the fine detail (late, low-noise steps). Get it right and a mushy Flux render snaps into focus; get it wrong and everything's either soft or over-crunched.
If you've used ComfyUI's stock ModelSamplingFlux or ModelSamplingSD3, this is the same idea with the pack's conventions bolted on so it plays nicely with the RES4LYF samplers.
How it works
It patches your model's noise schedule so the effective sigma curve is stretched. A higher shift pushes more of the work into the early, structural part of sampling - good for coherent composition at higher resolutions. Lower shift spends more steps down in the detail range. Nothing is generated here; it's a model patch, so it's cheap and reversible.
The inputs and outputs that matter
Three inputs, one MODEL output that goes straight into your sampler:
model(MODEL) - the model to patch.shift(default3) - the number you'll actually move. This maps to what the README callsshift/max_shifton the ClownsharK sampler. Flux tends to like values in the low single digits; higher resolutions generally want a higher shift. Nudge it, don't yank it - the range goes to 100 but you'll rarely leave single digits.scaling(defaultexponential) - how the shift is applied across the curve.exponentialis Flux's default and usually the better-looking one;linearis the SD3.5/AuraFlow convention and has niche uses. If you're on Flux, leave it exponential.
Output is model (MODEL). Chain it after your LoRA loaders and before the sampler.
How to install it
Via ComfyUI Manager: search RES4LYF, install, restart. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ClownsharkBatwing/RES4LYF
cd RES4LYF
pip install -r requirements.txt
Portable users swap pip for the embedded python_embedded\Scripts\pip.exe. Restart and hard-refresh with F5. No model downloads - it patches the checkpoint you loaded.
Common issues & troubleshooting
Shift seems to do nothing. This is the classic RES4LYF trap, and it's almost never the shift node's fault. Some of the pack's schedulers - bong_tangent is the notorious one - apply their own sigma shift and ignore whatever you set here. If you've got a bong_tangent (or similar) scheduler feeding your sampler, this node's value gets overridden. Swap to beta57 or simple to confirm shift is actually live before you conclude it's broken.
Values above ~6 look wrong. High shift on a low-resolution image starves the detail steps and things go soft or plasticky. Match shift to resolution rather than cranking it blindly.
It's for flow-matching models. On SD 1.5 or an SDXL finetune (Illustrious, Pony, and friends), this isn't the knob - those are DDPM-style and want a proper scheduler like DPM++ 2M Karras. Shift is a flow-matching thing.
Need resolution-aware shift? There's a sibling, ModelSamplingAdvancedResolution, that reads a latent and scales shift to the image size automatically. Reach for that if you generate at lots of different resolutions.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| scaling | COMBO | exponential | 2 options: exponential, linear |
| shift | FLOAT | 3.00-100–100 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |