Nodes/AnimoFlow/MDM Generate (AnimoFlow)
ComfyUI Node

MDM Generate (AnimoFlow)

MDM in ComfyUI

By AnimoFlow·Created 2 months ago·Updated about a month ago· 1
MDM Generate (AnimoFlow)
    • npz_b64
    • native_fps
    prompta person walks forward
    num_frames120
    cfg7.5
    seed42

    AnimoFlow_MDM is the text-to-motion engine of the AnimoFlow pack: you type "a person walks forward" (or "a dancer spins and kicks", it's shockingly literal) and it spits out a raw motion sequence as a pose tensor. It's the HumanML3D-era Human Motion Diffusion Model (MDM), the 2022 paper that basically started the whole text-to-motion diffusion line, wrapped so it runs inside ComfyUI.

    Here's the thing you need to understand before wiring this up: this node doesn't run the model itself. It's a thin HTTP client that POSTs your prompt to a Docker container on localhost:8001, polls a /progress/{job_id} endpoint, and returns the finished NPZ. That means the node appears in the graph the moment the pack is installed, but it errors with "container unreachable" until you've actually run the backend install (./install.sh up). Worth knowing before you blame your workflow.

    What it outputs and where it goes

    The two outputs are npz_b64 - the motion as a base64-wrapped ANIMOFLOW_NPZ, a joint-position pose tensor - and native_fps, which for MDM is 20. You don't feed the NPZ anywhere a human can see it. The standard pipeline is:

    AnimoFlow_MDM (npz_b64) → AnimoFlow_Resample (to 30fps) → AnimoFlow_IK (→ BVH) → AnimoFlow_Rig (→ character FBX) → AnimoFlow_GLBExport (→ GLB) → preview
    

    The resample step isn't optional decoration: MDM generates at 20 fps natively and the downstream Blender retargeter derives its scene FPS from the BVH header, which comes from the resampled output. Skip it and your exported animation plays at the wrong speed. The curated text_mdm workflow wires exactly this, so dragging that JSON in and hitting Queue is the fastest way to see it work.

    The inputs that matter

    • prompt - multiline, plain English motion descriptions. MDM is trained on HumanML3D captions, so short descriptive sentences ("a person walks forward") work far better than flowery prose. The pack ships an AnimoFlow_PromptRewrite node if you want to write prompts in another language.
    • num_frames - 60–300, default 120. At 20 fps that's 1.5–15 seconds of motion.
    • cfg - default 7.5, the highest of any model in the pack. MDM likes aggressive guidance; if your output is stiff, dropping it toward 4–5 is the first lever.
    • seed - default 42. Bump it for variety; MDM is deterministic per seed.

    Installing and troubleshooting

    Two-part install like every node in this pack. Nodes first (ComfyUI Manager, search "AnimoFlow", or git clone https://github.com/AnimoFlow/comfyui-animoflow.git into custom_nodes/), then the model backend from inside the cloned folder:

    ./install.sh doctor     # preflight: Docker, ports, disk, weights
    ./install.sh weights    # MDM is the one model that downloads on the host (~1GB, Google Drive)
    ./install.sh up         # builds + starts containers; first run 15–25 min
    

    MDM's weights are the pack's one manual download - the checkpoint isn't theirs to redistribute inside a Docker image, so install.sh weights fetches it to ~/animoflow/models/mdm/ and binds it in. If a generation fails after the container is up, run ./install.sh status: it checks each container's /health and tells you whether weights are actually loaded, not just whether the container is running. And yes, this runs on CPU - MDM was the model that made the "no GPU required" claim in the README true. First generation is slow (the 15–25 minute figure is just the container build), but after that a 120-frame run takes a while, not forever.

    The one trap: because MDM is an HTTP client, the "node" loads even when nothing's behind it. The ComfyUI console prints a "no model containers detected" banner at startup when the backend is down - that's informational, not an error. ./install.sh up, wait for the health check, try again.

    CategoryAnimoFlow/Motion

    Inputs (4)

    NameTypeDefaultDescription
    promptSTRINGa person walks forward
    num_framesINT12060–300
    cfgFLOAT7.51–20
    seedINT420–2147483647

    Outputs (2)

    NameTypeDescription
    npz_b64ANIMOFLOW_NPZ
    native_fpsINT