🎬 Full video walkthrough: live demo
# H3 Meta Batch Overlap: character swap on videos longer than 15 seconds
MiniMax H3 stops at ~15 seconds. This workflow swaps a character on a video of any length, with no visible seams, and runs on an 8GB GPU.
H3 Meta Batch Overlap is a ComfyUI custom node and workflow that loops a long source video through MiniMax H3 + the Character Swap LoRA, batch by batch, using the VHS Meta Batch Manager. Each batch is chained to the previous one with H3 Motion Context, so motion carries across the joins instead of jumping.
Tested on an RTX 5050 8GB.
---
## 🔧 How it works
1. Load Video splits the source into batches (Meta Batch Manager).
2. H3 Meta Batch Overlap prepends the last overlap frames of the previous batch to the current one (first frame repeated on the first batch) and outputs a batch_index counter.
3. H3 Motion Context uses those overlapping frames to continue the motion seamlessly.
4. MiniMax H3 + Character Swap LoRA replaces the character in each batch.
5. The batches are stitched back into one continuous video.
## ⚙️ Key settings
| Setting | Value |
|---|---|
| overlap | must equal Motion Context context_length: 5, 22, 39 or 56 |
| batch size | a multiple of 17 (H3 generates 17k+5 frames) |
| force_rate | 24 fps |
| Character Swap LoRA strength | 1.0 |
| H3 trained range | ~124–362 frames per generation |
## ⚠️ Limitation
Always run the meta batch from the start. The previous batch's frames are kept in memory only, so after a ComfyUI restart mid-run, the next batch stops with an error.
## 📦 Requirements
Custom nodes (clone into ComfyUI/custom_nodes):
- [ComfyUI-H3MetaBatchOverlap](https://github.com/shisa84/ComfyUI-H3MetaBatchOverlap)
- [ComfyUI-H3-Motion-Context](https://github.com/NikoDemon80/ComfyUI-H3-Motion-Context)
- [ComfyUI-VideoHelperSuite](https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite)
- Optional: ComfyUI-KJNodes, ComfyUI_essentials
Models:
- [MiniMax H3](https://huggingface.co/Comfy-Org/MiniMax-H3) (ref2va diffusion model, VAEs, text encoder)
- [Character Swap LoRA](https://huggingface.co/akatz-ai/MiniMax-H3-Character-Swap-LoRA): h3_character_swap_pro4500_1000.safetensors
## 🚀 Install
1. Clone the three repos above into ComfyUI/custom_nodes, then restart ComfyUI.
2. Download the models and the LoRA.
3. Load the example workflow H3_Character_Swap_Meta_Batch_Overlap.json (included in the repo and attached here).
4. Load your source video and your character reference, set the batch size and overlap, and queue the full meta batch.
## 💡 Tips
- Pick a source video with a clearly visible subject and continuous motion. That's where the seamless joins show best.
- Plan the length of your source around the batch size (multiples of 17) so the last batch isn't truncated.
- Disclose AI-altered content when you publish realistic swaps.
Thanks to NikoDemon80 for H3 Motion Context and akatz-ai for the Character Swap LoRA.
Description
FAQ
Comments (13)
Is there a way to save and resume progress? As it is, it's creating 4 second clips in half an hour (5 seconds minus the one for overlap) on a reasonable device (96gb ram, 12gb vram), which means it needs to run for two hours just to pass what a normal replacement workflow would be doing. My goal is to to have this set up so that I can run it whenever it's convenient and make incremental progress towards a much larger video.
At the moment, there is no automatic resume. You have latent saved but you will have to do manual (load latent, calculate start/end frames from videos, increment latent index, ...)
you can check these videos is you want to understand how to manually do it https://www.youtube.com/playlist?list=PLcB1fMSfXYwQ
Related problem: If one section desyncs from the source, all following sections will almost completely ignore the source since the start/end frames are now untethered from it. With director nodes and checkpointing this is something that can be caught and reverted, but since this workflow requires doing the entire video from the start it's a large commitment that can fail suddenly at any point. I'm aware that it's pretty much unsolvable without a director node at the moment, just bringing it up as a notable barrier to use.
@vivianlynn it depends what is your definition of desync. As I said previously, if it's "desync" from part 3, you still have the latent part 2 to rerun it manually with another seed. It really depend what you want to do but one workflow can not do everything, as same as director or studio nodes. You can use them instead of mine, but you will have to split the reference video and must be able to use lora. On my side, it's the opposite I prefer run the whole video without doing manual tasks for this and check the result later.
@FromWood By "desync" I mean that a step will fail to track a movement or object, and being in the wrong position or missing that object will cause a cascade of increasingly incorrect things, usually settling on an odd motion loop with bits of the actual video showing through in the movements. It's just something all replacer workflows have to deal with.
Could you elaborate on "still have the latent part 2 to rerun manually" method? How would I rerun it without starting it over from the first part?
EDIT: Nevermind you were talking about the guide you linked. Ignore that last bit.
Tried using this, adjusted the Resolution Selector for a Portrait. It outputted pretty blurry with artifacts and the final output is like that too...
You are maybe watching the wrong video for the audio. The audio from the load video is directly connected to the final video, not for clips. For the actifacts I don't know, I don't know your input video resolution, video custom width, image resolution, ref_size_image, ... I never had issue when changing aspect ratio.
@FromWood You're right the audio was correct at the end when fully put together. As for input video resolution I have it at 576x1024, my input image resolution is 2160x3840. I saw the video in the other reply and he seems to have a process rather than 1 click to output. Is that the right way to use this workflow?
@phreak44444 try to remove the custom_width on load video node.
Yes, you can do it manually via the demo video but you will have to split video yourself, don't forget to include the 22fps context for video generation length and input video. if you want to create a video length is 10s your input video has to be 24*10-22 frames.
@FromWood There is no connection to the custom_width and do you mean I provide the 22fps context in the prompt or where? I am not sure where you're specifying that. Another problem I see is my output video, the start is like a split second freeze before the animation begins playing. What nodes specifically are meant for changing the quality of the output (to be less blurry or more consistent)?
@phreak44444 by default in the workflow the load video custom width is 864 and your video width is 576 so it s stretched ...
The freeze is in the first clip, it should be the 22 time the same first frame because it will be trimmed later. As same as before you are not watching the final video. On the right in the workflow it says H3 Motion Context / context length, there is the 22 fps.
Also you are talking about blurry artifact but you don't tell what is blurry. In H3, people face rendering is not good when it's too wider than medium shot, try closer view
@FromWood I've been tweaking around and still cannot get a great output. I'm using character swap with a 3D character to dance in a video that 16 seconds long, haven't found a good workflow yet and this one is too complicated to adjust so I'll just find another. Thank you for the help though.