ComfyUI Node
H3MD Save Video Face Refine And Interp
H3MD Save Video Interp with face refinement: pass 1 tracks the face over the whole long video (H3 Face Track + Crop logic), pass 2 crops, restores with TE-Speed VOSR2 and pastes back (H3 Face Stitch Back) chunk by chunk, then RIFE-interpolates and encodes like Save Video Interp.
H3MD Save Video Face Refine And Interp
- segments
- vosr2_model
- vosr2_settings
- seedvr2_model
- seedvr2_vae
- identity_reference
- video_path
- frame_count
- video
- report
- preview
◄filename_prefixvideo/H3MD►
◄output_folder►
◄interpolatefalse►
◄target_fps24.0►
◄scale1.00►
◄model_nameflownet.pkl►
◄batch_size8►
◄use_fp16true►
◄formatvideo/h264-mp4►
◄pix_fmtyuv420p►
◄crf19►
◄loop_count0►
◄trim_to_audiofalse►
◄save_metadatatrue►
◄save_outputtrue►
◄delete_cache_after_savefalse►
◄face_refinetrue►
◄detector▾►
◄confidence0.35►
◄crop_factor2.5►
◄canvas_width512►
◄canvas_height512►
◄canvas_modemanual►
◄smooth_window21►
◄size_smooth_window51►
◄smooth_methodgaussian►
◄size_modeper_frame►
◄paste_regionface_only►
◄mask_dilation16►
◄feather6►
◄colour_match1.00►
◄blend1.00►
◄undetected_framesfade_out►
◄vosr2_seed42►
◄identity_tracktrue►
◄identity_threshold0.28►
◄selectlargest_face►
◄fallback_detectornone►
◄fallback_head_frac0.50►
◄select_index0►
◄identity_modelinsightface►
◄cut_detectionnone►
◄cut_threshold3.0►
◄absent_shotsoff►
◄X0►
◄Y0►
◄frame_index0►
◄feather_scales_with_cropfalse►
◄refine_modelVOSR2►
◄drift_correctoff►
◄drift_strength1.00►
CategoryMiniMax H3/H3MD
Inputs (57)
| Name | Type | Default | Description |
|---|---|---|---|
| segments | H3MD_SEGMENTS | long video: H3MD Loop Sampler output 'long video'. | |
| filename_prefix | STRING | video/H3MD | Like SaveVideo: <prefix>_00001_.mp4 (subfolders allowed, %date% vars). |
| output_folder | STRING | Empty = ComfyUI's output folder. A relative name = a subfolder of it. An absolute folder only if it is inside the output folder or listed under "folders" in <ComfyUI user folder>/h3md/config.json (v0.3.7). | |
| interpolate | BOOLEAN | false | On: RIFE frame interpolation (ComfyUI-VFI's model) 24 fps -> target_fps. Off: the H3MD frames are written unchanged (the RIFE options below are greyed out). |
| target_fps | FLOAT | 24.01–240 | Frame rate of the saved file. interpolate on: RIFE target (e.g. 30, 48, 60). interpolate off: the file is still written at this rate - anything but 24 plays faster/slower than real time and the audio no longer matches (warned in the log). |
| scale | FLOAT | 1.000.25–4 | RIFE flow processing scale. Lower values process faster but may reduce quality (output size is unchanged). |
| model_name | COMBO | flownet.pkl | RIFE model (ComfyUI-VFI's list / locations / auto download). |
| batch_size | INT | 81–32 | Frames interpolated in parallel (VRAM). |
| use_fp16 | BOOLEAN | true | Half precision RIFE (CUDA only). |
| format | COMBO | video/h264-mp4 | h264/h265-mp4: video + AAC audio. gif / webp: animated image, no audio. png-sequence: a folder of numbered PNGs, no audio. Every format is written chunk by chunk. |
| pix_fmt | COMBO | yuv420p | h264/h265-mp4 only. yuv420p = plays everywhere; yuv420p10le = 10 bit (less banding, not every player). |
| crf | INT | 190–51 | h264/h265-mp4 only. Quality (default 19 like Video Combine; lower = better/larger). |
| loop_count | INT | 00–100 | gif / webp only: 0 = loop forever, n = play n more times (like Video Combine). |
| trim_to_audio | BOOLEAN | false | h264/h265-mp4 only: end the video with the audio (like Video Combine). |
| save_metadata | BOOLEAN | true | Embed the prompt + workflow (like Video Combine): mp4 tags, first PNG of a sequence; gif / webp: an extra <file>.png first frame carries them. |
| save_output | BOOLEAN | true | On: save into the output folder (or output_folder). Off: ComfyUI's temp folder (cleared on restart) - still previewable below. |
| delete_cache_after_save | BOOLEAN | false | Delete the H3MD segment cache after the video file was fully written. Off (default): keep it, e.g. to re-render single segments with resume_from_cache or to save again. The folder is shown below. |
| face_refine | BOOLEAN | true | On: track the face over the whole video, restore it with VOSR2 and paste it back, chunk by chunk, before interpolation. Off: exactly H3MD Save Video Interp. |
| detector | COMBO | 1 options: none | |
| confidence | FLOAT | 0.350.05–0.95 | — |
| crop_factor | FLOAT | 2.51.2–8 | — |
| canvas_width | INT | 512128–1344 | — |
| canvas_height | INT | 512128–1344 | — |
| canvas_mode | COMBO | manual | 3 options: manual, auto_no_downscale, auto_capped_768 |
| smooth_window | INT | 211–201 | — |
| size_smooth_window | INT | 511–201 | — |
| smooth_method | COMBO | gaussian | 3 options: gaussian, savgol, moving_average |
| size_mode | COMBO | per_frame | 2 options: max_of_clip, per_frame |
| paste_region | COMBO | face_only | 3 options: face_only, face_ellipse, full_crop |
| mask_dilation | INT | 160–256 | — |
| feather | INT | 60–256 | — |
| colour_match | FLOAT | 1.000–1 | — |
| blend | FLOAT | 1.000–1 | — |
| undetected_frames | COMBO | fade_out | 3 options: fade_out, skip, composite_anyway |
| vosr2_seed | INT | 420–18446744073709550000 | VOSR2 / SeedVR2 seed, the same for every chunk (scale is fixed at 1). |
| vosr2_modelopt | TE_SPEED_VOSR2_MODEL,VOSR2_MODEL | VOSR2 model, used when refine_model = VOSR2: 'VOSR 2.0 Model Loader' of the original ComfyUI-VOSR2 (recommended) or the TE-Speed VOSR2 loader. | |
| vosr2_settingsopt | TE_SPEED_VOSR2_SETTINGS | Optional TE-Speed VOSR2 settings. | |
| seedvr2_modelopt | MODEL,SEEDVR2_DIT | SeedVR2 model, used when refine_model = SeedVR2: 'SeedVR2 (Down)Load DiT Model' of ComfyUI-SeedVR2_VideoUpscaler, or the TE-Speed SeedVR2 Loader 'model'. Other parameters run at that node's own defaults. | |
| seedvr2_vaeopt | VAE,SEEDVR2_VAE | SeedVR2 VAE: 'SeedVR2 (Down)Load VAE Model' or the TE-Speed SeedVR2 Loader 'vae' (from the same pack as seedvr2_model). | |
| identity_referenceopt | IMAGE | Optional: a picture of the person to follow (H3 Face Track + Crop identity_reference). | |
| identity_trackopt | BOOLEAN | true | — |
| identity_thresholdopt | FLOAT | 0.280–1 | — |
| selectopt | COMBO | largest_face | 1 options: largest_face |
| fallback_detectoropt | COMBO | none | 1 options: none |
| fallback_head_fracopt | FLOAT | 0.500–1.5 | — |
| select_indexopt | INT | 00–63 | — |
| identity_modelopt | COMBO | insightface | 1 options: insightface |
| cut_detectionopt | COMBO | none | 1 options: none |
| cut_thresholdopt | FLOAT | 3.00.5–20 | — |
| absent_shotsopt | COMBO | off | 2 options: off, by_identity |
| Xopt | INT | 00–16384 | — |
| Yopt | INT | 00–16384 | — |
| frame_indexopt | INT | 00–999999 | — |
| feather_scales_with_cropopt | BOOLEAN | false | — |
| refine_modelopt | COMBO | VOSR2 | Face restore path: VOSR2 uses vosr2_model (+ vosr2_settings); SeedVR2 uses seedvr2_model + seedvr2_vae. The other inputs are ignored. |
| drift_correctopt | COMBO | off | v0.2.0. auto: while saving, pull slow drift (saturation creeping up, picture getting softer) back segment by segment. A hard cut starts a new reference; inside a shot a segment whose brightness, colour or layout clearly changed (night falls, a new room, someone walks in) is left alone and becomes the new reference. Shots of 1-2 segments are not touched. The cache is not changed: switch off and save again to compare. Decisions: <video>_drift.json. auto:保存时把一段段累积的漂移(饱和度变高、画面变软)拉回来。硬切换新参照;同一镜头里亮度、色调或构图明显变了的段(天黑、换地方、有人进来)不调,并成为新参照;1-2 段的短镜头不动。缓存不变:关掉再存一次就能对比。每段的判断写在 <视频>_drift.json。 |
| drift_strengthopt | FLOAT | 1.000–1 | drift_correct = auto: 1 = match the reference, 0.5 = half way. 校正力度。 |
Outputs (5)
| Name | Type | Description |
|---|---|---|
| video_path | STRING | — |
| frame_count | INT | — |
| video | VIDEO | — |
| report | STRING | — |
| preview | H3MD_VIDEO_PREVIEW | — |