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

AD Per Block πŸŽ­πŸ…πŸ…“

Turning motion off in specific parts of the U-Net

By KosinkadinkΒ·Created 3 years agoΒ·Updated 8 days agoΒ· 3,520
AD Per Block πŸŽ­πŸ…πŸ…“
  • down
  • mid
  • up
  • PER_BLOCK

Displayed as AD Per Block, this is where per-block customization for a motion model starts. A motion module doesn't inject its temporal layers everywhere at once - it attaches to the U-Net's structure at three levels: down blocks (encoder side), the mid block (bottleneck), and up blocks (decoder side). This node lets you selectively control the module's influence at each of those three groups individually, then bundles the result into a PER_BLOCK object that feeds an Apply node's per_block input, or a keyframe's per_block_replace if you want that customization to change partway through the clip.

This is deep-end tuning aimed at a specific problem: motion that's too strong or too weak in one region of the network's structure, not the overall frame. The README's mention of "merging motion model weights/components, including per block customization" as an upcoming/evolving area of the pack is a fair signal of where this sits - advanced, and not something a first AnimateDiff workflow needs.

How it works

Each of the three inputs - down, mid, up - takes an AD_BLOCK value from a separate feeder node elsewhere in the pack, which configures that specific block group's behavior (how strongly the motion module's temporal layers act at that structural level). This node's job is purely to collect whichever of the three you've configured into one combined PER_BLOCK bundle; leaving any of them unplugged means that block group keeps its default, unmodified behavior.

The inputs and outputs that matter

All three inputs are optional, and none are required: down, mid, up - each type AD_BLOCK. Output is a single PER_BLOCK, which fits an Apply node's per_block optional input (seen on nodes like ADE_ApplyAnimateDiffModelWithCameraCtrl) or a keyframe's per_block_replace slot if you want it scheduled rather than static.

How to install it

Standard for the pack - ComfyUI Manager, search AnimateDiff Evolved by Kosinkadink, or:

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

No model download for this node specifically - it's a configuration layer on top of a motion model you've already loaded.

Common issues & troubleshooting

Left all three inputs unplugged and nothing changed. Correct behavior - an empty AD_PerBlock node is a no-op. You need to feed at least one of down/mid/up from an actual AD_BLOCK node upstream for this to do anything.

Not sure which block group to touch for a given problem. There's no substitute here for trial and error, and the pack doesn't document a clean mapping from "symptom" to "which block to adjust" - down blocks tend to affect broader, lower-resolution structure, up blocks tend to affect finer detail, and mid sits in between, but treat that as a starting intuition rather than a guarantee. Change one block group at a time so you can actually see what each does.

Wondering if you need this at all. Almost certainly not for a typical AnimateDiff workflow. scale_multival/effect_multival on a normal Apply node control overall motion strength for the whole model and cover the vast majority of "more or less motion" requests. Reach for per-block control only once you've identified a problem specific to one structural layer of the network that a global strength adjustment can't fix.

CategoryAnimate Diff πŸŽ­πŸ…πŸ…“/per block

Inputs (3)

NameTypeDefaultDescription
downoptAD_BLOCKβ€”
midoptAD_BLOCKβ€”
upoptAD_BLOCKβ€”

Outputs (1)

NameTypeDescription
PER_BLOCKPER_BLOCKβ€”