Nodes/ComfyUI_UltraFlux/UltraFlux_SM_Model
ComfyUI Node

UltraFlux_SM_Model

UltraFlux isn't upscaling — it's native 4K, and this node loads it

By smthemex·Created 9 months ago·Updated 9 months ago· 26
UltraFlux_SM_Model
    • pipeline
    dit
    gguf
    vae
    repo

    Every "4K" image generator you've used so far was probably lying: the model samples at 1024 or 1536 and some upscaler patches the rest. UltraFlux doesn't do that. It's a Flux-based model from W2GenAI-Lab (arXiv 2511.18050, released November 2025) that genuinely samples at up to 4096×4096 across arbitrary aspect ratios, straight from text. This node is the front half of smthemex's ComfyUI wrapper for it: it loads the model and hands you a ready-to-run pipeline. The name is real, the native-4K pitch is real, and for something this niche the wrapper is surprisingly clean.

    How loading actually works

    UltraFlux isn't a stock Flux. The researchers took the Flux transformer and bolted on a positional-encoding extension called VisionYarn so attention doesn't degrade when the latent grid gets huge - that's what makes native 4K feasible instead of a smeared mess. The pack bundles that modified transformer, a matching VAE, and a FluxPipeline in its ultraflux/ directory, so nothing about the model itself is downloaded by the node.

    What the node does is assemble those parts from wherever you point it. Pick a local model file, or give it a Hugging Face path, and it builds the diffusers pipeline with bfloat16 throughout, then sets the scheduler's time_shift to 4. Note it does not load a text encoder - UltraFlux reuses ComfyUI's own FLUX T5 + CLIP-L, which you wire in separately with a DualCLIPLoader.

    The inputs you'll actually set

    • dit - a safetensors transformer from ComfyUI/models/diffusion_models (e.g. UltraFlux-v1-1-BF16.safetensors).
    • gguf - a quantized transformer from ComfyUI/models/gguf (e.g. UltraFlux-v1-1-BF16.gguf or a Q8). The node auto-creates that folder on first run.
    • vae - required whenever you use dit or gguf. Pick the file you dropped in ComfyUI/models/vae; if you skip it, you get an assert straight from the source: "Please provide a ultraflux vae model."
    • repo - the odd one out: a diffusers repo or folder path (the example workflow uses a local UltraFlux-v1 directory). Fine to leave empty if you're using local files.

    Set either dit or gguf (or repo), plus a VAE. The output is a single pipeline - a custom UltraFlux_SM_Model type, so it only plugs into this pack's UltraFlux_SM_KSampler. It will not connect to a stock ComfyUI sampler, so don't fight the graph trying to make it.

    Installing it and the model files

    ComfyUI Manager → search "ComfyUI_UltraFlux", or the manual route:

    cd ComfyUI/custom_nodes
    git clone https://github.com/smthemex/ComfyUI_UltraFlux
    

    Restart ComfyUI. The requirements.txt is just torch/transformers/accelerate/diffusers - stuff you already have - and the README shrugs and says "no need to install." Then grab models: the GGUF quant from smthem/UltraFlux-v1-gguf (the README recommends the BF16/fp16 file, and here's why: block offloading means system RAM does the heavy lifting, so big-and-unquantized beats small), the VAE from Owen777/UltraFlux-v1, and the usual t5xxl_fp8_e4m3fn.safetensors + clip_l.safetensors for the text encoder.

    What trips people up

    The loading step is slow and memory-hungry - first run can look frozen while it shuffles tensors into RAM. If you're on 8GB of VRAM, the real lever isn't the model file, it's the block_num on the KSampler side (drop it from 10; at 4GB start at 1). And if output quality looks off with a style LoRA loaded, that's not you: the author's own notes warn that style LoRAs can degrade UltraFlux output, and recommend a hand-fix LoRA for characters instead.

    CategoryUltraFlux

    Inputs (4)

    NameTypeDefaultDescription
    ditCOMBO1 options: none
    ggufCOMBO1 options: none
    vaeCOMBO1 options: none
    repoSTRING

    Outputs (1)

    NameTypeDescription
    pipelineUltraFlux_SM_Model