Magic Dance Sampler
One photo in, a person who actually moves out
- pipe
- reference
- poses
- latents
- latents
This is the node that actually does the work. Everything else in the ComfyUI-MagicDance pack is support staff - this one runs the diffusion loop that turns one reference photo and a stack of OpenPose pose maps into a short video of a person following those poses.
MagicDance is a port of MagicPose, the Nov 2023 research model out of USC and ByteDance that did pose-driven, identity-preserving human animation. It's an SD 1.5-era pipeline (the yaml config literally targets ControlNet-LDM v1.5), so if you're used to 2026's model zoo it will feel ancient and clunky. It's also genuinely one of the few things that does this specific job - keeping your face and outfit across a pose sequence - without training a LoRA, and it does it locally on 8GB of VRAM. Obscure, lightly maintained, worth a patient afternoon.
How it works
The sampler is a per-frame diffusion loop. For each pose in your batch it builds a conditioning set with two channels: the pose image goes into c_concat (classic ControlNet spatial conditioning - think of it as "where the skeleton goes"), and the VAE-encoded reference image rides along as image_control (the "reference-only" appearance branch, the whole trick of this model). The text prompt is empty - identity comes from the reference, motion comes from the poses, and there's no Positive/Negative prompt to write.
Each frame denoises from your input latents using DDIM (eta 0.0) at the steps you set, guided by guidance against an unconditional conditioning. It's SD 1.5 under the hood, so it's slow by modern standards: a 60-pose clip at 50 steps is 3,000 denoising steps before the decoder even runs.
The inputs that matter
pipe- theMAGICDANCEPIPEfrom LoadMagicDanceModel. Same pipe feeds the encoder, sampler, and decoder.reference- the latent from MagicDanceEncoder. Exactly one; the model only supports a single reference image.poses- the batch of preprocessed OpenPose pose maps. This is the node's hidden requirement: you have to generate the pose images yourself (ControlNet preprocessors, DWPose, etc.) before you ever get here.latents- your starting noise from an EmptyLatentImage. The first dimension must equal the number of poses, and width/height must match the reference image. Get this wrong and the sampler crashes or silently produces garbage.steps(50) andguidance(7.0) - the only dials you'll actually touch. They work like any SD 1.5 CFG.
The output is one LATENT batch (all frames, concatenated) that goes straight into MagicDanceDecoder.
Installing and running it
Install via ComfyUI Manager (search "ComfyUI-MagicDance") or:
cd ComfyUI/custom_nodes
git clone https://github.com/bombax-xiaoice/ComfyUI-MagicDance
pip install -r ComfyUI-MagicDance/requirements.txt
Then restart ComfyUI. A couple of traps from the source and README:
- The folder name must be exactly
ComfyUI-MagicDance. The code appends that literal path tosys.pathand imports fromcustom_nodes.ComfyUI-MagicDance, so any rename breaks it with a confusing import error. This is the pack's best-known wart - there's literally a PR about fixing the absolute imports. - First run downloads the ~2.3GB checkpoint (
model_state-110000.thfromBoese0601/MagicDanceon HuggingFace) via the loader node. Let it finish before assuming it's hung. requirements.txtis the original repo's conda deps flattened - a huge list. Most of it is already in a working ComfyUI env; if pip chokes on something liketritonorxformers, it's usually safe to skip and let the pack run on what you have.- It's slow and VRAM-hungry. The README confirms it runs on an RTX 3070 8GB with components offloaded separately; with spare VRAM try
--highvramon ComfyUI startup. Long runs benefit hugely from a preview method enabled in Manager - otherwise you stare at a progress bar for a while.
Inputs (6)
| Name | Type | Default | Description |
|---|---|---|---|
| pipe | MAGICDANCEPIPE | — | |
| reference | LATENT | — | |
| poses | IMAGE | — | |
| latents | LATENT | — | |
| steps | INT | 50 | — |
| guidance | FLOAT | 7.00 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| latents | LATENT | — |