{
 "load_video": {
  "class_type": "VHS_LoadVideo",
  "inputs": {
   "video": "__UPLOAD__/20261008_H3换人_源15v3_加速匹配原声_运动插值_1184x896_47.67s.mp4",
   "force_rate": 0.0,
   "custom_width": 0,
   "custom_height": 0,
   "frame_load_cap": 0,
   "skip_first_frames": 0,
   "select_every_nth": 1,
   "format": "None"
  }
 },
 "track": {
  "class_type": "H3FaceTrackCrop",
  "inputs": {
   "images": [
    "load_video",
    0
   ],
   "detector": "bbox/face_yolov8m.pt",
   "confidence": 0.35,
   "crop_factor": 2.5,
   "canvas_width": 768,
   "canvas_height": 768,
   "canvas_mode": "auto_capped_768",
   "smooth_window": 21,
   "size_smooth_window": 51,
   "smooth_method": "gaussian",
   "size_mode": "per_frame",
   "identity_track": true,
   "identity_threshold": 0.28,
   "select": "largest_face",
   "fallback_detector": "none",
   "fallback_head_frac": 0.5,
   "select_index": 0,
   "identity_model": "insightface",
   "cut_detection": "none",
   "cut_threshold": 3.0,
   "absent_shots": "off",
   "X": 0,
   "Y": 0,
   "frame_index": 0
  }
 },
 "unet": {
  "class_type": "UNETLoader",
  "inputs": {
   "unet_name": "minimax_h3_ref2va_pruned_int8_convrot.safetensors",
   "weight_dtype": "default"
  }
 },
 "lora": {
  "class_type": "LoraLoaderModelOnly",
  "inputs": {
   "model": [
    "unet",
    0
   ],
   "lora_name": "minimax_h3_ref2v_turbo_4step_v0.1_comfyui_bf16.safetensors",
   "strength_model": 1.0
  }
 },
 "clip": {
  "class_type": "CLIPLoader",
  "inputs": {
   "clip_name": "qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors",
   "type": "minimax",
   "device": "default"
  }
 },
 "vae": {
  "class_type": "VAELoader",
  "inputs": {
   "vae_name": "minimax_h3_video_vae_fp16.safetensors"
  }
 },
 "avae": {
  "class_type": "VAELoader",
  "inputs": {
   "vae_name": "minimax_h3_audio_vae_fp32.safetensors"
  }
 },
 "ref1": {
  "class_type": "LoadImage",
  "inputs": {
   "image": "__UPLOAD__/face1_front.jpg",
   "upload": "image"
  }
 },
 "ref2": {
  "class_type": "LoadImage",
  "inputs": {
   "image": "__UPLOAD__/face4_smile.jpg",
   "upload": "image"
  }
 },
 "reftv": {
  "class_type": "MiniMaxH3ReferenceToVideo",
  "inputs": {
   "clip": [
    "clip",
    0
   ],
   "vae": [
    "vae",
    0
   ],
   "audio_vae": [
    "avae",
    0
   ],
   "prompt": "face_refine 专用身份提示词（不描述场景与动作，只锁脸）\n<Picture 1> is the identity reference: a young East Asian woman with a soft oval face, fair warm skin, dark brown eyes, natural straight eyebrows, a small straight nose and natural pink lips, her black hair gathered up into a neat low bun with a clean hairline and a few fine loose strands at the temples.\n<Picture 2> is the same woman smiling with her teeth showing: it supplies only the shape and character of her real smile - the mouth opening, the line of her teeth, the lifted cheeks and the narrowed happy eyes.\nKeep her face exactly as in <Picture 1> in every frame: the same face shape, the same features and proportions, the same low-bun hairstyle, and real human skin with visible pores, fine hair and natural small unevenness - no beautification, no smoothing, no plastic, wax or mannequin look. Match the lighting, colour and grain of the surrounding shot so the refined face blends into the frame.",
   "width": [
    "track",
    4
   ],
   "height": [
    "track",
    5
   ],
   "length": [
    "track",
    6
   ],
   "ref_image_size": "match",
   "ref_images.ref_image_0": [
    "ref1",
    0
   ],
   "ref_images.ref_image_1": [
    "ref2",
    0
   ]
  }
 },
 "inject": {
  "class_type": "H3InjectVideoLatent",
  "inputs": {
   "av_latent": [
    "reftv",
    1
   ],
   "images": [
    "track",
    0
   ],
   "vae": [
    "vae",
    0
   ]
  }
 },
 "denoise": {
  "class_type": "H3PerFrameDenoise",
  "inputs": {
   "model": [
    "lora",
    0
   ],
   "av_latent": [
    "inject",
    0
   ],
   "transform": [
    "track",
    1
   ],
   "denoise_multiplier_small_face": 1.0,
   "denoise_multiplier_large_face": 0.35,
   "scale_mode": "absolute_px",
   "face_px_small": 30.0,
   "face_px_large": 120.0,
   "gamma": 1.0,
   "smooth_frames": 9
  }
 },
 "noise": {
  "class_type": "RandomNoise",
  "inputs": {
   "noise_seed": 42
  }
 },
 "guider": {
  "class_type": "BasicGuider",
  "inputs": {
   "model": [
    "denoise",
    2
   ],
   "conditioning": [
    "reftv",
    0
   ]
  }
 },
 "sampler": {
  "class_type": "KSamplerSelect",
  "inputs": {
   "sampler_name": "er_sde"
  }
 },
 "sched": {
  "class_type": "BasicScheduler",
  "inputs": {
   "model": [
    "denoise",
    2
   ],
   "scheduler": "simple",
   "steps": 4,
   "denoise": 0.4
  }
 },
 "sample": {
  "class_type": "SamplerCustomAdvanced",
  "inputs": {
   "noise": [
    "noise",
    0
   ],
   "guider": [
    "guider",
    0
   ],
   "sampler": [
    "sampler",
    0
   ],
   "sigmas": [
    "sched",
    0
   ],
   "latent_image": [
    "denoise",
    0
   ]
  }
 },
 "decode": {
  "class_type": "VAEDecode",
  "inputs": {
   "samples": [
    "sample",
    0
   ],
   "vae": [
    "vae",
    0
   ]
  }
 },
 "stitch": {
  "class_type": "H3FaceStitch",
  "inputs": {
   "base_images": [
    "load_video",
    0
   ],
   "refined_crops": [
    "decode",
    0
   ],
   "transform": [
    "track",
    1
   ],
   "paste_region": "face_only",
   "mask_dilation": 24,
   "feather": 24,
   "colour_match": 1.0,
   "blend": 1.0,
   "undetected_frames": "fade_out"
  }
 },
 "save": {
  "class_type": "VHS_VideoCombine",
  "inputs": {
   "images": [
    "stitch",
    0
   ],
   "audio": [
    "load_video",
    2
   ],
   "frame_rate": 24.0,
   "loop_count": 0,
   "filename_prefix": "video/FaceRefined/face_refine",
   "format": "video/h264-mp4",
   "pix_fmt": "yuv420p",
   "crf": 16,
   "save_output": true,
   "pingpong": false
  }
 }
}