Nodes/RES4LYF/ModelSamplingAdvancedResolution
ComfyUI Node Runs on cloud

ModelSamplingAdvancedResolution

Shift that scales with your image size

By ClownsharkBatwing·Created 2 years ago·Updated 21 days ago· 1,222
ModelSamplingAdvancedResolution
  • model
  • latent_image
  • model
scalingexponential
max_shift1.35
base_shift0.85

Same job as ModelSamplingAdvanced - it sets Flux's timestep shift - but this one does the annoying part for you: it reads your latent and scales the shift to the resolution automatically. If you generate at a bunch of different sizes and you're tired of retuning shift every time you change dimensions, this is the node you actually want.

Flux was trained with a resolution-dependent shift, and it matters. A shift that looks great at 1024×1024 is often too low for a 1536-tall portrait - the composition gets loose. Rather than hand-picking a value per resolution, this interpolates between a low-res and high-res shift based on how big the latent is.

How it works

It patches the model's noise schedule like the plain shift node, but instead of one fixed shift it takes two endpoints - base_shift and max_shift - plus your latent. It computes where your image's token count falls between "small" and "large" and blends the two shift values accordingly. This is the same math ComfyUI's stock ModelSamplingFlux uses; RES4LYF just exposes it in the pack's flavor so it lines up with the Shark samplers.

The inputs and outputs that matter

  • model (MODEL) - the model to patch. Output is model (MODEL), into your sampler.
  • latent_image (LATENT) - this is what makes it "resolution" aware. Wire in the same empty latent you're sampling so it can read the size. Change your dimensions and the shift follows.
  • base_shift (default 0.85) - the shift at the low-resolution end.
  • max_shift (default 1.35) - the shift at the high-resolution end. These two defaults are the standard Flux pair; most people never change them.
  • scaling (default exponential) - curve shape, same as the other shift nodes. Exponential is Flux's default; leave it unless you have a reason.

The honest beginner move: leave base_shift, max_shift, and scaling alone, feed it your latent, done.

How to install it

ComfyUI Manager → search RES4LYF → install → restart. Or:

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

Portable ComfyUI uses the embedded pip. Restart and hard-refresh with F5. Nothing to download - it patches your loaded model.

Common issues & troubleshooting

You forgot to wire the latent. Without latent_image connected it can't know your resolution, which defeats the whole point of this node over the plain one. Connect the same latent you feed the sampler.

Shift appears to do nothing. Same trap as every shift node in this pack: bong_tangent and some other RES4LYF schedulers apply their own sigma shift and ignore this one. Test with beta57 or simple before blaming the node.

It's a Flux-shaped tool. The base/max shift pair is Flux's convention. On SD 1.5 or SDXL finetunes this isn't your knob at all - those want a real scheduler, not a shift. Reach for this on flow-matching models.

Plain shift is enough. If you always render at one size, ModelSamplingAdvanced with a single shift is simpler and does the job. The resolution version earns its place only when your dimensions move around.

CategoryRES4LYF/model_shift

Inputs (5)

NameTypeDefaultDescription
modelMODEL
scalingCOMBOexponential2 options: exponential, linear
max_shiftFLOAT1.35-100–100
base_shiftFLOAT0.85-100–100
latent_imageLATENT

Outputs (1)

NameTypeDescription
modelMODEL