Nodes/ComfyUI MotionDiff/MotionCLIP Text Encode
ComfyUI Node

MotionCLIP Text Encode

Encoding Text for Motion Diffusion

By Fannovel16·Created 3 years ago·Updated 2 years ago· 212
MotionCLIP Text Encode
  • md_clip
  • motion_data
  • MD_CONDITIONING
texta person performs a cartwheel

If you've used ComfyUI for images, you know the drill: CLIPTextEncode turns your words into conditioning the sampler can understand. MotionCLIP Text Encode is the exact same idea, but for motion. Your sentence like "a person performs a cartwheel" gets embedded with the motion model's CLIP, combined with your (empty) motion data, and handed to the sampler as the prompt that guides what the generated movement looks like. Without it, the motion diffusion model has no idea what you asked for.

This is a required stop on the text-to-motion path: MotionDiff Loader gives you the model and its CLIP, Empty Motion Data gives you the blank motion sequence, this node merges your prompt in, and MotionDiff Simple Sampler does the actual generation. Think of the input trio here as the motion equivalent of checkpoint + CLIP + prompt on the image side.

How it works

Motion diffusion models like MotionDiffuse condition generation on a CLIP embedding of the prompt - the same CLIP family that powers image models, here trained or fine-tuned so that its text embeddings line up with joint-motion features. The node runs the md_clip (the CLIP from your loaded motion model) over the text field, then packages that embedding together with the motion_data you supply - the blank sequence that defines how long the output will be - into a single MD_CONDITIONING object.

The inputs that matter

  • md_clip - the CLIP half of the model, straight from the MD_CLIP output of MotionDiff Loader.
  • motion_data - your empty motion from Empty Motion Data. Yes, it feeds both the sampler and the text encoder; the conditioning needs to know the target length.
  • text - the actual prompt. Default is a person performs a cartwheel, which is both a fine test and a hint at how literal you should be: describe the action, not the aesthetic. "A dancer swings her hips, bends back, and looks upwards" works; "epic cinematic dancing" does not.

The MD_CONDITIONING output feeds the md_cond input on MotionDiff Simple Sampler.

Installation

Part of Fannovel16/ComfyUI-MotionDiff. Install via ComfyUI Manager (search "ComfyUI MotionDiff") or cd ComfyUI/custom_nodes && git clone https://github.com/Fannovel16/ComfyUI-MotionDiff, install requirements, restart. The pack pulls a heavy dependency list and auto-downloads model weights on first use, so the first run is slow regardless of which node you start with.

Gotchas

Prompt style genuinely matters here. These models were trained on the HumanML3D dataset, whose captions are plain, short action descriptions - write prompts like the dataset, not like a negative-prompt essay. A common beginner mistake is wiring md_clip from the wrong place or skipping motion_data, which just makes the sampler error out on the missing conditioning. And remember the frames you set upstream: Empty Motion Data caps at 196 frames (about 9.8 seconds at the dataset's 20 fps), and that length is baked into the conditioning here.

CategoryMotionDiff

Inputs (3)

NameTypeDefaultDescription
md_clipMD_CLIP
motion_dataMOTION_DATA
textSTRINGa person performs a cartwheel

Outputs (1)

NameTypeDescription
MD_CONDITIONINGMD_CONDITIONING