π§ Pixel3DMM Model Loader
The load gate that powers every 3D face node β and the model file it doesn't ship
- model
- status
Every node in the Pixel3DMM pack starts with this one, so it's worth getting right before you build anything. Pixel3DMMLoader doesn't reconstruct anything itself - it's the load gate. You point it at a model file, it hands you a PIXEL3DMM_MODEL container, and that container is what every other node in the pack (FaceReconstructor3D, the UV and normal predictors, the FLAME optimizer) consumes. No loader, no pipeline. Think of it as the custom-node equivalent of Load Checkpoint, except the model it loads is a full 3D-face stack, not a diffusion checkpoint.
What it actually does
The loader reads a .pth checkpoint with torch.load, figures out which device to use, and assembles a model container made of three components: a vision backbone for pulling features out of the image, a prediction head that maps those features to FLAME parameters, and a FLAME layer that turns parameters into a mesh. On load it pushes the checkpoint's state dicts into each component. The device setting does what you'd expect - auto picks CUDA if it's available and falls back to CPU - and precision toggles fp16, which only kicks in when you're on CUDA. On CPU, fp16 quietly does nothing.
The inputs and outputs that matter
Three inputs are required:
- model_path - path to the checkpoint, defaulting to
models/pixel3dmm/pixel3dmm_model.pth. Relative paths are relative to wherever you launched ComfyUI, so an absolute path is safer. - device -
auto,cpu, orcuda. - precision -
fp32orfp16. Start with fp32; flip to fp16 only if you're eating VRAM.
The optional config_override is a JSON string for power users who want to swap backbone or FLAME dimensions without editing code. You'll almost certainly never touch it.
The two outputs are model (the PIXEL3DMM_MODEL container - wire it into FaceReconstructor3D, UVPredictor, or NormalPredictor) and status, a plain string. Put status into a Show Text node the first time so you can see what the loader actually loaded.
The trap: the model file isn't there
Here's the thing nobody tells you. This pack ships with no checkpoint, and the README's download link is a placeholder URL (github.com/your-repo/pixel3dmm-models). If the file at model_path doesn't exist, the loader doesn't error out - it prints "Model file not found, using random initialization" to the console and builds the whole stack with random weights. Your workflow runs end to end and produces a mesh. It just won't look like a face.
So before you blame the reconstructor, check two things: that the file at model_path actually exists, and that the console shows weights being loaded rather than a random-init warning. This is a young pack (one commit, clearly scaffolded), so if you can't supply a real checkpoint that matches its state-dict keys, treat everything downstream as a pipeline demo rather than a usable face model.
Installing it
ComfyUI Manager is the easy path - search "Pixel3DMM" and install. Manual is the usual:
cd ComfyUI/custom_nodes
git clone https://github.com/A043-studios/comfyui-pixel3dmm
pip install -r requirements.txt
Then restart ComfyUI. The requirements pull in torch>=2.0, torchvision, opencv-python, scikit-image, scipy, trimesh, and a few utilities. Nothing exotic, but opencv and scikit-image are exactly the packages that collide with other custom nodes' pinned versions - if the nodes don't appear after install, read the ComfyUI console for an import error before you assume the install failed.
Troubleshooting
- CUDA out of memory - switch
devicetocpu, orprecisiontofp16(if you're on GPU). - Garbage output - the random-init fallback. Verify the checkpoint exists and that a real load happened.
- Node missing after install - console import error; check for a dependency collision, then restart ComfyUI completely.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| model_path | STRING | models/pixel3dmm/pixel3dmm_model.pth | β |
| device | COMBO | auto | 3 options: auto, cpu, cuda |
| precision | COMBO | fp32 | 2 options: fp32, fp16 |
| config_overrideopt | STRING | {} | β |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| model | PIXEL3DMM_MODEL | β |
| status | STRING | β |