Model Sampling Flux Normalized
ComfyUI Node Guide
- model
- latent
- model
- latent
If you've ever built a Flux workflow with a second, higher-res pass, you've probably run into ComfyUI's built-in ModelSamplingFlux node and its slightly annoying requirement: you have to type in the width and height by hand. Type the wrong numbers - or forget to update them after you upscale - and the node keeps quietly computing a shift value for the old resolution while your latent has moved on. This node fixes exactly that, and only that.
What it does. Flux is a flow-matching model, and flow-matching samplers use a "shift" value to decide how the denoising trajectory is distributed between composition and fine detail. Flux's own reference code scales that shift with resolution - bigger images want more shift than small ones, otherwise the sampler under- or over-corrects. That's what base_shift and max_shift are: the low end and high end of that scale. The stock node needs you to feed it width and height so it can figure out where on that scale your current image sits. This node skips the manual step and reads the dimensions straight off the latent you're about to sample.
That sounds like a small convenience, but it solves a real, reported bug pattern: people build a hires-fix workflow, upscale their latent for the second pass, and never touch the width/height fields on their ModelSamplingFlux node because nothing tells them to. The shift value silently stays wrong for the new resolution. Wiring the latent in directly instead of typing numbers makes that class of mistake impossible - the node always sees the size of whatever it's actually sampling.
Inputs that matter. Four required, and you'll usually leave two alone:
model- your Flux checkpoint, straight from the loader.latent- the latent you're about to run through aKSampler. This is used only to read its dimensions; it isn't processed here.base_shift(default 0.5) - the shift value at standard resolutions.max_shift(default 1.15) - the shift value at your largest resolutions.
Leave base_shift/max_shift at the defaults unless you have a specific reason to move them; they're the same defaults BFL ships. Outputs are model (now carrying the adjusted sampling config) and latent (unchanged passthrough, so you can keep the graph linear).
Where it goes. Drop it between your model loader and your KSampler, feeding it the latent for that specific pass. If you run a two-stage workflow - generate small, upscale, refine - you want one of these per stage, each fed the latent that's actually going into that stage's sampler. That's the whole point: it's a per-pass node, not a set-once-and-forget one.
Installing it. Search "ComfyUI-42lux" in ComfyUI Manager, or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/42lux/ComfyUI-42lux
Restart ComfyUI. No model downloads, no extra Python dependencies - it's a small, pure-logic pack, and 42lux (also behind the well-received Hildegard tile refiner for Flux 2 Klein and the CaptainCaption captioning tool) tends to ship exactly this kind of focused quality-of-life node rather than anything sprawling.
Common mix-ups.
- Don't confuse this with ComfyUI's own core
ModelSamplingFluxnode - that one ships with ComfyUI itself, needs no install, and is the width/height version this node is meant to replace. If a workflow you dragged in is missing that node, the fix is updating ComfyUI, not installing this pack. - This is Flux-specific. Wiring a non-flow-matching model (SDXL, SD 1.5) into it won't do anything useful - shift isn't a concept those architectures use.
- If you still feed it a stale latent - say, your original low-res one, reused out of habit in the second-pass sampler - you've recreated the exact bug this node exists to prevent. The fix only works if the latent going in is the one actually being sampled.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The model to apply sampling adjustments to | |
| latent | LATENT | The latent to calculate image dimensions from | |
| max_shift | FLOAT | 1.150–100 | Maximum shift value for larger resolutions |
| base_shift | FLOAT | 0.500–100 | Base shift value for standard resolutions |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | MODEL | The model with adjusted sampling parameters |
| latent | LATENT | — |