Automated QC

Quality gates: every still and clip is checked before it counts

How mvdirector scores generated stills and clips, retries failures with a new seed or a rewritten prompt, and sends only the right shots to a person. Includes a live QC score calculator and an honest note on lip-sync measurement.

4 min read · checked against mvdirector 0.8.0b2 · updated 2026-11-26

Generative models fail in ordinary ways: an extra finger, a costume that changed, a face that is too small to sync, a clip that never moves. mvdirector treats those as expected, measures them, and retries automatically. Stills gate videos, so no video GPU time is spent on a still that has not passed.

Hard checks and weighted scores

Each check returns a status, an optional 0 to 1 score, a hard flag, a human-readable detail, a fix hint that feeds the next attempt, and the raw metrics. A failed hard check rejects the attempt outright. Otherwise the attempt passes when the weighted average of its scores reaches qc.pass_score (default 0.70). Checks that cannot run are recorded as skipped with a reason, so the manifest always shows what was and was not verified.

Live QC score calculator · still checks
0.80
0.90
0.85
0.90
0.90
Weighted score0.88

Passes: the still goes on to video generation.

Uses the engine's aggregation and default config: score = Σ(score × weight) ÷ Σ(weight); an attempt passes with no hard failure and a score of at least 0.70. Weights and hard minimums are the defaults from config.py; identity is skipped by default and omitted here.

What is checked

Still checkHardWhat it measures
dimensionsYesAspect ratio and minimum resolution.
sharpnessNoVariance of the Laplacian on a 512 px grayscale copy.
face_presentYesA face is detected on singer shots (MediaPipe by default).
face_framingLip-sync or oversizedFace height within the range for the shot's framing: catches tiny mouths and oversized foreground figures.
no_peopleYesUnexpected faces in b-roll cutaways.
vision_specYesVision LLM: framing, set, scale, action, production rules and explicit exclusions.
vision_artifactsYesVision LLM: hands, limbs, faces, anatomy, garbled text, watermarks and overlaid typography.
vision_characterYesVision LLM shown the reference sheet: same person, right costume, marks on the correct side.
Clip checkHardWhat it measures
dimensions, durationYesUsable file, long enough for the shot plus its handle. If these fail, later measurements are skipped.
temporalStatic or cutFrozen clips, abrupt scene changes (relaxed for deliberate multi-cut montage), flicker.
face_presenceYesA face is tracked through the clip on lip-sync shots.
lipsyncAdvisoryMouth-to-vocal sync within the allowed lag. A weak score sends the shot to review.
vision_*As for stillsThe vision model judges frames sampled across the clip, including morphing between frames.

The retry ladder

  1. 1

    1. New seed

    Same prompt, new seed. Used first on stochastic artifact and sync failures.

  2. 2

    2. Rewrite the prompt

    The LLM rewrites the prompt from the QC failure reasons and fix hints. It is jumped to immediately on attempt 2 when a spec, no-people or face-framing check fails.

  3. 3

    3. Adjust parameters

    Applies retry.adjust_params, for example more sampling steps, if the workflow binds them.

Each asset gets up to retry.max_attempts (default 4). When attempts run out, the best-scoring attempt is kept and the shot is queued for review. A failed ComfyUI job counts as an attempt; an unreachable server stops the run without using any. retry.max_generations_per_run caps total spend, and the run stops cleanly when it is reached.

Lip-sync measurement, honestly

The built-in lip-sync score tracks mouth opening per frame with MediaPipe, computes vocal loudness over each frame's time window, and takes the best Pearson correlation within a lag window (±0.25 s by default). It assumes the mouth opens when the voice is loud, which holds on close and medium shots of clearly sung lines and is weaker on mumbled, heavily processed or very fast vocals.

In a manual comparison on sung vocals, 9 clips judged by eye, it did not separate in-sync from out-of-sync clips. So it is advisory by default: a weak score queues the shot for review with the score shown instead of failing and retrying it. Set qc.video.lipsync_blocking: true to make it a hard check, or switch to the ByteDance LatentSync SyncNet scorer (qc.lipsync_backend: stable_syncnet). For tight singing sync, the engine docs recommend pairing the workflow with a dedicated lip-sync model such as InfiniteTalk, LatentSync or Seedance.

Review that scales

Quality checks and retries behave identically in both review modes; the mode only decides what reaches a person.

light (default)strict
Shots that ran out of attemptsQueuedQueued
Shots that passed QCA deterministic sample is queuedNot queued
AssemblyWaits for decisions on queued shotsWaits only for exhausted shots

The light-mode sample contains every close-up, a share of other shots, every shot that needed a retry, and every shot that passed narrowly. Rejecting a shot escalates its shot type: all other shots of that type are queued too. A reviewer's note becomes direction for the next attempt.

Real production walkthrough: Sugar and Ash

Rather than cherry-picking isolated frames, here is how the actual stages line up on our 123.05 BPM benchmark track Sugar and Ash — from locked 4-panel costume states through QC-gated stills and burned-in SMPTE review frames.

Real production trace · Sugar and Ash (123.05 BPM)
Stage 1 · Locked 4-Panel Cast Sheet (Wardrobe Evolution)

Compare base vs. edited wardrobe state — identical face locked before any scene still runs.

Sugar and Ash locked 4-panel character reference sheet — clean wardrobe state
Stage 2 · Approved Still
Stage 2 · Approved Still

Close-up passes face_framing & vision_character against locked sheet.

Stage 3 · On-Frame Review
Stage 3 · On-Frame Review

Burned-in timecode frame sent to director & reviewers before motion.

Stage 4 · Chorus Drop Frame
Stage 4 · Chorus Drop Frame

Video clip generated only from the approved still at 123.05 BPM.

Every frame below is an unedited asset from the Sugar and Ash production run. Stills must clear qc.pass_score (0.70) and all hard minimums (vision_spec ≥ 0.60, vision_artifacts ≥ 0.50, vision_character ≥ 0.40) before video generation starts.

Calibrate to your own models

Thresholds are starting values. Generate a batch, label 20 to 30 clips good or bad, then run mvd calibrate: for every recorded metric it prints the cut that best separates your labels, the balanced accuracy of that cut, and the project.yaml key it belongs to. A balanced accuracy near 0.5 means the metric does not separate your clips, so leave that threshold alone. mvd qc-report shows per-check pass, fail and skip counts.

Frequently asked questions

What happens when a still fails a hard quality check?
A hard failure rejects the still immediately even if the weighted average is above 0.70. The engine then runs the retry ladder (new seed, prompt rewrite from fix hints, or parameter tweak) up to retry.max_attempts.
Why is default lip-sync scoring advisory instead of blocking?
Simple mouth-opening-to-loudness correlation works well on clean close-ups but can misclassify stylized or heavily processed singing. Keeping it advisory queues borderline clips for human review rather than burning GPU credits on false retries.
Can I tune QC thresholds for my specific image or video model?
Yes. Label 20 to 30 clips good or bad and run mvd calibrate to compute the exact cutoff and balanced accuracy for every recorded metric in your project.