(Down)load X-Portrait Model
The X-Portrait Loader Nobody Notices Until It Fails
- model
The ComfyUI-X-Portrait-Nodes pack ships exactly two nodes, and this is the unglamorous one. (Down)load X-Portrait Model is a zero-input node that grabs the weights and hands you a ready-to-run XPORTRAIT_MODEL for its sibling, the XPortrait node. You'll never touch a setting on it - it doesn't have any - but it's the half that decides whether your first run takes ten seconds or twenty minutes, because "down" in the name isn't cute: the file is 12.27 GB.
What it actually does
On first execution the node checks ComfyUI/models/x-portrait/ for a checkpoint called model_state-415001.th. Not there? It calls HuggingFace's snapshot_download against fffiloni/X-Portrait and pulls that one file, then builds the model from the pack's own YAML config (cldm_v15_appearance_pose_local_mm.yaml) and loads the weights on CPU. No GPU pressure during load, which is nice.
The thing you're loading is ByteDance's X-Portrait: a ControlLDM diffusion model on an SD 1.5 backbone. It's ControlNet-shaped rather than one neural net - an appearance "reference-only" ControlNet that preserves your portrait's identity, plus pose and local eye/mouth ControlNets that follow the driving video. The node pins sd_locked=True, so the base UNet stays frozen and only those control branches carry the animation signal. If you've read how ControlNets work - a trainable copy of the encoder whose outputs get added into the frozen UNet's skip connections - this is that recipe, aimed at faces, spread across time.
The one output
The sole output is model of type XPORTRAIT_MODEL, which wires straight into the XPortrait node's xportrait_model input. That's the whole contract. Run it once to trigger the download, leave it connected, and it just sits there holding the loaded model for the animation node.
Installing the pack
ComfyUI Manager: search "X-Portrait" in Custom Nodes and pick "X-Portrait Nodes". Or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/akatz-ai/ComfyUI-X-Portrait-Nodes.git
Then restart ComfyUI. The real story is the dependency list: face-alignment, diffusers, xformers, sageattention, triton, imageio[ffmpeg], open-clip-torch, pytorch-lightning, omegaconf. That's a chunky, sometimes version-picky pile that can fight an existing install. If it does, the author's escape hatch is a prebuilt Docker image (akatzai/comfy-env-xportrait) used with their Environment Manager tool - copy the tag into the "Custom Image" field and you skip the dependency wars entirely.
Gotchas
- The first run is the download. 12 GB needs time and disk. If the node looks frozen, it isn't - watch the console for the HF progress bars.
- Delete the model, redownload it. If you ever clear
models/x-portrait/to reclaim space, this node happily downloads all 12 GB again the next time you run the workflow. - Heavy install, tiny node. This node itself is trivial; the weight is the pack's dependency footprint. If you only want the animation behavior and the setup is melting, the Docker path is worth trying before you give up.
The model file's license (CreativeML Open RAIL++-M, via the HF mirror) matters less for hobby use but is worth a glance before you ship anything commercial.
Inputs (0)
No inputs
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model | XPORTRAIT_MODEL | — |