Nodes/ComfyUI-VideoQuality-Metrics/VQ Fréchet Video Distance (FVD)
ComfyUI Node

VQ Fréchet Video Distance (FVD)

The number video-model papers end their abstracts with, inside your workflow

By jajos12·Created 7 months ago·Updated 7 months ago· 1
VQ Fréchet Video Distance (FVD)
  • video_generated
  • video_reference
  • fvd
  • summary

Fréchet Video Distance is to video what FID is to images: the paper-publishing standard for "how close is my generated video to real video." This node drops that measurement into ComfyUI so you can benchmark your own outputs instead of just reading other people's abstracts.

FVD is a distributional metric. It doesn't compare a generated clip to a reference clip frame-by-frame. It encodes a whole set of generated clips and a whole set of reference clips, fits a statistical distribution to each, and measures how far apart those distributions are. Lower is better; under ~50 means you're in state-of-the-art territory, 50–150 is good, 150–300 is mediocre, above 300 your video distribution has wandered off.

You reach for this in the comparative-benchmarking scenario: two video models, two samplers, two upscaling chains - which one produces video that's statistically closer to real footage? That's FVD's job, and it's the one metric in this pack that judges video (motion included), not just a pile of frames.

How it works

Every clip is passed through an R3D-18, a 3D ResNet pretrained on Kinetics-400, which is a backbone explicitly built for video - it sees spatiotemporal structure, not just stills. Each clip becomes a 512-dimensional feature vector, the batch's features are modeled as a Gaussian (mean + covariance), and the node computes the Fréchet distance between the two Gaussians: the mean gap plus a covariance term. It's the same math as FID, just with a video backbone. The encoder weights download automatically on first use (~60 MB from torchvision).

Inputs and outputs

Required:

  • video_generated (IMAGE) - your generated clips, stacked as [N, T, H, W, 3].
  • video_reference (IMAGE) - real/reference clips, same format.

No optional inputs.

Outputs:

  • fvd (FLOAT) - the distance. Lower is better.
  • summary (STRING) - formatted report with the score and assessment. Wire to a text display.

Installing

It ships in ComfyUI-VideoQuality-Metrics, installed once for the whole pack:

cd ComfyUI/custom_nodes
git clone https://github.com/jajos12/ComfyUI-VideoQuality-Metrics
pip install -r ComfyUI-VideoQuality-Metrics/requirements.txt

Restart ComfyUI, find it under VideoQuality/Distributional. Or install via ComfyUI Manager by searching "VideoQuality Metrics".

Common issues

  • The big one: FVD needs batches, not a single clip. To fit a covariance you need multiple videos per side - the implementation's own docs say at least 2, and honestly you want more like 20+ for a stable number. Feed it one generated clip and one reference clip and the covariance collapses to an identity matrix, turning FVD into a squared feature-mean difference that has nothing to do with published FVD values. This is the #1 way people get a meaningless number out of this node.
  • The clips in each batch should be roughly the same length. R3D-18 handles the frame dimension internally, but wildly different lengths make the "distribution" fuzzy.
  • First run downloads the R3D-18 weights. Slow the first time, cached after.
  • FVD is biased toward per-frame quality over temporal coherence - a clip that glitches between frames can score fine because each frame is still "real-looking." Pair it with the temporal nodes (warping error, motion smoothness) if you care about motion.
CategoryVideoQuality/Distributional

Inputs (2)

NameTypeDefaultDescription
video_generatedIMAGE
video_referenceIMAGE

Outputs (2)

NameTypeDescription
fvdFLOAT
summarySTRING