Nodes/ComfyUI-WanAnimatePreprocessV2/Wan-Animate Face Quality Check (V2)
ComfyUI Node

Wan-Animate Face Quality Check (V2)

Score each face crop on (a) Laplacian-variance sharpness and (b) eye-region brightness, then optionally repair bad frames by copying the previous good frame or by simple sharpening. Bad face conditioning frames cause the Wan-Animate face encoder to produce drifting / wrong-direction gaze (paper Sec. 4.3). Connect this BETWEEN Pose-and-Face-Detection (V2)'s `face_images` output and your downstream face-id encoder.

By Code2Collapse·Created 7 months ago·Updated 12 days ago· 17
Wan-Animate Face Quality Check (V2)
  • face_images
  • face_images_repaired
  • good_frame_ratio
  • report_json
blur_threshold50
min_eye_brightness0.10
auto_repair_bad_framestrue
repair_strategycopy_previous_good
CategoryWanAnimatePreprocess_V2

Inputs (5)

NameTypeDefaultDescription
face_imagesIMAGEPer-frame 512x512 face crops (output of Pose and Face Detection V2).
blur_thresholdFLOAT500–5000Laplacian-variance threshold below which a frame is flagged as blurry. Typical sharp 512x512 frames score 100-1000; <50 indicates motion blur or out-of-focus.
min_eye_brightnessFLOAT0.100–1Minimum mean luma of the eye-region strip (rows 30%-55%). Below this, eyes are likely closed or the frame is too dark for the encoder to read gaze.
auto_repair_bad_framesBOOLEANtrueIf true, repair frames flagged as bad. If false, just report stats.
repair_strategyCOMBOcopy_previous_goodcopy_previous_good: replace with last good frame. unsharp_mask: deconvolve-style sharpening. skip: leave untouched but report.

Outputs (3)

NameTypeDescription
face_images_repairedIMAGERepaired face IMAGE batch (same shape as input).
good_frame_ratioFLOATFraction of frames that passed BOTH thresholds (0..1).
report_jsonSTRINGJSON report: per-frame blur score, eye brightness, verdict, repair action.