Nodes/Animatediff MotionLoRA Trainer/ADMD_ValidationSampler
ComfyUI Node

ADMD_ValidationSampler

See your training working (or not) — the live progress preview

By kijai·Created 3 years ago·Updated 2 years ago· 187
ADMD_ValidationSampler
  • validation_settings
  • admd_pipeline
  • admd_pipeline
  • images

ADMD_ValidationSampler is how you watch a training run while it's still happening. Feed it the current admd_pipeline plus a VALIDATION_SETTINGS bundle from ADMD_ValidationSettings, and it runs a full text-to-video inference pass through the training UNet at its current weights - returning the rendered frames as an IMAGE so you can preview, and a video file, whether the motion is emerging yet or the model is just smearing pixels.

It's a diagnostic node, and the workflow shape treats it that way. In the example graphs, TrainLora runs a chunk of steps (100), then ValidationSampler renders what those steps bought you, then SaveLora snapshots the weights - repeated five times. Each validation render is the "does my motion look like my clip yet" checkpoint before you commit another chunk of GPU time.

How it works

The sampler switches the UNet out of training mode (unet.eval(), gradient checkpointing off), scales the spatial LoRAs to your spatial_scale (default 0.5, so the learned look is half-silenced while the motion comes through), and runs the validation pipeline - the frozen SD 1.5 base plus AnimateDiff motion module plus your trained LoRAs - with your seed, inference steps, and guidance. The output video length is taken from your input frames' batch dimension, which is why the "16 frames in" convention carries through to validation: it generates a 16-frame clip. Output images previews in the UI and (in the shipped workflow) feeds a VHS_VideoCombine; the admd_pipeline passes through so the training chain continues.

What to look for

The comparison test is the whole game: leave validation_prompt empty and you're validating on the training prompt - that tells you the run is working but not much else. Give it an unrelated subject and you see whether the motion transferred or the model just learned the training video's look. Early runs will be noisy and wobbly; that's normal. If frames are static even late in the run, your temporal LoRA isn't taking - check the training prompt (it should describe action, not content) and your learning rate. If frames move but nothing else is right, spatial_scale was too high and the spatial LoRA's memorized look is drowning the generation.

Install and gotchas

Standard pack install (Manager → "ADMotionDirector", or clone + pip install -r requirements.txt). This node is the VRAM spike in the training rhythm: validation holds the full 3D UNet plus the frozen validation pipeline in memory while rendering, right after a training chunk warmed the card. If runs die at the validation step, drop your input resolution (256/384 are the reliable sizes per the shipped notes) before touching anything else. And be patient with each render - a 25-step, 16-frame validation clip isn't instant, but it's the difference between trusting a loss curve and actually watching your motion appear.

CategoryAD_MotionDirector

Inputs (2)

NameTypeDefaultDescription
validation_settingsVALIDATION_SETTINGS
admd_pipelineADMDPIPELINE

Outputs (2)

NameTypeDescription
admd_pipelineADMDPIPELINE
imagesIMAGE