ComfyUI Node

H3MD Save Video Interp

Saves the H3MD Loop result straight from its segment cache (mp4 H.264/H.265 + AAC, gif, webp or a PNG sequence), chunk by chunk (automatic size from free VRAM / RAM) - RAM never holds the whole clip. Optional RIFE interpolation (ComfyUI-VFI's model and options). Replaces RIFE Frame Interpolation + Video Combine / Create Video + Save Video after H3MD Loop.

By 1113800942·Created 24 days ago·Updated about 22 hours ago· 33
H3MD Save Video Interp
  • segments
  • video_path
  • frame_count
  • video
  • 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►
◄drift_correctoff►
◄drift_strength1.00►
CategoryMiniMax H3/H3MD

Inputs (19)

NameTypeDefaultDescription
segmentsH3MD_SEGMENTSlong video: H3MD Loop Sampler output 'long video'.
filename_prefixSTRINGvideo/H3MDLike SaveVideo: <prefix>_00001_.mp4 (subfolders allowed, %date% vars).
output_folderSTRINGEmpty = 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).
interpolateBOOLEANfalseOn: 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_fpsFLOAT24.01–240Frame 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).
scaleFLOAT1.000.25–4RIFE flow processing scale. Lower values process faster but may reduce quality (output size is unchanged).
model_nameCOMBOflownet.pklRIFE model (ComfyUI-VFI's list / locations / auto download).
batch_sizeINT81–32Frames interpolated in parallel (VRAM).
use_fp16BOOLEANtrueHalf precision RIFE (CUDA only).
formatCOMBOvideo/h264-mp4h264/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_fmtCOMBOyuv420ph264/h265-mp4 only. yuv420p = plays everywhere; yuv420p10le = 10 bit (less banding, not every player).
crfINT190–51h264/h265-mp4 only. Quality (default 19 like Video Combine; lower = better/larger).
loop_countINT00–100gif / webp only: 0 = loop forever, n = play n more times (like Video Combine).
trim_to_audioBOOLEANfalseh264/h265-mp4 only: end the video with the audio (like Video Combine).
save_metadataBOOLEANtrueEmbed the prompt + workflow (like Video Combine): mp4 tags, first PNG of a sequence; gif / webp: an extra <file>.png first frame carries them.
save_outputBOOLEANtrueOn: save into the output folder (or output_folder). Off: ComfyUI's temp folder (cleared on restart) - still previewable below.
delete_cache_after_saveBOOLEANfalseDelete 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.
drift_correctoptCOMBOoffv0.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_strengthoptFLOAT1.000–1drift_correct = auto: 1 = match the reference, 0.5 = half way. 校正力度。

Outputs (4)

NameTypeDescription
video_pathSTRING—
frame_countINT—
videoVIDEO—
previewH3MD_VIDEO_PREVIEW—