Nodes/AnimateDiff Evolved/AnimateDiff Unload πŸŽ­πŸ…πŸ…“
ComfyUI Node Runs on cloud

AnimateDiff Unload πŸŽ­πŸ…πŸ…“

Detaching the motion module from a model mid-graph

By KosinkadinkΒ·Created 3 years agoΒ·Updated 12 days agoΒ· 3,519
AnimateDiff Unload πŸŽ­πŸ…πŸ…“
  • model
  • MODEL

Probably the simplest node in this entire pack, and worth knowing about precisely because it's easy to overlook: AnimateDiff Unload takes a model with a motion module injected into it and hands back a plain model with that injection removed. One input, one output, no settings.

Why you'd want this

AnimateDiff works by patching a motion module directly into your model's UNet - that's the whole trick that lets it drop into any SD 1.5 checkpoint without retraining. But that means the model object flowing through your graph is the animated version once a loader has touched it, and if you branch your workflow to also do a plain, non-animated pass - a still-image preview, a different sampling stage, anything that shouldn't carry temporal weights - you need a clean way to get back to a model that behaves normally. That's this node's entire job.

It's also useful simply to make your intent explicit in a complex graph: rather than relying on a separate, un-patched model loader elsewhere for the non-animated branch, wiring this in after your animated pass documents exactly where the motion module stops applying.

Inputs and output

  • model (MODEL, required) - the model with a motion module currently injected.
  • Output: MODEL - the same model with that injection removed, ready to sample normally or feed into a different pipeline.

That's the whole node. No optional inputs, no settings to tune.

Installing the pack

ComfyUI Manager: search AnimateDiff Evolved, confirm the author is Kosinkadink, install, restart. Manually:

cd ComfyUI/custom_nodes
git clone https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved

restart ComfyUI. This node has no model-file dependency of its own - you only need the base pack installed, plus whatever motion module you loaded earlier in the graph (mm_sd_v15_v2, v3_sd15_mm, etc., in ComfyUI/models/animatediff_models) for there to be anything to unload.

Common issues

You expected a VRAM drop and didn't see one. This node removes the motion module's hooks from the model object in your graph - it's a correctness/isolation tool for the pipeline, not primarily a memory-management feature. If you're trying to actually free VRAM between runs, that's more a matter of how ComfyUI's model cache and your workflow's overall memory footprint behave than something this single node controls on its own.

Downstream nodes still seem to behave like AnimateDiff is active. Double check the unloaded MODEL output is actually what's feeding your downstream sampler - if a branch of your graph is still pulling from the model output before this node (rather than after it), you're sampling the still-animated version regardless of this node existing elsewhere.

You're not sure you need this at all. If your workflow only ever does one animated pass and doesn't reuse the model object for anything else afterward, you likely don't need this node - it exists specifically for graphs that branch between animated and non-animated use of the same base checkpoint.

CategoryAnimate Diff πŸŽ­πŸ…πŸ…“/extras

Inputs (1)

NameTypeDefaultDescription
modelMODELβ€”

Outputs (1)

NameTypeDescription
MODELMODELβ€”