Nodes/Spark-H3/MiniMax-H3 DMAD Sampler (4-step)
ComfyUI Node

MiniMax-H3 DMAD Sampler (4-step)

MiniMax-H3 DMAD Sampler

By zechengtang·Created about a month ago·Updated about 3 hours ago· 82
MiniMax-H3 DMAD Sampler (4-step)
    • SAMPLER

    This node has zero inputs, one output, and it will wreck your generation if you use it the way you'd use every other sampler. That's because it isn't a solver. It predicts x0, then throws the prediction away and re-noises it from scratch - a DMD-style step that only makes sense on a model distilled to expect exactly that.

    If you downloaded the DMAD 4-step LoRA, this is the sampler it wants. If you didn't, nothing here applies to you.

    The mechanism, in full

    The pack's comfyui_dmad.py is short enough to read over coffee, and the loop is the whole story:

    denoised = model(x, sigma * s_in, **extra_args)
    if float(sigma_next) == 0.0:
        x = denoised
    else:
        noise = noise_sampler(sigma, sigma_next)
        x = (1.0 - sigma_next) * denoised + sigma_next * noise
    

    A normal sampler carries a partly-denoised latent forward and adds a small amount of scheduled noise in each step. This one takes the model's x0 prediction, scales it down by the next sigma, and mixes in fresh Gaussian noise at that sigma. On the last step, where sigma_next is 0, it just returns the prediction. The noise comes from ComfyUI's own default_noise_sampler, seeded off the sampler's seed, so it stays reproducible.

    That's the "re-noise" in the node description, and it's why the node is a SAMPLER rather than a KSampler: it's a bare sampling function, wrapped as comfy.samplers.KSAMPLER, wired into a node that takes a SAMPLER input.

    Inputs and outputs

    There are no inputs. Not one widget. All the configuration lives in the nodes around it:

    The output is a single SAMPLER. In the pack's shipped DMAD example it goes into SamplerCustomAdvanced's sampler socket - the same place KSamplerSelect would normally feed.

    The setup it requires

    The author's own description is blunt about it: use a simple scheduler with 4 steps and MiniMaxH3SigmaShift set to video=12, audio=2. The shipped workflow backs that up with the rest of the recipe:

    • A simple scheduler at 4 steps. Not 20. Not 8.
    • MiniMaxH3SigmaShift at video 12 / audio 2 - H3 exposes separate noise schedules for the two streams, so copy these rather than guessing.
    • The DMAD LoRA, converted to ComfyUI's generic format: dmad_minimax_h3_4step_lora_critic_comfyui_bf16.safetensors at strength 1.0. Spark-H3 never installs that for you; the workflow in the pack names the file but expects you to have fetched and converted it.
    • If you're also running a Spark attention node, set its steps to 4 as well. The workflow uses mode=fidelity (first evaluation dense), topk_ratio=0.2, dense_layers=0.

    The underlying method is ByteDance's DMAD - Distribution Matching as Adversarial Distillation for Fast Visual Generation, cited in the pack's technical blog as arXiv:2610.02188. The sampler is just the inference half of that; the intelligence is in the distilled weights.

    Where people get burned

    The failure mode here is universal to distilled models: a 4-step distilled model "was trained to denoise in exactly 4 large jumps. Running it at 20 steps doesn't improve quality - it creates artifacts because the model expects 4 specific-sized steps through the noise schedule, not 20 small ones. Running at 2 steps when 4 is expected also fails because each step is too large." Re-noising with fresh noise on every one of 20 steps isn't a refinement of the DMAD schedule, it's a different and bad one.

    Second trap: using this sampler with the non-distilled H3 checkpoint. The re-noise step discards the partially-denoised signal a normal model relies on, so you get something soft, unstable, or just wrong. The sampler and the LoRA are a matched pair.

    Third: expecting dense-quality output. Four-step video distillation is a trade, and the noise schedule is where you'll see it - motion and fine texture are where these models give ground first.

    Installing

    The pack installs via ComfyUI Manager (registry publisher zechengtang, node ID comfyui-spark-h3) or from a release ZIP:

    cd /path/to/ComfyUI/custom_nodes
    unzip /path/to/ComfyUI-Spark-H3-<version>-linux-x86_64-sm89-cu130.zip
    /path/to/ComfyUI/.venv/bin/python ComfyUI-Spark-H3/install.py
    

    git clone https://github.com/zechengtang/Spark-H3 also gets you this node - the DMAD sampler is deliberately kept isolated from the Spark implementation and needs no CUDA backend - but the attention nodes next to it in the same pack do, so you'll run the installer anyway. Model weights come separately from Comfy-Org/MiniMax-H3, and H3's weights are licence-gated by territory (EU, UK, South Korea and the US are excluded), so check that before you build a pipeline around it.

    Categorysampling/custom_sampling/samplers

    Inputs (0)

    No inputs

    Outputs (1)

    NameTypeDescription
    SAMPLERSAMPLER—