Nodes/FunUI/FunUI Diffusion Model Loader
ComfyUI Node

FunUI Diffusion Model Loader

Load a diffusion model, choosing precision and attention backend.

By digital-garbage·Created about a year ago·Updated about 12 hours ago· 20
FunUI Diffusion Model Loader
    • model
    • status
    ◄model_name▾►
    ◄weight_dtypedefault►
    ◄compute_dtypedefault►
    ◄attentiondefault►
    ◄fp16_accumulationfalse►
    ◄slafalse►
    ◄sla_sparsity0.90►
    ◄sla_block_size64►
    ◄sla_protect_audiotrue►
    ◄sla_min_seq_len8192►
    ◄sla_dense_last_steps0►
    ◄int8_convrotfalse►
    ◄sla_enginecomfy_kitchen►
    ◄sla_dense_steps1►
    ◄sla_referencesoff►
    ◄sla_tailfalse►
    ◄sla_stabilize_motionfalse►
    ◄sla_methodsla►
    ◄sla_tau1.30►
    CategoryFunUI/Loaders

    Inputs (19)

    NameTypeDefaultDescription
    model_nameCOMBO0 options:
    weight_dtypeCOMBOdefaultHow the weights are stored. 'default' keeps whatever the file already is.
    compute_dtypeCOMBOdefaultWhat the maths runs in, independently of storage.
    attentionCOMBOdefaultAttention backend. Only what this machine can run is listed; 'default' keeps ComfyUI's launch choice.
    fp16_accumulationoptBOOLEANfalseFaster fp16 matmuls where the torch build supports it.
    slaoptBOOLEANfalseBlock-sparse attention for MiniMax H3 -- the inference path lightx2v's SLA turbo LoRA was distilled against, which is why that LoRA gives no speedup on its own. Roughly 3.7x the attention throughput at 768p/15s. Runs ALONGSIDE the attention backend above rather than replacing it: SLA takes H3's long packed self-attention, the chosen backend takes the text refiner, masked calls and any trailing dense steps. Skipped, with the reason, on anything that is not MiniMax H3 or on a machine without Triton.
    sla_sparsityoptFLOAT0.900–0.95Fraction of key blocks skipped while SLA is on (of video cubes for method vsa). 0.90 is validated; 0.85 is lightx2v's own value and ~15% slower. Break-even is around 0.60 -- below that the kernel is SLOWER than dense, so a low value is a loss, not a safe fallback.
    sla_block_sizeoptCOMBO64How many sequence tokens share one key selection. H3 packs audio at 80 rows per second, so a 128-row block forces 1.6s of speech down one attention pattern while the same rows are 3% of a video frame. Use 128 only when the audio does not matter; 32 routes finer still for about the same time. Triton engine only.
    sla_protect_audiooptBOOLEANtrueAlways attend the prompt's words and every audio stream, whatever top-k picks. Audio is ~1% of the packed sequence, so plain top-k regularly drops all of it and the soundtrack degrades while the video still looks fine. Reference images stay sparse: see sla_references.
    sla_min_seq_lenoptINT81920–1000000Sequences shorter than this stay dense. Guards the short text refiner, which must never be sparsified, and low-resolution runs where block selection costs more than it saves.
    sla_dense_last_stepsoptINT00–8Run the last N sampling steps at full attention. 0 matches lightx2v; 1 was tested and did not help, for +20% time.
    int8_convrotoptBOOLEANfalseMiniMax H3 from an ordinary (bf16/fp16) file: store the attention and MLP weights as int8 (rotated first, so no lone outlier spoils the rounding), the way Comfy-Org's own int8_convrot files are. About half the memory and int8 matmuls on GPUs that have them; slightly different pictures. Does nothing to a file that is already quantized or is not H3 (the status says so), and is skipped when a weight dtype is forced above. The memory saving always holds; the speed-up is lost on layers a LoRA is applied to and when compute dtype is forced.
    sla_engineoptCOMBOcomfy_kitchenWhat runs the sparse calls. comfy_kitchen: ComfyUI's compiled int8 sol_attn (needs comfy-kitchen 0.2.32+; the Triton kernel runs instead where it is missing, and the status says so). triton: FunUI's own kernel, the only one with block size and stabilize motion.
    sla_dense_stepsoptSTRING1Steps at full attention, counted from 1: '1' is the first step, '1-2' the first two, '1,6' the first and sixth; blank or '0', none. The first steps set the layout and how closely the prompt is followed, so the first is exact by default. Adds to dense last steps. The log names the steps that ran this way.
    sla_referencesoptCOMBOoffReference images, conditioning frames and the prompt's vision tokens. off: sparse like the video. light: each keeps its best 15% for every query block. heavy: all of them exact, slow with big references. On comfy_kitchen, light picks one 15% for all query blocks.
    sla_tailoptBOOLEANfalsecomfy_kitchen engine: the skipped blocks still count, as one averaged term per query block, instead of not at all. Off matches what the SLA turbo LoRA was trained against; untested on H3.
    sla_stabilize_motionoptBOOLEANfalseTriton engine: each layer leans toward the blocks it picked last step, so near ties stop flipping and showing as a faint double exposure on fast motion. A fix for that one symptom; a little more memory.
    sla_methodoptCOMBOslaHow the blocks worth attending are chosen. sla: a fixed share (sla_sparsity), what SLA turbo LoRAs were trained against. sol-attn: a per-block threshold (sla_tau), no training needed; comfy_kitchen engine. vsa: video cubes, only for models trained for it (the status says when the model lacks VSA's layers); run by ComfyUI's own Model Sparse Attention, keeping 1 - sla_sparsity of the cubes.
    sla_tauoptFLOAT1.300–4sol-attn only: higher skips more. About 1.0 keeps ~16% of key blocks exact, 1.5 ~7%, 2.0 ~3%.

    Outputs (2)

    NameTypeDescription
    modelMODEL—
    statusSTRING—