UltraFlux Patch
UltraFlux Runs in ComfyUI Without This Node. It Just Runs Wrong.
- model
- model
What this node is actually for
UltraFlux is a Flux-architecture model co-designed with its training data for native 4K - the practical version being that the weights assume resolutions nobody runs Flux at on a 12GB card. It had a brief moment in late 2025, then the timeline moved on.
Here's what nobody tells you: there's no UltraFlux loader, and you don't need one. Stock Load Diffusion Model (or a GGUF loader) loads it fine, and it samples fine. It just doesn't produce the image the model was trained to produce, because exactly two things differ from vanilla Flux and ComfyUI can't know about either.
UltraFluxPatch injects those two things. MODEL in, MODEL out, everything downstream stock. That's the pack's whole philosophy, and the right one - the old version wrapped the diffusers pipeline and broke whenever diffusers or transformers shifted under it.
The two patches, and why they matter
The only structural difference between UltraFlux and Flux is the positional embedding. UltraFlux uses Vision-YARN RoPE: YaRN frequency scaling per image axis, a resonance-alignment step that rounds the rotation counts, and an attention temperature mscale that grows with the scale factor. The patch swaps Flux's parameterless pe_embedder for that, in ComfyUI's own output format - the DiT consumes it unchanged and no weights are touched.
The neat part: the YaRN branch only fires past the training window - 64 rope patches per H/W axis, i.e. 2048px at a 32px patch. Below that you get stock Flux rope, bit for bit. Harmless at small resolutions, essential at large ones.
Second patch: static flow-match sampling at shift=3, from the model's scheduler_config.json under use_dynamic_shifting=false - a discrete-flow sampler with multiplier=1.0. Plus a shim reproducing diffusers' bf16 rounding of the timestep (bf16 steps by 4 there, so sigma 0.75 lands on 752, not 750), because the model trained through that quantisation.
Inputs and outputs
- model - the
MODELfrom your loader, any Flux-family checkpoint, GGUF or safetensors. Feed it an SDXL model and it raisesmodel is not a flux DiT- the correct amount of drama. - shift - float, default
3.0, range 0–10: the scheduler's static shift, straight from the model config. Leave it alone. There's no reason to touch it unless you're experimenting and braced for worse. - model out - into KSampler.
The author's rule, and it's hard: do not add ModelSamplingFlux or ModelSamplingSD3 after this. The patch already sets the sampling model, and ModelSamplingSD3 uses multiplier=1000, which breaks Flux's timestep scaling. Stacking them is the classic way to get mush.
A working graph
Load Diffusion Model (UltraFlux-v1-1-bf16_fp8_scaled.safetensors)
└─ UltraFluxPatch (shift 3)
└─ KSampler (euler / simple, cfg 1.0, 8 steps, add flux-turbo LoRA via LoraLoaderModelOnly)
DualCLIPLoader (clip_l + t5xxl_fp8, type flux) → CLIPTextEncode → FluxGuidance (4.0) → KSampler positive
EmptySD3LatentImage (2048 × 2048) → KSampler latent
VAELoader (UltraFlux.safetensors) → UltraFluxVAEPatch → VAEDecode
The pack's own example, and a good baseline: 8 steps, turbo LoRA, Euler, simple, guidance 4.
The resolution trap that eats people
ComfyUI's latent is pixels/8; the official UltraFlux pipeline's is pixels/16. So empty latent 2048 gives you a 4096×4096 image once the VAE runs through UltraFluxVAEPatch - 16384 tokens, YaRN scale 2, the model doing what it was built for.
Set the comfy latent to 4096 and you're asking for 65536 tokens at YaRN scale 4, way outside the training distribution. You don't get a nicer 8K picture; you get high-frequency noise that looks like a broken decode. The README's note about needing a 2048 latent for 4096 output is this, in fewer words.
Install
Manager: search ComfyUI_UltraFlux and install. Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_UltraFlux
# restart ComfyUI
No real dependencies - the README says so and the code agrees. Weights: Owen777/UltraFlux-v1 or UltraFlux-v1-1-Transformer (models/diffusion_models), smthem/UltraFlux-v1-gguf (models/gguf), the VAE into models/vae, plus a normal T5 and clip_l. Q8 is effectively fp16 at half the size; if it fits, use it. For GGUF you also need a loader - the author's ComfyUI_Dif_GGUF or city96's - since Load Diffusion Model won't open a .gguf.
Where people get burned
- Half-res or washed output. You skipped
UltraFluxVAEPatch. This node fixes the model, that one fixes the decoder. - Noise at "high" resolution. Latent 4096 instead of 2048.
- Someone else's sampler recipe. Karras, DPM++ 2M, 30 steps - none of it transfers. Flow-match model, Euler, simple, few steps.
- A workflow with a ModelSamplingFlux node hovering in the middle. Someone bolted it on and it's fighting the patch. Delete it.
Last thing, on the pack: smthemex is the person who ports every new model to ComfyUI within about 48 hours of the paper dropping, GGUF quants included. Great when you want to try this week's release - but the README sometimes lags the code. When they disagree, trust ultraflux_nodes.py.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| shift | FLOAT | 3.000–10 | Static flow shift (scheduler_config.json 'shift'=3.0) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | MODEL | — |