Nodes/X-Dub Lip Sync/Load X-Dub Model
ComfyUI Node

Load X-Dub Model

The Load X-Dub Model node is a bouncer, not a loader

By DarkNoah·Created about a month ago·Updated 22 days ago· 5
Load X-Dub Model
    • xdub_model
    model_name

    The name undersells this node. Load X-Dub Model doesn't load anything into VRAM - it picks a file, vets it, and hands the path to the two lip-sync nodes. That vetting is the whole job, and it's more useful than it sounds.

    X-Dub is a dubbing model, a fine-tune of Alibaba's Wan 2.2 TI2V-5B built for a single job: make one person's mouth follow an audio track. It doesn't run on just any Wan checkpoint. It needs the X-Dub-trained DiT, distributed as X-Dub_model.safetensors from KlingTeam/X-Dub on Hugging Face. Wire the wrong safetensors in and the inference node would only fail deep in the pipeline, forty minutes in, with a wall of torch traceback. This loader catches that before you queue anything.

    How it works

    The node lists every file in ComfyUI/models/diffusion_models into a dropdown. When you pick one, it opens the safetensors and checks for X-Dub-specific weight keys - the audio embedding projection layers and the audio attention block, things a plain Wan checkpoint doesn't have. If those keys are missing you get a clear error ("the selected diffusion model is not an X-Dub DiT") instead of a confusing crash later. It also rejects anything that isn't a .safetensors.

    You can't miswire it much: a plain Wan 2.2 model goes in, validation fails, you learn something. The one way to get stuck is having no X-Dub model at all, in which case the dropdown is empty and the node can't be built.

    The inputs and outputs

    One input, one output. That's the whole node:

    • model_name - dropdown of everything in models/diffusion_models. Only X-Dub_model.safetensors passes the check.
    • xdub_model - the XDUB_MODEL output. It feeds the xdub_model input on both X-Dub Lip Sync (Video) and X-Dub Lip Sync (Frames Compatibility).

    So the graph is: Load X-Dub Model → lip-sync node, plus a standard Load VAE node feeding Wan2.2_VAE.safetensors (the 48-channel Wan 2.2 VAE - the lip-sync nodes check that too).

    Installing it

    The pack ships three nodes at once, so installing it once covers the loader and both lip-sync nodes. ComfyUI Manager should find it if you search "X-Dub". Manually:

    cd ComfyUI/custom_nodes
    git clone https://github.com/DarkNoah/comfyui-x-dub.git
    cd comfyui-x-dub
    bash install_runtime.sh
    

    That script is the interesting part: it uses uv to build an isolated Python 3.10 virtualenv inside the pack and installs torch, onnxruntime-gpu, and the X-Dub inference stack there - deliberately not touching ComfyUI's own environment, so pinned package versions can't break your other nodes. You'll need uv on your PATH and ffmpeg/ffprobe available. Restart ComfyUI after.

    Then drop X-Dub_model.safetensors into ComfyUI/models/diffusion_models/ (alongside the VAE, the UMT5-XXL text encoder, the Whisper and Wav2Vec2 audio encoders, and the DWPose ONNX files the README lists). The loader only touches the diffusion_models folder, but the lip-sync nodes won't start without the rest.

    Common issues

    • "not an X-Dub DiT; missing keys" - you selected a plain Wan checkpoint (or a GGUF, which won't work here anyway). Pick the real X-Dub_model.safetensors.
    • Empty model list - the file isn't in diffusion_models, or ComfyUI hasn't refreshed its file list after you moved it in. Restart ComfyUI.
    • "Runtime is not installed" - you cloned the repo but never ran install_runtime.sh. Go back and run it; the pack won't silently half-work.

    It's a thin node, but it's the difference between a clean setup and a multi-hour puzzle, and on a 21 GB model that validation is worth having.

    CategoryX-Dub/loaders

    Inputs (1)

    NameTypeDefaultDescription
    model_nameCOMBO0 options:

    Outputs (1)

    NameTypeDescription
    xdub_modelXDUB_MODEL