Nodes/ComfyUI_MagicClothing/Human Garment AnimateDiff Generation
ComfyUI Node

Human Garment AnimateDiff Generation

Your shirt, on a model who refuses to stand still

By frankchieng·Created 2 years ago·Updated 2 years ago· 594
Human Garment AnimateDiff Generation
  • cloth_image
  • images
prompta photography of a model
model_path
pipe_path
motion_adapter_path
num_images_per_prompt1
negative_promptbare, monochrome, lowres, bad anatomy, worst quality, low quality
seed42
guidance_scale2.5
cloth_guidance_scale3.0
sample_steps20
height768
width576

Take the MagicClothing trick - a garment photo conditioning an SD 1.5 generation - and set the whole thing in motion. That's this node. It's the same "synthesize a model wearing your clothes" pipeline as the Generate node, but with an AnimateDiff motion module bolted on, so instead of one image you get a short clip of the model turning, swaying, moving in the garment. It's the demo reel node of the pack: there is no practical reason to own it, and it's a lot of fun anyway.

Be honest about what this is, though. AnimateDiff is 2023 tech and, by any current measure, superseded - the community moved to Wan and the rest of the modern video stack years ago, and the KB's verdict is blunt: don't start a video project on AnimateDiff. What survives is a look, and this node is a very narrow flavor of it: virtual try-on, animated, at SD 1.5 quality, with all of AnimateDiff's old limitations (short clips, temporal wobble, VRAM appetite). If your end goal is "shirt on a moving person," a modern pipeline beats this in a weekend. If your goal is "weirdly satisfying 2-second cloth demo," you're in the right place.

How it works

Under the hood it builds an OmsAnimateDiffusionPipeline - a diffusers text-to-video pipeline using the guoyww/animatediff-motion-adapter-v1-5-2 MotionAdapter injected into the SD 1.5 UNet, plus MagicClothing's cloth-guidance attention adapter so the garment stays recognizable across frames. Each run produces a batch of frames (16 per clip, AnimateDiff's native context). The output is a single images tensor - not a file. To get a video you wire it into a video-save node like Save Animated WEBP or VHS VideoCombine.

The inputs that matter

Required: cloth_image, prompt, model_path (the adapter in the node's checkpoints/), pipe_path (base SD 1.5 model, Realistic Vision V4.0 by default), and motion_adapter_path (already set to the guoyww adapter - you generally leave it). The optional dials mirror the Generate node: num_images_per_prompt (how many clips per run), seed, sample_steps (20), guidance_scale (2.5), cloth_guidance_scale (3), height/width (768×576). No FaceID or pose modes here - it's the plain garment-only workflow, animated.

Installing it

Same story as the rest of the pack - ComfyUI Manager (search "ComfyUI_MagicClothing") or:

cd ComfyUI/custom_nodes
git clone https://github.com/frankchieng/ComfyUI_MagicClothing.git
cd ComfyUI_MagicClothing
pip install -r requirements.txt

Then restart and drop the models in. The important difference: this node needs two extra files - garment_extractor.safetensors and ip_layer.pth - placed in checkpoints/stable_ckpt/ inside the node folder, alongside the usual cloth_segm.pth and adapter from ShineChen1024/MagicClothing on HuggingFace. The README calls this out, and missing them means the node fails at the first load - there's no graceful "download me" fallback.

Common issues

  • Missing stable_ckpt files is the #1 failure mode - the code loads them by exact path, so a typo in the folder name breaks it.
  • The dependency pin trap applies twice here. The pack's requirements.txt pins a 2024 CUDA 11.8 stack (torch 2.1.1, numpy 1.25.1, transformers 4.31.0), and on top of that you're running the whole AnimateDiff stack on it. A modern ComfyUI venv plus this requirements file is a conflict waiting to happen; install it with your eyes open.
  • VRAM. The cloth adapter deep-copies the UNet for its reference pass, and now you're adding a motion module and 16 frames of latents on top. This is the heaviest node in the pack. Expect it to breathe on 8GB and to want more.
  • First run downloads the base model, VAE, and the motion adapter from HuggingFace - several GB and an internet connection, like the other nodes.

It's the pack's least-used node (the search stats say so - it has effectively zero traffic), and it's never going to be anyone's production pipeline. But as a "here's your jacket, now it moves" party trick, it works, and it's the one to try after you've got Generate running. Just keep your expectations set to 2024.

CategoryMagicClothing

Inputs (13)

NameTypeDefaultDescription
cloth_imageIMAGE
promptSTRINGa photography of a model
model_pathCOMBO0 options:
pipe_pathCOMBO3 options: SG161222/Realistic_Vision_V4.0_noVAE, Lykon/dreamshaper-8, redstonehero/xxmix_9realistic_v40
motion_adapter_pathCOMBO1 options: guoyww/animatediff-motion-adapter-v1-5-2
num_images_per_promptoptINT11–10
negative_promptoptSTRINGbare, monochrome, lowres, bad anatomy, worst quality, low quality
seedoptINT42
guidance_scaleoptFLOAT2.51–10
cloth_guidance_scaleoptFLOAT3.01–10
sample_stepsoptINT201–100
heightoptINT768256–1024
widthoptINT576192–768

Outputs (1)

NameTypeDescription
imagesIMAGE