Minimax H3 Character Swap Multiple Characters

In this guide, you will learn how to replace multiple characters in the same video using MiniMax H3 and ComfyUI. This is an extension of the single character swap workflow: SAM 3 tracks up to four people in the source clip, each tracked subject gets its own color-tinted mask (red, green, blue, and yellow), and the model swaps in a different reference character for each masked regionβ€”all while preserving the scene, camera motion, and lighting.

Models

Workflow

Example images and video (optional)

File Locations

Copy the downloaded files into your ComfyUI directory as shown below. Create the directories if they don’t exist.

ComfyUI/
β”œβ”€β”€ πŸ“‚ models/
β”‚   β”œβ”€β”€ πŸ“‚ diffusion_models/
β”‚   β”‚   └── minimax_h3_ref2va_pruned_int8_convrot.safetensors
β”‚   β”œβ”€β”€ πŸ“‚ text_encoders/
β”‚   β”‚   └── qwen3vl_32b_minimax_h3_int8_convrot.safetensors
β”‚   β”œβ”€β”€ πŸ“‚ vae/
β”‚   β”‚   β”œβ”€β”€ minimax_h3_sol_vae_int8_convrot.safetensors
β”‚   β”‚   └── minimax_h3_audio_vae_fp32.safetensors
β”‚   β”œβ”€β”€ πŸ“‚ checkpoints/
β”‚   β”‚   └── sam3.1_multiplex_fp16.safetensors
β”‚   └── πŸ“‚ loras/
β”‚       └── pika_h3_flex_ref2va_v1_bf16.safetensors

How It Works

Instead of a single black silhouette mask, this workflow creates four separate masksβ€”one per tracked personβ€”and combines them into a single color-coded mask video. Each character image is loaded into its own reference slot, and the prompt tells the model which character goes into which colored mask:

  • Person 1 β†’ red mask β†’ <Picture 1>
  • Person 2 β†’ green mask β†’ <Picture 2>
  • Person 3 β†’ blue mask β†’ <Picture 3>
  • Person 4 β†’ yellow mask β†’ <Picture 4>

The SAM3 Track to Mask node has an object_indices setting for each person (0, 1, 2, 3), so you can control which tracked person maps to which character image. The Save Mask Preview node outputs the combined mask video so you can verify the tracking before running the full generation.

Instructions

  • Install or update VideoHelperSuite node.
    • The node should have a format property set to H3. If it doesn’t then get the latest version from github.
  • Download all the models above and put them in the specified directories.
  • Drop the workflow into ComfyUI.
  • Drop your character images into the Load Image nodes (Load Image 1 to 4)
  • Drop your video into Load Video Node
  • Click the Run button

If you only want to swap some of the tracked people, use the object_indices setting on each SAM3 Track to Mask node to pick which ones to use, and remove the unused subjects from the prompt.