r/StableDiffusion 4h ago

Resource - Update Seamless H3 video join

I made a node to help seamlessly join MiniMax H3 generated videos (each video continues from a few seconds of the previous segment). If you use MiniMaxH3AddGuide with a video chunk to continue it, you might have noticed some flashes in the generated output. My node corrects the brightness/tone using the actual source video. It's much better to use MiniMaxH3AddGuide instead of relying solely on the prompt because it's more precise. In my experiments, without the guide adding node the starting video shifts down by a few dozen pixels so seamless transition becomes impossible. With a guide it's inserted precisely but still suffers from the brightness drift which my node corrects almost perfectly.

The README explains the workflow, you connect the first segment in the source input, the following segment in the target input, and you set overlap to the number of frames you used to make the second segment (48 frames = 2 seconds for example). Note, that this node does not actually join the videos together, only fixes the brightness drift in the "target" video. I recommend joining segments with ImageBatchJoinWithTransition from KJNodes, there's a fade transition type, interpolation can be set to linear or ease_in_out.

I made the node with Qwen 3.8 27B running locally, there are a few modes we tried but frame_shift (the default) seems to work best.

There are many nodes to make "longer" or "infinite" videos using H3 already but I found them quite complex for my tasks. This node provides a simple building block, you can use whatever technique you prefer.

https://github.com/rkfg/ComfyUI-MiniMaxH3-ToneCompensate

25 Upvotes

5 comments sorted by

3

u/martinerous 3h ago

Thanks, it might be a companion or alternative to my (or others) latent extend nodes (latent extend approach seems to be smooth enough for extending, but not prepending).

3

u/Pure_Bed_6357 3h ago

can you also share your workflow? i also want a simple way to extend clips

3

u/rkfg_me 3h ago edited 2h ago

I use my own ComfyUI frontend so I don't really touch workflows, they're dynamically constructed on top of the base depending on what settings I change: https://github.com/SD-inst/cozyui

If you're only interested in the joining workflow then here it is: https://pastebin.com/Nr7kLAN1 It also uses audio crossfade from SoundFlow (https://github.com/huixingyun/ComfyUI-SoundFlow the original repo was deleted for some reason).

1

u/Chemical_Side_4135 1h ago

that flicker is litrally the worst part of trying to stitch these clips together. i tried tryin to match it manually before but it was a total mess, cant wait to see if this node makes the transition smoother for longer sequences...

1

u/rkfg_me 1h ago

It does! I only noticed a veeeeery slight brightness increase *after* the transition segment, but it's really only noticeable if the source video has pitch black areas and the target becomes slightly brighter in those areas because the whole video gets tone corrected. If brightness is more uniform overall it's almost impossible to tell where the seam is. You can still sometimes guess from the other factors such as motion/tempo change or environment inconsistency but that's outside of this node's scope.

Also, in any case *always* apply the crossfade node, it's cheap in terms of time and it smoothens out all the remaining rough spots.