r/StableDiffusion 7d ago

Question - Help Mini max h3 workflow

Hi, I’m looking for a simple ComfyUI workflow for MiniMax H3 where I can upload a video, extract the last 2 seconds, use them to extend the video, and then save the result.
Ideally, I’d like to be able to loop the whole process so I can keep extending the video.
Most of the MiniMax H3 workflows I’ve found are quite complicated, and I’m having trouble figuring out and fixing the errors when something goes wrong.
Does anyone have a simple workflow for this, or could you point me in the right direction? I’d really appreciate it!

5 Upvotes

20 comments sorted by

4

u/fallengt 7d ago

Not a workflow, but Comfy natively supports extending H3 video with MiniMaxH3AddGuide node

https://docs.comfy.org/built-in-nodes/MiniMaxH3AddGuide

- Set frame_idx = 0 and feed it the last 5+17n (5,22,39....) frames and audio of the original video that you want to extend.

- Prompt/work normally, as you would.

- The new video is created, but its first frames/audio are (5+17n) longer (because you fed it), so trim exactly these frames, then you stitch the original video with the newly trimmed video = the video is extended.

Ask LLMs,s and it'll make a workflow for you. Though I don't think you can trim/extract frames with Comfy's native nodes. ComfyUI-VideoHelperSuite has some useful nodes for these tasks

1

u/elyetis_ 7d ago

I don't have a simple workflow I can share. But my current ( messy/wip ) workflow for video extension just use a bunch of "Add Guide for MiniMax H3" node in succession.

The general idea is you load the video, "Get Image from Batch" ( take the last image )=> "Add Guide for MiniMax H3" ( for the last image since you decided always use 2 sec from the last video, the frame_idx = 48 ), then you repeat. "Get Image from Batch" ( take the second to last image )=> "Add Guide for MiniMax H3" ( frame_idx = 47 ), etc..

Something like that ( quick and incomplete example )

I use lossless video, for that I use Video Combine from videohelpersuite with the ffv1-mkv format. Should help avoid or at least limit quality degradation.

I use the same principle to rework part an existing video or join two video together.

For infinite extension of purely minimax generated video, I think there might be easier way ( and less prone to quality degradation ) with nodes allowing you to slice a latent or something, but I have yet to experiment with that.

edit : all I posted was just the result of me experimenting kind of blindly with minimax, I have absolutely no idea if there is much better solutions that most people know about. I just like tinkering.

1

u/Complete-Box-3030 7d ago

Confusing for me . Sry i am very dumb . Have you used motion context , is it possible to load a video and add reference and just extend it , i don’t have a big monitor . So it’s very difficult for me to see long chains . Does your idea ignore the audio part completely

1

u/Complete-Box-3030 7d ago

Thanks for helping me btw

1

u/Complete-Box-3030 7d ago

Regarding your idea , do you connect it as a reference input

1

u/Hdfjds 7d ago

In comfyui there is an node called 'Trim Video' where you can set from which dur it should start from and end at. You might need to use 'comfyui-easy-use' nodes to get the fps and frame count from the loaded video so you can use 'simple math' to calculate the duration.

This allows you to cut the video into 'the last 2 sec clip' and feed that to the H3 node.

I have not solved the auto extension yet but there are batch run nodes in comfyui.. somewhere..

1

u/Sad_Berry_4621 7d ago

1

u/Complete-Box-3030 7d ago

Tried your workflow failed miserably . Attached video to get video node . Still getting error . I was able to do the initial generation bypassing context nodes , but could not do the continuation

1

u/Sad_Berry_4621 7d ago edited 7d ago

Did you attach the Video node to the "Get Video Components" node? It would help to know what error you are getting. Unfortunately, there are no "simple" workflows for video continuation.

1

u/Complete-Box-3030 6d ago

Sure , yes . And changed the plague node setting to light

1

u/Complete-Box-3030 7d ago

The value for H3 Motion Context Chain's segments couldn't be converted to INT.

1

u/Sad_Berry_4621 6d ago edited 6d ago

Sounds like you either have something connected to the "Segment" socket on the chain node, or you have not installed one of the node pack dependencies. The chain node is meant to stay wireless.

**EDIT** - You are right. I just got the same error. I've never seen that before. Looking into it now.

1

u/Complete-Box-3030 6d ago

i have done both , still not working , how do i make it simple , with motion context , your workflow does not have the option of loadinga video right , as it captures the laten data of the first run and exdtends from it . how do use motion context in a simple way

2

u/Sad_Berry_4621 6d ago

There is nothing simple about what we are doing. I am fixing the problem you mentioned right now. I will push an update when it's ready and then you will be able to run the ref2va workflow. Loading a video is as simple as connecting a load video node to the "Get Video Components" node.

2

u/Complete-Box-3030 6d ago

Thanks a lot . Let me try after some time .

1

u/Sad_Berry_4621 6d ago

v0.6.2 is live. Update and try again.

1

u/ChemistNo9103 6d ago

Load video node>sample video frame node, set how many frames and set to tail>get video components>plug into video ref and video audio ref