ComfyUI Node Runs on cloud

Flow Shift

The dial that decides whether your big render gets layout or detail

By WASasquatch·Created 4 years ago·Updated about 9 hours ago· 1,884
Flow Shift
  • model
  • model
◄shift0.00►
◄resolution▾►

Every flow model - FLUX, SD3, FLUX 3 Image Klein, MOSS-Image - has a shift value baked into how it walks from noise to picture. It's the thing that decides whether your 20 steps go into getting the composition right or into sharpening the eyelashes. Flow Shift is a one-job node that sets that value, optionally grown with the size of the canvas you're rendering.

Why you'd want it

Since SD3, models predict a velocity along a near-straight path from noise to data rather than subtracting noise off a curved schedule. That straightness is why steps dropped from 30 to 4–8. It also means there's no clever noise schedule left to fix a big canvas - the one lever you have is where along that path the steps land, and on a flow model that lever is the shift. More shift spends steps on layout; less spends them on detail. At 1025px that barely matters. At 2–4 megapixels, or 21:9, it's the difference between a well-composed frame full of mush and a bland frame with beautiful texture.

The other reason to reach for this node instead of the shift widget in a stock sampler: it can scale itself with resolution, which is what the SD3 paper's resolution rule did and what you'd otherwise be doing by feel.

What it actually does

The node clones the model and swaps out its model_sampling object for a shifted one. Flux-family models get ModelSamplingFlux with the shift written as a log, SD3-style flow models get ModelSamplingDiscreteFlow with the shift as a plain factor. If the value you set already matches what the model samples with, it hands the original model straight back - no copy, no cost.

That's the whole trick, and it's why the shift is not applied by the node in the traditional sense. It changes the curve the sampler reads.

The three inputs that matter

model takes the MODEL wire - straight from Load Diffusion Model, or from a LoRA loader, Block Restore, whatever you have upstream.

shift is the factor. Zero means "leave the model's own alone", which resolves to 6.93 on Flux 3 Klein and 5 on MOSS-Image. The tooltip's guidance is the useful part: 3 pushes steps toward detail, 12 pushes them toward layout.

resolution is a two-option menu. fixed uses the shift exactly as typed. scaled reveals width and height and multiplies the shift by the square root of area over 1024×1024 - so MOSS-Image's 5 becomes 7.1 at 1088×1856. On a wide 2 MP canvas this saves you recalculating anything.

One output, model, and it goes wherever the model was going: KSampler, SamplerCustom, or the next patch in the chain.

Installing it

It's in WAS Node Suite v3. ComfyUI Manager, search WAS Node Suite v3, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/WASasquatch/was-node-suite-comfyui.git

Needs ComfyUI 0.14.0+ and Python 3.10+. Nothing gets pip-installed, no models are downloaded, and the pack makes no outbound requests. Worth saying out loud, because searching for this pack turns up a pile of 2024 threads about import failures and opencv version fights - that was v2, which installed about twenty packages and broke whenever ComfyUI bumped something under it. v3 doesn't do that.

Where it goes wrong

The shift appears to do nothing. Nine times out of ten it's the scheduler, not the node. Shift only moves steps under schedulers that read the model's curve - simple, and the pack's own shifted_tangent. Pick sgm_uniform, karras, exponential or normal and you're reading a fixed table that never asks the model anything. Change the scheduler before you touch anything else.

"This model samples with ModelSamplingDiscrete, which has no shift to set." You wired an SD1.5 or SDXL checkpoint in. Correct behaviour - those aren't flow models. Take the node out.

It fights the tiled patch if you wire it after. With a Tiled Diffusion Model Patch downstream, the patch joins the shifted curve back onto the model's own at start_percent, so the new shift lays out the whole-frame steps and the tiles stay on the model's native curve. Put Flow Shift before the tiled patch and that's automatic; put it after and you're shifting the tiles too.

Cranking it at 4 steps. A distilled Klein was tuned at its own shift. Doubling it at 4 steps doesn't buy composition, it just relocates your four steps. This node earns its keep on large canvases and higher step counts, not as a rescue for a bad prompt.

CategoryWAS Suite/Sampling

Inputs (3)

NameTypeDefaultDescription
modelMODELA flow model: FLUX 3 Image Klein, MOSS-Image, FLUX, SD3 and alike; MODEL.
shiftFLOAT0.000–1000Shift as a factor. 0 = the model's own: 6.93 on Flux 3 Klein, 5 on MOSS-Image; 3 = more steps on detail; 12 = more on layout.
resolutionCOMBO`fixed` = the shift as set; `scaled` = the shift times the square root of the area over 1024 x 1024, so MOSS-Image's 5 becomes 7.1 at 1088 x 1856.

Outputs (1)

NameTypeDescription
modelMODELThe model sampling at the new shift; MODEL.