Nodes/ComfyUI-MotionThiefExperiment/Motion Ref Settings (Custom)
ComfyUI Node

Motion Ref Settings (Custom)

Hand-pick which attention layers steal motion

By logtd·Created 2 years ago·Updated 2 years ago· 42
Motion Ref Settings (Custom)
  • prev_settings
  • MOTION_REF_SETTINGS
enabledtrue
q_bankfalse
k_bankfalse
v_bankfalse
norm_bankfalse
norm_fidelity0.00
input_1false
input_2false
input_3false
input_4false
input_5false
input_6false
input_7false
input_8false
output_1false
output_2false
output_3false
output_4false
output_5false
output_6false
output_7false
output_8false
output_9false
output_10false
output_11false
output_12false

Motion Ref Settings (Custom) is the same idea as the pack's default settings node, but with the training wheels off. Where the default gives you three knobs, this one hands you 30-odd switches and says "good luck." If you're reaching for it, you already know the default preset isn't transferring the motion you want - too weak, too strong, or dragging the reference's subject into your frames. This is where you actually experiment.

It's part of the same experimental MotionThief pack (SD 1.5/AnimateDiff only, author's own disclaimer: hacky, for experiments, not compatible with a lot of things). Like its sibling, it doesn't do anything by itself - it builds a MOTION_REF_SETTINGS object for Apply Ref Motion.

What all the switches do

Every temporal attention layer in the AnimateDiff UNet lives in one of 8 input blocks or 12 output blocks. That's why the inputs are named the way they are:

  • input_1 … input_8 - toggle each of the 8 input temporal blocks on or off.
  • output_1 … output_12 - same for the 12 output blocks.

A layer that's on participates in the reference transfer during Apply Ref Motion's WRITE and READ passes. A layer that's off just runs normally. The default settings node is exactly one configuration of this one: norm_bank on, the first strength output toggles on, everything else off. So anything you can do with the default node, you can do here with finer control - plus block-level precision.

Then there are four bank toggles, which choose what gets recorded from the reference and replayed into your generation:

  • k_bank / v_bank - store the reference's attention keys/values and concatenate them into your attention context. This is the "attend to the reference's motion" mode, the soft, blendable option.
  • q_bank - replace your attention query with the reference's. Harder replacement, more aggressive copying.
  • norm_bank - store the reference's hidden states and let your attention read from them. This is the mode the default node uses.
  • norm_fidelity (float, 0–1, default 0) - blends between the reference-steered result and a re-run of your own generation's attention. Only kicks in when norm_bank is on; at the default 0 the bank simply steers via concatenation, and as you raise it, more of your own motion gets mixed back in.

Reading the wrapper code, the k/v banks concatenate into your context (steer), while q/k/v replacement swaps your tensors wholesale (much stronger, and a good way to overfit the reference clip). Start with norm_bank plus a modest norm_fidelity, and only reach for q/k/v replacement if you're deliberately chasing the reference's exact motion.

enabled (default true) and prev_settings (optional) work exactly like the default node: disable to pass the chain through untouched, chain multiple settings nodes to stack configurations.

The output

MOTION_REF_SETTINGS → into Apply Ref Motion's ref_settings input. Same as always; that's the only wire.

Installing it

ComfyUI Manager: search "ComfyUI-MotionThiefExperiment" and install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/logtd/ComfyUI-MotionThiefExperiment

No pip deps, no model downloads from the pack. The surrounding workflow needs ComfyUI-AnimateDiff-Evolved, VideoHelperSuite, an AnimateDiff motion module, and an SD 1.5 checkpoint - without a motion module applied first, there are no temporal blocks and none of these toggles mean anything.

Gotchas

  • More layers ≠ better. Each layer you enable is one more place the reference's features can drag your output toward its content. If the subject's identity is leaking into your frames, you're over-selecting.
  • The q/k/v toggles are the sharp edge. Full tensor replacement is powerful and unstable; if things start warping, disable them before you blame the sampler.
  • There's no saved-preset mechanism here. Keep notes on which combo worked - a stack of toggles is easy to lose track of between test runs.

It's a fiddly node for a fiddly pack, and that's the point. When the default's three knobs can't get the motion right, this is where you'll find out whether MotionThief can do what you want at all.

Categoryreference

Inputs (27)

NameTypeDefaultDescription
enabledBOOLEANtrue
q_bankBOOLEANfalse
k_bankBOOLEANfalse
v_bankBOOLEANfalse
norm_bankBOOLEANfalse
norm_fidelityFLOAT0.000–1
input_1BOOLEANfalse
input_2BOOLEANfalse
input_3BOOLEANfalse
input_4BOOLEANfalse
input_5BOOLEANfalse
input_6BOOLEANfalse
input_7BOOLEANfalse
input_8BOOLEANfalse
output_1BOOLEANfalse
output_2BOOLEANfalse
output_3BOOLEANfalse
output_4BOOLEANfalse
output_5BOOLEANfalse
output_6BOOLEANfalse
output_7BOOLEANfalse
output_8BOOLEANfalse
output_9BOOLEANfalse
output_10BOOLEANfalse
output_11BOOLEANfalse
output_12BOOLEANfalse
prev_settingsoptMOTION_REF_SETTINGS

Outputs (1)

NameTypeDescription
MOTION_REF_SETTINGSMOTION_REF_SETTINGS