MiniMax-H3 Character Swap: Swap People in Photos with One Merged Model
A merged image-editing model that replaces a person in a photo with a character from a reference picture, including anime to photoreal swaps. Here is what it needs and how to set it up.

What is MiniMax-H3-Image Character Swap?
This is an image-editing model published on Hugging Face by akhaliq. You give it two pictures: a scene photo (called Picture 1) and a reference picture of a character (called Picture 2). You also tell it which person to replace. It swaps that person for your character and tries to keep everything else the same: the background, the lighting, the other people and the pose.
Under the hood, it is the MiniMax-H3-Image model with a small add-on called a LoRA (a character-swap adapter) already fused in. The adapter was originally trained for video. This repo ports it to still images, so there are no extra files to load and no LoRA nodes to wire up. The author reports that it handles hard cases the plain base model fails on, such as putting an anime character into a photoreal side-profile scene. In a labeled comparison of 17 cases, one person preferred the merged model in 14 of them. That is one person's opinion, not a formal benchmark.
Who is it for?
- Creators who already use ComfyUI and want character swapping built into one checkpoint.
- Developers who want a diffusers pipeline for image editing research.
- People with a very powerful GPU, a workstation, or a rented cloud GPU.
- Anyone curious how a LoRA adapter can be merged into a big model.
Minimum requirements
Be honest with yourself before you start: this is a very large model. It is not meant for a typical gaming laptop.
- Operating system: Windows, Linux or macOS for ComfyUI. The author tested the diffusers pipeline on a CUDA GPU (an H200), so an NVIDIA GPU is the safe choice.
- GPU and VRAM, diffusers route: the author states a full local run needs about 140 GB of VRAM (66 GB for the main model plus 67 GB for the text encoder). That means multiple data-center GPUs.
- GPU and VRAM, ComfyUI route: the authors give no number. A rough estimate is a 48 GB or larger GPU, relying on ComfyUI offloading to system memory. Treat this as an estimate, not a promise.
- RAM: estimated 64 GB or more, because the checkpoint (40 GB) and text encoder (25 GB) are large.
- Free disk space: about 66 GB for the ComfyUI files (40 GB checkpoint, 25 GB text encoder, 1.2 GB VAE), plus 7.3 GB for the optional prompt expander. The full repo is about 109 GB because it holds several copies of the weights.
- Software for ComfyUI: ComfyUI 0.45.0 or newer with template pack 0.11.104 or newer.
- Software for diffusers: Python (3.10 or newer is an estimate, not stated by the authors), PyTorch, and diffusers version 0.43.0.
- License: the MiniMax-H3-Image Community License. It is free to use, including commercially, worldwide except the EU, UK, South Korea and the USA. Revenue above 1 million dollars a year, or offering it as a hosted service, needs written permission from MiniMax. Read the LICENSE file yourself.
Installation, step by step
The easiest path for most people is ComfyUI, a visual tool where you connect boxes instead of writing code. The diffusers route is further below for programmers.
Step 0: Open a terminal
On Windows, press the Windows key, type PowerShell, and press Enter. A window with a blinking cursor appears. That is the terminal. On macOS open the Terminal app, and on Linux press Ctrl+Alt+T. You type a command, press Enter, and wait for it to finish.
Route A: ComfyUI (recommended)
- Install ComfyUI version 0.45.0 or newer from https://github.com/comfyanonymous/ComfyUI. Follow its own install instructions. Make sure its template pack is 0.11.104 or newer, then start it and confirm the page opens in your browser.
- Download minimax_h3_image_character_swap_bf16.safetensors (40 GB) from the comfyui folder of the model repo: https://huggingface.co/akhaliq/MiniMax-H3-Image-Character-Swap. Put it in ComfyUI/models/diffusion_models/.
- Go to https://huggingface.co/Comfy-Org/MiniMax-H3-Image and download qwen3vl_32b_minimax_h3_int8_convrot.safetensors (25 GB). Put it in ComfyUI/models/text_encoders/.
- From the same page download minimax_h3_image_vae_fp16.safetensors (1.2 GB) and put it in ComfyUI/models/vae/.
- Optional: download qwen3.5_9b_w4a8_gptq.safetensors (7.3 GB) into ComfyUI/models/text_encoders/. It is an optional prompt expander.
- Download the workflow file comfyui/workflows/minimax-h3-image-character-swap.json from the model repo, then drag it onto the ComfyUI canvas. You should see a node graph appear.
Route B: Python with diffusers (for programmers)
First install Git from https://git-scm.com/downloads and Python from https://www.python.org/downloads/ (on Windows, tick the box that says Add Python to PATH). Install PyTorch with CUDA support using the selector at https://pytorch.org. Then type this command:
pip install diffusers==0.43.0
This installs the exact diffusers version the README requires. You should see a stream of text ending in a Successfully installed message. The model downloads automatically the first time you run the script, and the text encoder (about 67 GB) is pulled from MiniMaxAI/MiniMax-H3-Image. Remember the 140 GB VRAM note above.
On Linux and macOS the steps are the same, except you may need to type pip3 instead of pip.
Your first run
In ComfyUI, open the character-swap workflow and point the diffusion model loader at minimax_h3_image_character_swap_bf16.safetensors. Load your scene photo into the first Load Image node and your character reference into the second. Use this prompt, adjusting it to describe the person you want replaced:
Swap the person in <Picture 1> with the character in <Picture 2>. Keep the reference character's face, hair and outfit. Preserve the background, lighting, camera and all other people.
The template presets the sampler: euler with the simple scheduler, 6 steps, CFG 1 and denoise 1. Leave those alone. Start with a canvas of about 4 megapixels, for example 2720 by 1536. Click Run. If a few minutes later you see your scene with the person replaced, it works.
With diffusers, the README shows this flow: load ModularPipeline from akhaliq/MiniMax-H3-Image-Character-Swap, call load_components with torch.bfloat16, move it to cuda, then call the pipeline with your prompt, a list of two PIL images in the order scene then character, and a width and height that are multiples of 32. Order matters: scene first, character second.
Tip: name the target clearly, for example the man in the yellow sweater, second from the left. A clean character sheet with several views gives the best identity match.
Common problems
- Out of memory: this is the most likely error. Lower the canvas size (4 megapixels is a good start), close other GPU programs, or rent a larger GPU. The diffusers route needs about 140 GB of VRAM, so ComfyUI is the lighter option.
- Missing nodes or workflow will not load: your ComfyUI is too old. Update to 0.45.0 or newer with template pack 0.11.104 or newer.
- Model not found in the loader: the file is in the wrong folder. The checkpoint goes in models/diffusion_models, the text encoder in models/text_encoders, and the VAE in models/vae. Restart ComfyUI after moving files.
- Errors in diffusers about missing classes: you probably have a different version. Run pip install diffusers==0.43.0 to match the README.
- The character faces the wrong way: this is by design. A swap follows the source person's pose and gaze. Rephrase the same pose, position, scale and gaze part of the prompt if you want a different orientation.
Also remember the limits: the adapter was trained on video, it was validated on only 8 hard cases, and it can drift on extreme poses, heavy occlusion or very small faces. Only swap real people with their permission.
Links
Model repository: https://huggingface.co/akhaliq/MiniMax-H3-Image-Character-Swap
Base model: https://huggingface.co/MiniMaxAI/MiniMax-H3-Image. ComfyUI support files: https://huggingface.co/Comfy-Org/MiniMax-H3-Image. Test set: https://huggingface.co/datasets/akhaliq/h3-image-swap-tests



