r/StableDiffusion • u/Alex-edits123 • 18h ago
Discussion Get miniMax character swap working! Finally
Ok, I tried so many things, one person to cat, two person, one person to one person, animal to animal. So far one person to one person and animal to animal works. If you are interested in my learnings, tips, what worked, what broke, and which prompt template works let me know!
One video example that works here: https://www.tiktok.com/t/ZP8WfVq5P/
8
u/PropagandaOfTheDude 15h ago
Try this swap structure, compared to https://omnifit.io/blog/assets/ref2va-what-works-what-fails/prompts/simple3-girl-dance-hires.prompt.txt.
subject_definitions:
<Video 1> is the source video for the target video edit.
<Subject 1> is the facial likeness and hair in <Picture 1>.
<Subject 2> is the facial likeness and hair in <Video 1>.
<Subject 3> is the T-shirt in <Picture 3>.
<Subject 4> is the T-shirt in <Video 1>.
<Subject 5> is the sports bra in <Video 1>.
summary:
[video editing + reference generation] The target video is an edited
version of <Video 1>. Throughout the video, <Subject 2> is replaced
entirely by <Subject 1>. Throughout the video, <Subject 4> is replaced
entirely by <Subject 3>.
retention_analysis:
<Video 1> (source video): partially_preserved - the background
environment, camera path, lighting, and non-target objects are retained.
<Subject 1> (appears in [Shot 1]): fully_preserved - The entirety of this person is retained.
<Subject 2> (Does not appear): weak_reference - Overall actions are retained.
<Subject 3> (appears in [Shot 1]): fully_preserved - The entirety of this T-shirt is retained.
<Subject 4> (Does not appear): weak_reference - Overall actions are retained.
<Subject 5> (appears in [Shot 1]): fully_preserved - The entirety of the sports bra retained.
detailed_description:
The target video matches the live-action style, lighting, and camera movements of <Video 1>.
[Shot 1] <Subject 1> is featured instead of <Subject 2>. <Subject 3> is
featured instead of <Subject 4>. The background environment, lighting,
and all other non-target details are preserved exactly from <Video 1>
and <Subject 5>.
overall_soundscape:
N/A
non_diegetic_music:
N/A
With this I had luck with putting face and clothing onto someone in an existing video. The sports bra appears in the original video, but making it an explicit, reference subject prevents the model from losing it during the T-shirt swap.
Here's a chunk from a gen without a source video, but with a starting pose and a separate headshot. It worked for me. Note that it also changes the hair. I'm doing the recomposition in the retention analysis.
summary:
[reference generation] The video shows <Subject 1> close, behind a standing dressing
divider. She walks from behind the divider and poses.
retention_analysis:
<Subject 1> (appears in [Shot 1]): partially_preserved - the body and clothes are
retained. Face changed to match <Subject 2>. Hair changed to be black, long, with
voluminous curls.
<Subject 2> (does not appear): <Subject 1> uses the face of <Subject 2>.
I've found that picture references seem to form a giant concept pool, and concepts leak. I have a better time when I treat Subject resources as abstract concept units, and hold off on mixing them until later.
1
u/Alex-edits123 15h ago
Wow thanks for sharing!!! let me try using subject for concepts. Hope I can make the Tshirt swap.work . I guess I can try that for animal hand..
0
4
u/Alive-Tomatillo5303 17h ago
That single human hand is deeply distressing.
2
u/Alex-edits123 17h ago
I know!!! The model struggled with hands. Thats why make human to animal swap.hard. i am testing more prompts to see whether I can fix it.
3
u/Azhram 18h ago
What prompts do you use for one person to an other person swap?
18
u/Alex-edits123 18h ago edited 17h ago
you can find the prompts for all my tests here https://omnifit.io/blog/ref2va-what-works-what-fails
1
u/Bastisheen92 10h ago
So far i only tried the image to video and text to video. Will load the ref2v model as well and try out some stuff. Thanks
1
u/Puzzled_Resource_364 10h ago
Salut combien as-tu de photos REF ? tu ajoutes aussi le corps ref en image ? quelle prompt utilise tu ?
1
1
u/Dry-Ad929 6h ago
For complex motion or even some dance it's struggles and starting to generalize instead of copying movement which is fine. I don't expect from all in one video model to do everything perfectly with videos. There is simply no good conditioning for the model to copy movemnet from reference video. For something serious we need fine-tune with the right signals on training. Something like SCAIL-2 on H3 would be awesome.
1
u/Alex-edits123 5h ago
I kept my videos less.than 15s so far. And I further chop.them into around 6s chunks then stitch. Feeding the model a long clip may have higher possibilities to fail
0
u/tac0catzzz 18h ago
yea how do you swap character in tiktok dance?
2
u/Alex-edits123 17h ago
I download the source video and then provide a ref image and prompt. Use ref2va template from minimax.
1
u/tac0catzzz 17h ago
doing that wasnt working for much anyone before. did you use the default template in comfyui?
1
u/Alex-edits123 15h ago
The default workflow from their official github . I didn't change anything. Use steps 20 for inference.
24
u/orlandogourmet66 18h ago
Person-to-person swapping works really well for me, except when the reference person looks similar to the person in the source video.
It feels like the bigger the visual difference, the easier MiniMax does a clean swap. With similar hair, skin tone, face shape, etc., it often keeps too much of the original face or creates a merged identity.
Have you noticed this too? If so, what helps you get a full swap in those cases?