RH MagiHuman Model Loader
The loader that gets a 15B talking-head model onto a 16 GB card
- pipeline
The "RH MagiHuman Model Loader" is the unglamorous reason this pack is usable at all. Upstream daVinci-MagiHuman officially wants ~92 GB of VRAM - people were running it on H100s and still OOM-ing. This loader is the part that squeezes a 15B single-stream transformer (text, video, and audio in one self-attention stream, with a T5-Gemma text encoder, the Wan2.2 VAE, and Stable Audio Open stacked around it) into the sort of card you actually own. It doesn't generate anything itself; it hands you the MAGIHUMAN_PIPELINE that the Generate node consumes. Think of it as the pack's gateway.
How it works
The trick is two-fold, and the loader wires both up.
First, INT8 weights. The DiT checkpoints are pre-quantized (base_int8.pt, distill_int8.pt, plus optional SR variants - each ~14.25 GiB) from the Gluttony10 HuggingFace repo, loaded via a quantized-DiT path instead of the full BF16 shards the official pipeline wants.
Second, offload, chosen by vram_mode. mid_vram (default) streams the INT8 DiT between GPU and CPU - "ping-pong" - peaking around 16 GB. low_vram installs forward hooks on each transformer layer so it slides onto the GPU just before its forward pass and back to CPU right after, holding ~6.5 GB base. That layer-by-layer mode is the reason an 8 GB card can attempt this at all.
There's also a single-entry pipeline cache: load once with a given config and re-running the workflow is a cache hit; change any parameter and it releases the old pipeline (gc + empty cache) and reloads - which is the "why is it loading again?" moment you'll hit.
Inputs that matter
model_type-base(32 steps, full CFG) ordistill(8 steps, no CFG). For talking-head clips a few seconds long,distillis the sane default;basebuys a bit of quality at a big speed cost. Think of it like every other distilled-vs-base tradeoff: speed up, some refinement lost.vram_mode-mid_vram(~16 GB) orlow_vram(~6.5 GB, slower). Pick by card, not by vibes.sr_model-none,540p_sr,1080p_sr. The SR pass is a second full denoising run and it's heavy; the README's own table says 540p wants ~24 GB, 1080p wants ~48 GB. On a 16 GB card, leave itnone.use_turbo_vae- on by default for faster decoding; off only if you have a reason.torch_compile- off by default. Turning it on costs a ~5 minute first-run compile per config in exchange for faster later runs.
Output: one MAGIHUMAN_PIPELINE, straight into Generate.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/RH-RunningHub/ComfyUI-RH-daVinci-MagiHuman.git
cd ComfyUI-RH-daVinci-MagiHuman
pip install -r requirements.txt
Restart ComfyUI (or install by pack title via ComfyUI Manager - it's on the Comfy Registry). flash-attn sits in requirements.txt and may need a matching CUDA/PyTorch build - that's the most common install failure, and it's a build problem, not a code problem.
The model download is the actual project. The loader looks in fixed paths: ComfyUI/models/MagiHuman/ for the DiT, T5-Gemma and TurboVAE, ComfyUI/models/audio_checkpoints/stable-audio-open-1.0/ for the audio VAE, and ComfyUI/models/Ovi/Wan2.2-TI2V-5B/ for the video VAE. The README's "Model Download & Installation" has copy-paste hf download commands; Method 2 covers ModelScope for China-based users.
Where people get burned
- The FileNotFoundError isn't a crash - it's a checklist. The node validates every path up front and names exactly what's missing and where to get it. If you see it, you forgot a download, not a setting.
- Changing any loader parameter drops the cache. Flip
model_typeand you're in for a multi-minute reload. Plan configs before you queue a batch. torch_compilecompiles per configuration - the ~5 min hit returns if you change anything that lands in the cache key.- SR is the trap on consumer cards. It's genuinely useful at 24 GB+; below that, base output plus an external upscaler is the community's usual workaround.
It's Apache 2.0 like the upstream, and it does what it says: the difference between a 92 GB research model and something that runs on a 16 GB card is mostly this node.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| model_type | COMBO | 2 options: base, distill | |
| use_turbo_vae | BOOLEAN | true | — |
| vram_mode | COMBO | mid_vram | mid_vram: INT8 DiT + GPU/CPU ping-pong (~16 GB). low_vram: INT8 DiT + layer-by-layer CPU offload (~6.5 GB base). |
| sr_model | COMBO | none | Super-resolution model. Upscales base output to 540p or 1080p in a second denoising pass. |
| torch_compile | BOOLEAN | false | Enable torch.compile (dynamo). First run compiles ~5 min, subsequent runs faster. Disable for eager mode. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| pipeline | MAGIHUMAN_PIPELINE | — |