Uploaded August 2026 | Updated November 2026, 1 day ago
MiniMax H3 in ComfyUI can now edit an existing video instead of generating a new one. In this workflow I track an object with SAM3, control the mask, and replace it using MiniMax H3 Ref2VA.
The result depends almost entirely on the mask, so most of this video is about getting that part right. I replace a car first, then a much harder shot where a dragon enters the scene. My first attempts failed, and I show the exact settings I changed to fix them.
What the workflow does
NKD Timeline prepares the source clip: resolution in megapixels, output size aligned to a multiple of 32, frame count using the 17n+5 structure H3 needs, plus aspect ratio, frame rate and audio. You can also trim the working section here instead of editing the source somewhere else first.
SAM3 finds and tracks the object you want to edit. The SAM3 prompt is only the object name, such as "car". Keep it separate from your generation prompt.
Mask Cleanup makes the tracked mask more stable and removes short mask noise.
MVEx Subject Crop builds a stable working area around the object. Three modes: Tracked, Combined and Zoomed.
NKD Mask Ops prepares the latent mask H3 actually uses, because H3 works in compressed latent space. A second mask with feather 8 blends the generated crop back into the original video.
Gemma 4 writes the H3 generation prompt from a short, rough description. Your English does not need to be perfect.
Settings from my tests
Car: detection threshold 0.35, crop mode Tracked. The first result broke where the working area was too tight, so I raised the crop scale to 4.
Dragon: detection threshold 0.7, crop mode Combined, mask expand 10, crop scale 2.25, working section shortened to 14.38 seconds. Larger was not automatically better.
One thing worth knowing: my reference car was grey, but the output was black, because my prompt asked for a black sports car. The prompt still influences appearance even when Picture 1 is the visual reference.
Models used
MiniMax H3 Ref2VA INT8
Qwen3-VL 32B AWQ text encoder
Video VAE and audio VAE
SAM3.1 for tracking
Gemma 4 for the auto prompt
Custom node packs
MaskVidExperiments
ComfyUI-NKD-Basic-Tools
ComfyUI-NKD-Preview-Tools
Resources
Workflow file: aistudynow.com/minimax-h3-video-inpainting-in-comfyui-replace-moving-objects-with-masks
MiniMax H3 Ref2VA INT8: huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors?download=true
Qwen3-VL 32B AWQ: huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors?download=true
SAM3.1: huggingface.co/Comfy-Org/sam3.1/resolve/main/checkpoints/sam3.1_multiplex_fp16.safetensors?download=true
Gemma 4: huggingface.co/Comfy-Org/gemma-4
MaskVidExperiments: github.com/drozbay/MaskVidExperiments
ComfyUI-NKD-Basic-Tools: github.com/Nekodificador/ComfyUI-NKD-Basic-Tools
ComfyUI-NKD-Preview-Tools: github.com/Nekodificador/ComfyUI-NKD-Preview-Tools
## Workflow Credit
The JSON below is a modified derivative of the MiniMax H3 Ref2VA inpainting
workflow built by Tensor Alchemist. His original video:
youtube.com/watch?v=58ydJUg5aR8
If this video is useful, subscribe for more MiniMax H3 and ComfyUI videos.
#MiniMaxH3 #ComfyUI #AIVideoEditing
MiniMax H3 in ComfyUI can now edit an existing video instead of generating a new one. In this workflow I track an object with SAM3, control the mask, and replace it using MiniMax H3 Ref2VA.
The result depends almost entirely on the mask, so most of this video is about getting that part right. I replace a car first, then a much harder shot where a dragon enters the scene. My first attempts failed, and I show the exact settings I changed to fix them.
What the workflow does
NKD Timeline prepares the source clip: resolution in megapixels, output size aligned to a multiple of 32, frame count using the 17n+5 structure H3 needs, plus aspect ratio, frame rate and audio. You can also trim the working section here instead of editing the source somewhere else first.
SAM3 finds and tracks the object you want to edit. The SAM3 prompt is only the object name, such as "car". Keep it separate from your generation prompt.
Mask Cleanup makes the tracked mask more stable and removes short mask noise.
MVEx Subject Crop builds a stable working area around the object. Three modes: Tracked, Combined and Zoomed.
NKD Mask Ops prepares the latent mask H3 actually uses, because H3 works in compressed latent space. A second mask with feather 8 blends the generated crop back into the original video.
Gemma 4 writes the H3 generation prompt from a short, rough description. Your English does not need to be perfect.
Settings from my tests
Car: detection threshold 0.35, crop mode Tracked. The first result broke where the working area was too tight, so I raised the crop scale to 4.
Dragon: detection threshold 0.7, crop mode Combined, mask expand 10, crop scale 2.25, working section shortened to 14.38 seconds. Larger was not automatically better.
One thing worth knowing: my reference car was grey, but the output was black, because my prompt asked for a black sports car. The prompt still influences appearance even when Picture 1 is the visual reference.
Models used
MiniMax H3 Ref2VA INT8
Qwen3-VL 32B AWQ text encoder
Video VAE and audio VAE
SAM3.1 for tracking
Gemma 4 for the auto prompt
Custom node packs
MaskVidExperiments
ComfyUI-NKD-Basic-Tools
ComfyUI-NKD-Preview-Tools
Resources
Workflow file: aistudynow.com/minimax-h3-video-inpainting-in-comfyui-replace-moving-objects-with-masks
MiniMax H3 Ref2VA INT8: huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/diffusion_models/minimax_h3_ref2va_pruned_int8_convrot.safetensors?download=true
Qwen3-VL 32B AWQ: huggingface.co/Comfy-Org/MiniMax-H3/resolve/main/text_encoders/qwen3vl_32b_minimax_h3_nvfp4_awq.safetensors?download=true
SAM3.1: huggingface.co/Comfy-Org/sam3.1/resolve/main/checkpoints/sam3.1_multiplex_fp16.safetensors?download=true
Gemma 4: huggingface.co/Comfy-Org/gemma-4
MaskVidExperiments: github.com/drozbay/MaskVidExperiments
ComfyUI-NKD-Basic-Tools: github.com/Nekodificador/ComfyUI-NKD-Basic-Tools
ComfyUI-NKD-Preview-Tools: github.com/Nekodificador/ComfyUI-NKD-Preview-Tools
## Workflow Credit
The JSON below is a modified derivative of the MiniMax H3 Ref2VA inpainting
workflow built by Tensor Alchemist. His original video:
youtube.com/watch?v=58ydJUg5aR8
If this video is useful, subscribe for more MiniMax H3 and ComfyUI videos.
#MiniMaxH3 #ComfyUI #AIVideoEditing










