Nodes/BSAI-ComfyUI-FaceRefine/BSAI Face Refine (one-click HD face repair)
ComfyUI Node

BSAI Face Refine (one-click HD face repair)

One-click repair of deformed/broken/blurry faces in video; single and multi-person handled automatically, outputs high-definition faces.

By xm6018924·Created 2 months ago·Updated 3 days ago· 10
BSAI Face Refine (one-click HD face repair)
  • images
  • model
  • clip
  • vae
  • audio_vae
  • audio
  • identity_ref_1
  • identity_ref_2
  • identity_ref_3
  • identity_ref_4
  • images
  • report
  • face_count
◄detectorface_yolov8m.pt►
◄steps8►
◄denoise0.35►
◄canvas_size768►
◄small_face_denoise1.00►
◄confidence0.35►
◄crop_factor2.5►
◄smooth_window21►
◄schedulerbeta►
◄sampler_nameeuler►
◄seed0►
◄promptultra high definition close-up of a human face, crystal clear facial details, natural realistic skin texture, sharp detailed eyes, correct natural facial features, photorealistic, professional portrait quality►
◄enable_audio_locktrue►
◄identity_threshold0.28►
◄paste_regionface_only►
◄mask_dilation24►
◄feather24►
◄colour_match1.00►
◄blend1.00►
◄stage2_enablefalse►
◄stage2_engine1xSkinContrast (skin detail, fastest)►
◄stage2_scale2.0►
◄stage2_cfg0.5►
◄stage2_steps1►
◄stage2_fidelity0.60►
◄stage2_blend0.70►
◄stage2_temporal0.50►
◄undetected_framesfade_out►
◄person_fallbackfalse►
◄use_npu_face_detecttrue►
CategoryBSAI/H3 Face Refine

Inputs (40)

NameTypeDefaultDescription
imagesIMAGESource video frames (any length; full frame rate recommended)
modelMODELMiniMax H3 video model (TURBO 4/8-step model recommended)
clipCLIPH3 text encoder (Qwen3VL-MiniMax-H3)
vaeVAEH3 video VAE
audio_vaeVAEH3 audio VAE (required when audio lock is enabled)
detectorCOMBOface_yolov8m.ptFace detection model picked from models/ultralytics/bbox. Only files registered with folder_paths are selectable; free-text paths are not accepted.
stepsINT81–32H3 redraw sampling steps (reference workflow uses 8)
denoiseFLOAT0.350–1Face redraw strength applied to large-face frames. Small-face frames automatically use full strength (reference workflow: large face 0.35, small face 1.0). Raise to 0.5-0.55 for badly broken faces.
canvas_sizeINT768512–2048Square face-crop canvas size. 768 is H3's native recommendation; larger is sharper but uses more VRAM
small_face_denoiseFLOAT1.000–1Redraw strength for small-face frames (reference workflow 1.0). Smoothly interpolated by face size between frames
confidenceFLOAT0.350.05–1—
crop_factorFLOAT2.51.2–6Expansion factor around the face box to give the redraw context
smooth_windowINT211–121Temporal smoothing window for crop position
schedulerCOMBObeta5 options: beta, simple, karras, sgm_uniform, exponential
sampler_nameCOMBOeuler6 options: euler, euler_ancestral, dpmpp_2m, dpmpp_sde, uni_pc, heun
seedINT00–9007199254740991—
promptSTRINGultra high definition close-up of a human face, crystal clear facial details, natural realistic skin texture, sharp detailed eyes, correct natural facial features, photorealistic, professional portrait qualityRedraw prompt. Default is a generic HD portrait enhancement prompt; override as needed
audiooptAUDIOOriginal video audio (used for lip/audio lock when enabled, keeps audio in sync)
identity_ref_1optIMAGEIdentity reference for person 1 (leave blank for single-person auto-largest-face tracking)
identity_ref_2optIMAGEIdentity reference for person 2 (multi-person)
identity_ref_3optIMAGEIdentity reference for person 3 (multi-person)
identity_ref_4optIMAGEIdentity reference for person 4 (multi-person)
enable_audio_lockoptBOOLEANtrueLock lip sync to the original video audio (requires audio_vae + audio)
identity_thresholdoptFLOAT0.280–1—
paste_regionoptCOMBOface_only3 options: face_only, face_ellipse, full_crop
mask_dilationoptINT240–256—
featheroptINT240–256—
colour_matchoptFLOAT1.000–1—
blendoptFLOAT1.000–1—
stage2_enableoptBOOLEANfalseEnable stage-2 detail enhancement (reuses the local BSAI-H3-upscale-4K engine; corresponds to the VOSR2 step in the reference video)
stage2_engineoptCOMBO1xSkinContrast (skin detail, fastest)Stage-2 engine: fast tier (1xSkinContrast skin detail / RealESRGAN / DLSS5 / FlashVSR / SeedVR2-INT8), extreme tier (VOSR generative detail), or face restoration (CodeFormer / GFPGAN)
stage2_scaleoptFLOAT2.01–4Stage-2 sampling scale. 1x engines (1xSkinContrast / 1xDeJPG) are pinned to 1x repair-only; other engines generate at this scale and the stitch layer maps back to original coordinates. VOSR needs at least 2x
stage2_cfgoptFLOAT0.5-2–2VOSR / SeedVR2 fidelity (higher = closer to the original face)
stage2_stepsoptINT11–25VOSR inference steps (1 = fastest single step; raise to 2-4 if texture is unsatisfactory)
stage2_fidelityoptFLOAT0.600–1CodeFormer fidelity (CodeFormer engine only)
stage2_blendoptFLOAT0.700.1–1CodeFormer blend strength (CodeFormer engine only)
stage2_temporaloptFLOAT0.500–1Face temporal stability (CodeFormer engine only)
undetected_framesoptCOMBOfade_out3 options: fade_out, skip, composite_anyway
person_fallbackoptBOOLEANfalseWide-shot small-face fallback: only on frames where the face detector completely loses the face, use the person whole-body segmentation model to back-derive the head from the top of the body box. Note: it participates in trajectory smoothing, so in medium/night shots a low estimate can drag the crop box onto the neck and cause noise. Off by default; enable only when you confirm pure wide-shot small faces with frequent lost face boxes. Requires models/ultralytics/segm/person_yolov8m-seg.pt.
use_npu_face_detectoptBOOLEANtrueEnable NPU face detection: auto-starts the NPU service (8191); face detection / landmarks / age recognition run on the Intel AI Boost NPU and do not use the GPU

Outputs (3)

NameTypeDescription
imagesIMAGE—
reportSTRING—
face_countINT—