🎬 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 (6)
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.