Animate Diff Sampler
KSampler that denoises a whole clip with motion baked in
- motion_module
- model
- positive
- negative
- latent_image
- sliding_window_opts
- LATENT
This is the node doing the actual work in an AnimateDiff graph - it's a KSampler that also knows about time. Same job (denoise a latent using your model and conditioning), same knobs (steps, cfg, sampler, scheduler, seed, denoise), plus one thing a regular KSampler doesn't have: a motion_module input. That module turns a batch of otherwise-independent frames into something with coherent motion between them, instead of a flipbook of unrelated images that happen to share a prompt.
The trick behind it: AnimateDiff - the technique, not this specific node pack - injects a temporal attention module into a frozen SD 1.5 UNet. Trained once by researcher Yuwei Guo and collaborators back in 2023, it was never retrained on your checkpoint; it bolts onto whatever SD 1.5 model you're already using and adds attention across the time axis, so frame 5 "looks at" frame 4 and frame 6 while denoising. That's also why none of your existing SD 1.5 LoRAs, embeddings, or checkpoints have to change - the spatial weights stay exactly as they were, and this node is just the sampler smart enough to route the extra motion signal through them.
One honest note first: this is the ArtVentureX implementation, one of the earliest ComfyUI ports of the technique. Kosinkadink's ComfyUI-AnimateDiff-Evolved (the ADE_* nodes) is the fork most current tutorials build around and is still getting maintenance commits in 2026, while this pack's own README hasn't picked up a substantive update since late September 2023. That's not a reason to avoid this pack - it's simpler and it works - but if you hit a wall this article doesn't resolve, "try the Evolved nodes instead" is genuinely common advice, including in threads where someone was following this exact pack's README and getting stuck.
The inputs and outputs that matter
The essentials, in the order you'll actually think about them:
motion_module(MOTION_MODULE) - the output of anAnimateDiffLoadernode upstream. Forgetting this node entirely is the single most common way to end up with "AnimateDiff isn't doing anything."model,positive,negative,latent_image- exactly what you'd wire into a normalKSampler.latent_imageis typically anEmptyLatentImagewhere you've setbatch_sizeto your target frame count (or matched it automatically viaImageSizeAndBatchSize).frame_number(default 16, range 2–10000) - how many frames to generate. 16 isn't arbitrary: it's the native context length the motion module was trained on. Go past it and this pack's sliding-window mechanism (seesliding_window_optsbelow) kicks in automatically to keep motion coherent across longer clips.inject_method(default/legacy) - the README is blunt: "should be left default." No beginner reason to touch it.seed,steps(default 20),cfg(default 8),sampler_name(44 choices),scheduler(9 choices) - same tuning surface as any KSampler. Defaults are a reasonable baseline; AnimateDiff-era community workflows commonly landed on Euler-family samplers with modest CFG.denoise(default 1, 0–1) - full denoise for a fresh generation; lower it for a video-to-video pass over an existing latent.
Optional: sliding_window_opts (SLIDING_WINDOW_OPTS) - plug in this pack's SlidingWindowOptions node here to override the automatic sliding-window behavior once you go past 16 frames (context length, overlap, stride, closed-loop). Leave it disconnected and the defaults apply.
Output: a single LATENT, same as KSampler - decode it with VAEDecode, then hand the frames to AnimateDiffCombine to get an actual file out.
How to install it
Bundled with the pack - no separate install for this specific node.
Via ComfyUI Manager: search "comfyui-animatediff" and install.
Manually:
cd ComfyUI/custom_nodes
git clone https://github.com/ArtVentureX/comfyui-animatediff
Restart ComfyUI. Then, separately, you need an actual motion module file - this node is useless without one loaded through AnimateDiffLoader. Download one (the README links Google Drive, HuggingFace, CivitAI, and Baidu NetDisk mirrors for the original modules, plus community-finetuned alternatives like manshoety/AD_Stabilized_Motion) and drop it in comfyui-animatediff/models/.
Common issues & troubleshooting
CUDA error: invalid configuration argument. This is a documented xformers bug that this specific AnimateDiff cross-attention pattern triggers. The workaround from the pack's own README is to launch ComfyUI with --disable-xformers.
Output looks like coherent noise, not an animation. Check the basics first: is motion_module actually connected, and does your latent_image batch size match frame_number? If wiring checks out and you're still getting garbage, it's worth trying ComfyUI-AnimateDiff-Evolved's equivalent nodes on the same workflow as a diagnostic - that's a real, common redirect for this exact symptom.
The clip visibly splits into a different "scene" partway through. A known AnimateDiff limitation, not specific to this sampler. The README's own fixes: shorten your prompt and negative prompt, get closer to 512x512 resolution (the module's training resolution), and try --disable-xformers.
Visible watermark ghosting, especially with the mm_sd_v15 module. The original training data reportedly contained Shutterstock-watermarked clips, and mm_sd_v15 in particular can reproduce a faint version of it. Switch to a community-finetuned motion module instead.
Wondering if this is still the right tool for a new project. AnimateDiff's old edge - looping, arbitrary length, per-frame ControlNet on modest VRAM - has largely been matched by Wan-based tooling since late 2025. Starting fresh with no SD 1.5 investment, it's worth comparing against Wan 2.2. Already have an SD 1.5 pipeline, or specifically want AnimateDiff's morphing, dreamlike motion? This is still the right node.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| motion_module | MOTION_MODULE | — | |
| inject_method | COMBO | 2 options: default, legacy | |
| frame_number | INT | 162–10000 | — |
| model | MODEL | The model used for denoising the input latent. | |
| seed | INT | 00–18446744073709550000 | The random seed used for creating the noise. |
| steps | INT | 201–10000 | The number of steps used in the denoising process. |
| cfg | FLOAT | 8.00–100 | The Classifier-Free Guidance scale balances creativity and adherence to the prompt. Higher values result in images more closely matching the prompt however too high values will negatively impact quality. |
| sampler_name | COMBO | The algorithm used when sampling, this can affect the quality, speed, and style of the generated output. | |
| scheduler | COMBO | The scheduler controls how noise is gradually removed to form the image. | |
| positive | CONDITIONING | The conditioning describing the attributes you want to include in the image. | |
| negative | CONDITIONING | The conditioning describing the attributes you want to exclude from the image. | |
| latent_image | LATENT | The latent image to denoise. | |
| denoise | FLOAT | 1.000–1 | The amount of denoising applied, lower values will maintain the structure of the initial image allowing for image to image sampling. |
| sliding_window_optsopt | SLIDING_WINDOW_OPTS | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| LATENT | LATENT | The denoised latent. |