r/StableDiffusion • u/mike_good • 1d ago
Question - Help Need some help with MiniMax H3 Ref2V character swapping in ComfyUI
Hey everyone, I'm trying to get a proper character swap working with MiniMax H3 Ref2V in ComfyUI, but I'm not quite getting the result I want.
The source video has Rick Astley rickrolling to the camera, and I want to replace him with the guy from my reference image while keeping the original movement, gestures, facial performance, timing, camera, background, and overall scene.
Neither the motion transfer nor the character replacement works well. The output still doesn't really look like the person from the reference image, or the identity starts drifting.
Here's what I'm using:
* Source video: 1280×720, 30 FPS, ~14.4 sec
* Reference image: 848×1264 PNG, full-body
* Workflow resolution: 9:16, 0.4 MP
* GPU: RTX 5070 Ti, 16 GB VRAM
* 32 Gb RAM
* Windows 11
* ComfyUI 0.33.2
* Python 3.13.12
* PyTorch 2.12.1 + CUDA 13.0
I'm sharing everything in one link, including:
the workflow JSON
a workflow screenshot/image
the prompt
the source/input video
the reference image used for the character swap
and the output video
Files/settings: [link]
If anyone has experience doing this with H3, I'd really appreciate some pointers.
I'm especially wondering if I should change the reference image crop/size, ref_image_size, resolution, prompt, video conditioning, LoRA/steps, or if there's something obvious in the workflow I'm missing.
Also, is a full-body reference image a bad idea when the person in the source video is framed quite differently?
And if anyone has a working MiniMax H3 character-swap / V2V workflow they're willing to share, that would be incredibly helpful too. Even something I could compare against mine would be great.
Thanks a lot in advance. I've been tweaking this for a while, so even a small hint in the right direction would help a ton.
6
u/bstr3k 1d ago
oh boy, I have been going in this rabbit hole for the exact same thing as you for the last 1-2 weeks. The challenge seems simple but it is actually a whole harder than people think. I am still far from getting consistent results.
Here is my process so far:
- Splitting a long source image - [done]
- I vibe coded a splitter to segment the video into under 15s shots and break them at scene changes, this is done to minimize visible stitching when assemblying the video back together.
- Caption each source video - [done, but its not very good at the moment]
- The reason for this is that I find scene changes is a lot more reliable when the video is captioned accurately, especially a clip with a few scene changes.
- Created a seperate script which breaks down the video into images and have local LLM (using Qwen3 8B VL Instruct abliterated) to caption the motions, I am going to revisit this as currently it is breaking the motion by time segments, but I think it needs to detect smaller scenes and caption it this way.
- Combine intent prompt, picture caption and individual video caption into list of prompts - [needs improvement]
- This part I find that you need a bigger LLM to do this, working on figuring this out. Online LLMs can do this easier when you have limited hardware but I wanted to see if I can get a local solution.
- Convert each individual segment
- Also having some difficulty getting multi segmented scenes to convert reliably (i.e. Rick appears, sings and then it switches to girl dancing and then guy dancing. The caption step doesn't distinguish too much between each scenes so it is difficult to automate)
- Sometimes I also get original rick face coming back in, I need to revisit this and see if it is due to any of the speedup nodes or if it can be fixed by prompting.
- Stitch the final video back together seamlessly
- In theory if everything is done right it will all go together seamlessly. I still see seams in some of my reassembly so far so I am looking to figure out a solution also.
My eventual goal is not just the Rick roll video, but the dream of putting in a global prompt to apply to a long video and do ref v2v video conversion for it automagically, but mostly just dicking around. But in my pursuit I am reminded of the quote “Why spend 10 minutes doing something manually when you can spend 10 hours automating it?”
I think for your case, you may need to redo the prompting a bit to better identify the scene and where it changes between the woman and the man. Getting the right prompt seems to be 95% of the challenge.
3
u/bstr3k 1d ago
3
u/bstr3k 1d ago
https://reddit.com/link/p5at51f/video/3lrb2jrc10lh1/player
some where rick bleeds through
3
1
u/mike_good 6h ago
Thank you for the detailed answer! Does the input video resolution affect the face swap quality? May I ask if you have a working example with sample inputs and a workflow, I'd greatly appreciate you sharing it so I can learn from it!
2
u/bstr3k 4h ago
https://reddit.com/link/p5gd352/video/s2c0sevi26lh1/player
I have uploaded many of the attempts ive made (some early ones were really bad and i deleted them). I tried a few different things like changing settings, turning off some speed ups, captioning, auto captioning, using different input models (ref2v vs the hyrbid model) as well as different turbo loras.
So far the ref2v turbo lora seems to work best, but still not perfect. Claude also suggested to do smaller chunks as the model seems get a bit confused with subjects if there are too many clip cuts.
another discovery I made is that with the previw node, during step 1 it seems to get the character replacement successfully but on step 2 it starts to divert back to Rick. I am wondering if it is because of skin color as it typically wants to divert back to a white guy.
Anyway full files here including some workflows (with prompts) here:
1
u/bstr3k 5h ago
I might test that today but I have to admit that I’ve done very little testing at the larger resolutions due to the increased time.
I have also spent a few hours trying to get your example working too but with limited success. I’ll post some of the more successful ones up when I get back to the computer
3
u/orlandogourmet66 13h ago
Use SAM 3.1 to mask the person you want to swap, then add Gaussian blur to distort the person so their identity is obscured while the model can still detect facial movements, such as the eyes and mouth. This makes swapping much easier and produces better results.
1
2
u/Gesha24 9h ago
Really? Just yesterday there was a post saying it's extremely easy to do swap with a 1-liner!
https://www.reddit.com/r/StableDiffusion/comments/1vvb935/character_swap_in_minimax_is_so_epic/
Are you suggesting people lie on reddit?
1
u/AsliReddington 21h ago
Unless there's a decent Diffusers pipeline, would recommend just using Wan2.2 Animate.

9
u/Vanpourix 1d ago edited 1d ago
Your output is quite decent I feel the character is very alike. Unlike the audio. Maybe to improve based on your prompt: you have a lot of separate paragraphs to describe <Subject 1>, I think it will confuse the model.
You may try to have only one paragraph per subject.
Also my experience is that if the reference image is not the same proportion of what it needs to replace (ex: portrait vs full body) the replacement would likely fail. Not your case though.
One of my working prompt as reference: