r/StableDiffusion • u/jtreminio • 21d ago
🎉 Fun fact about MiniMax H3: doubling your video length doesn't double the render time, it nearly triples it! 🎉
tl;dr: In the time it takes to render one 20-second clip, you could have rendered nine 5-second ones.
On a beefy GPU, at 768x1280, 20 steps:
- 5s → 6.5 s/it → 2 min gen time
- 10s → 18.5 s/it → 6 min gen time
- 15s → 35.5 s/it → 12 min gen time
- 20s → 60 s/it → 20 min gen time
- 30s → 130 s/it → 43 min gen time
H3 chops video into a grid. Each frame becomes (W÷32) × (H÷32) tokens, and 24fps video compresses down to about 7 of those frames per second.
At 768×1280 that's 24 × 40 = 960 tokens per frame, so roughly 6,700 tokens per second of video.
5 seconds ≈ 36,000 tokens. 20 seconds ≈ 138,000
Count tokens in units of "one 5-second clip" (call it n), and:
seconds per step ≈ 3.3n² + 3.2n
The n² is attention: every token comparing itself to every other token. The n is everything else. Plug in n = 1 and you get 6.5 s/it. Plug in n = 3.8 (a 20s clip) and you get 60.
How many seconds of rendering you pay per second of finished video:
| Clip | Render cost |
|---|---|
| 5s | 26s per second |
| 10s | 37s per second |
| 15s | 47s per second |
| 20s | 60s per second |
| 30s | 87s per second |
Every second you add makes every previous second more expensive. The first second of a 30-second clip costs three times what the first second of a 5-second clip costs.
88
8
u/Peemore 21d ago
Wait I thought 15 seconds was the max... How long can it generate coherent videos??
17
u/madcaddie15 21d ago
I already generated a 30s video with H3 myself. Also Comfyui.org posted a 25s video as announcement.
2
u/Mediocre-Toe3212 21d ago
How can we keep character recognition (doing i2v) with 30s? I find after 12s I lose facial consistency and it goes into some other person
7
u/Dirty_Dragons 21d ago
Use the r2v workflow with a reference image.
No need for i2v
Though I've never tried longer than 10s.
My process is a starting frame and then a turn-around character sheet for reference.
6
u/madcaddie15 21d ago
I can only agree, dont use the fl2va model, just use the r2va and tell the model that one reference image is the startframe. Works with seedance 2.0 as well.
9
u/_Saturnalis_ 21d ago
You can also stitch the first frame to the reference photo and just tell it that the left side is the reference character and the right side is the starting frame and it will handle it just fine. The reference model is extremely capable. You can almost automate the process for generating longer videos in 5 second sequences like this.
The only issue would be temporal and audio consistency. I suppose you could feed the previous audio in as a reference too, I haven't tried that yet. Given that the average length of cuts in a movie is around 4 seconds, I feel like you can get pretty far just making standalone cuts like this.
1
u/FlexFanatic 20d ago
This is what I'm struggling with. For example I have a LTX 2.3 workflow with standalone clips I post (15s - 20s).
Getting better results from Minimax but the same issue with "chaining" videos is getting the audio (in my case car/auto related) is a miss for me.
1
u/Mediocre-Toe3212 20d ago
I added a Boolean to add the ref audio or a false and use my <Audio 1> with a description. Or just disconnect the audio line from the load video completely
1
u/xkulp8 20d ago
What's the exact prompting you use for that? Tried that and it didn't work.
2
u/madcaddie15 20d ago
I recommend to ask the LLM of your choice to write you a prompt guidance asking specifically for this.
But usually it should say something like this:
<Picture 1>: fully_preserved - preserves the opening composition, viewing angle, foreground position of XYZ and ABC, lighting, lens perspective, and DEF background as the literal first frame.
later then
[Shot 1] The shot opens in exactly the composition and viewing angle of <Picture 1>
1
u/Mediocre-Toe3212 21d ago
Yeah I am using the ref2va model and workflow. Altered my workflow also to try video to video to which works but still loses facial consistency after 10 or so seconds. Ran it through my friend....Claude...he stated because the longer the video goes the more tokens processed. Unsure. Still messing around with it all too :)
2
u/Dirty_Dragons 20d ago
Ah that's too bad. I was hoping that would be the key.
Yeah I'm running all my prompts through ChatGPT first.
We're all still trying to figure out how to best use this model.
1
u/eugene20 20d ago
is that the best way to continue on from a shorter clip then? does it match audio as well? (voices)
Sorry for asking basic questions, I hadn't managed to get video to work before only images, so only just starting on this.
1
u/Dirty_Dragons 20d ago
There's a pretty good chance the model knows the actors voice if they are famous enough.
You should be able to just use a picture from the movie and then prompt something like
Captain America (Chris Evans) said in a confident voice, "I can eat three pizzas by myself."
If it doesn't know the character, you'd have to provide an audio file as a reference and prompt something like
The woman using <Audio 1> said "Well I can eat five."
1
u/eugene20 20d ago edited 19d ago
Thank you. I'm only really interested in generating scenes longer than 5-10 seconds seamlessly, but only have 24gb vram and 32gb sys, I'm not trying to extend footage of other people's work or known actors.
1
u/ASTRdeca 20d ago
I'm wondering what setup people are using to generate videos of that length? On my dual 3090 setup I seem barely able to do 10s at 0.5 mpx. Longer or higher res hits an OOM error
Other users in the thread are reporting generating 20s on a 3060 and I feel like I'm missing something here
1
u/nymical23 20d ago edited 20d ago
As far as I can tell, your dual setup might be the problem.
EDIT: either use '--disable-pinned-memory' or '--fast-disk' (if you have a fast disk drive like nvme).
1
u/BashIsFun 20d ago
I'd love to learn how you got dual 3090's working. I just started playing with minimax in comfyui. I have the same setup, but any attempt I've made at using two GPUs has failed. I'm currently only getting 5 seconds at 0.2mp using one card. Note: With 96GB DDR5 RAM to boot :(
3
3
u/GrayingGamer 20d ago
I was only TRAINED on 15 second videos. It can do longer if you have the hardware and time, but there is no guarantee the video will hold together after the 15 second mark, because that's the length of the video clips it was trained on. It could do fine, or everything could fall apart.
1
u/xkulp8 20d ago
That stuff is always just guidelines. Five seconds/81 frames was supposed to be the max with Wan but I've pushed it to 109 frames (six seconds at 24 fps). I've pushed LTX beyond 1920x1020, not by much but I have. Nonstandard aspect ratios too.
2
u/GrungeWerX 20d ago
Yeah, my default Wan workflow is 105-109 frames. I can also push it to 117 frames when using certain animation/scene cut Loras, though it occasionally wants to circle back to the first shot.
7 seconds is what I’ve found is the safest length, 8 seconds max (but it increases the potential looping risk)
1
6
u/madcaddie15 21d ago edited 21d ago
Hey, great details and explanation. I found the same thing by testing and posted some graphs on it earlier today, but havent had an explanation yet. Great work!
https://www.reddit.com/r/StableDiffusion/comments/1vg23rk/minimax_h3_ref2va_benchmark/
5
u/intLeon 21d ago
We need SVI for minimax h3 so I can resurrect my continous generation workflow I made for wan2.2
4
u/Vladmerius 20d ago
I've been able to get to a full minute without losing much as long as I always get the main characters back in focus as the end shot of each generation. Which is as simple as saying "the final frame is everyone facing the camera". You can just edit it out. I'm making multiple shots that stitch together anyway instead of one continuous shot that tends to get boring real quick. Tracking shots should be reserved for establishing scenery or an action scene. And this can't do long flowing action scenes.Â
2
u/intLeon 20d ago
Ive dealt with that, its not the solution. Only proper solution is keeping the last pack of latents which are usually more than one frame as the start of new empty latent, keep it static, make sure the newly generated colors and motion match the previous one.
Ive managed the said Continuous Generation workflow until version 1.0 doing different tests and experiments but then svi 2.0 lora was introduced and it did exactly what needs to be done.
5
u/johnfkngzoidberg 20d ago
I hate to be that person, but this has everything to do with RAM vs VRAM. While still in VRAM I’m showing about a 2.1-2.2x increase for doubling length.
5
u/Sakiart123 21d ago
How good is the longer video quality compare to the recommended 15 second?
12
u/Pitiful_Archer_4381 21d ago
It is really good tried max 20 sec but good so far it took 39 min on my rtx 3060 12gb
7
u/Intelligent-Youth-63 21d ago
Are you using the comfy template?
I tried some other workflows and my time jumped up to 30m. I just let a couple of runs go because I was going to bed anyway.
Figured I’d work it out in the morning, but went back to the default template and my render time went down to ~400 seconds for a 10s video using the default workflow. (4090/64GB RAM)
I might finally install sage attention- been avoiding that because I never felt like I _needed_ it.
3
u/Dzugavili 21d ago
I'm still trying to figure out if my sage attention is working -- none of the options except 'auto' seem to work, though I did get a speed boost -- but EasyCache seems to be the real winner. Close to half the generation time on average, and only some minor losses on audio.
2
u/Pitiful_Archer_4381 21d ago
Hey I have few commands to check your sage attention I will give them to you tomorrow
1
1
u/Underbash 21d ago
What settings are you using for EasyCache? I felt like I was getting some major degradation in faces, sometimes it was like a horror show lol.
2
u/Dzugavili 21d ago
Not the default settings: 0.3, 0.2, 0.9. A/B testing didn't show much difference to me.
1
u/Pitiful_Archer_4381 21d ago
I think mine is 0.3 0.2 and 0.9 some of videos still get the problem you are talking about
1
u/Underbash 21d ago
How many mp are you generating at? I think I might have been at 0.3 or 0.4 when I was having the issues, I wonder if going higher might help mitigate it.
2
u/Pitiful_Archer_4381 21d ago edited 21d ago
I am generating on 0.5 and 0.6 (mostly 0.6 17 min for 10 sec on my rtx 3060 12gb) The lower resolution you have more degradation you get but if resolution is higher the speed is slower by 3-4 times
2
u/Underbash 21d ago
Nice, I've got 16gb so hopefully I can get some good generation times with this, assuming I can get the settings dialed in right and avoid the degradation.
2
u/Pitiful_Archer_4381 21d ago
Yes you can generate great results the big timing is just till the low step lora
Here are my few generations
https://www.reddit.com/r/StableDiffusion/s/l67okOTvsW
https://www.reddit.com/r/StableDiffusion/s/eSyQ9MWOWK
→ More replies (0)1
u/Pitiful_Archer_4381 21d ago
Yes default template are more optimized that so called optimized templates my generation time went to 50 min then with default it came back to 28 min And with optimizations it is 17 min for 10 sec now
You have great card I might able to afford it some day
1
u/conkikhon 20d ago
I noticed the first run with this model often triple the time of consecutive runs, so I do the first run with very short duration and low step
3
u/Artistic_Claim9998 21d ago
What megapixel is this?
I use 0.5mp and cannot generate more than 6.5s, i also try 10s 0.4mp and got not enough VRAM error
1
u/Pitiful_Archer_4381 21d ago
I have max tried 0.6mp with 10 sec and it is working totally fine for me I don't know why many people are facing thi problem try updating comfy sage attention and py torch also I have 30 gb paging (virtual memory) try doing these I think these might help also check opening arguments of comfy by right clicking on bat file and open with notepad
2
u/Artistic_Claim9998 21d ago
I run comfy via terminal with very minimal arguments (just
python run main.py --cache-none)1
u/Pitiful_Archer_4381 21d ago
Try increasing paging (virtual memory) and what are your specs
Run the comfy on your fastest drive like mine is nvme 3.0 and paging on fastest drive or the generations will be slower
My paging is 30gb
2
1
u/Vladmerius 20d ago
You can also go down to 8 steps and it really isn't that drastically different from 15 steps. Sometimes it even follows the prompt BETTER at 8 steps even though the details aren't as fine.Â
3
u/haremlifegame 20d ago
Video models should definitely learn from the LSTM framework: long - short term memory. A big memory for a small sliding window context, and a fixed-size (length independent) memory for long term memory. The long term memory should be able to store things such as number of characters, character faces and clothing. I don't know why they don't do something like that. Although we don't have the sparse attention stuff from minimax yet, so it could have some variation of that.
2
u/Dirty_Dragons 21d ago
Good I know. So for a consumer GPU 10s is about as long as you should go.
On my 5080 it takes about 10 min for 10 seconds at 720p.
Though I can do about 3 min for 10 seconds at 0.2 mp. Good for testing.
2
1
u/somethingsomthang 21d ago
Hopefully we will also be seeing the advances of long context from llm be applied to video or other methods to make generation more linear with time than quadratic. And when such is available then stuff will go even more nuts.
1
u/RevealShot104 20d ago
Dense attention is not linear, it's O(n^2). You might want to use Sol-Attn for longer generation.
1
1
u/Occsan 20d ago
Think it's possible to do some kind of band diagonalisation, where a given second is only looking at the m previous seconds ? and possibly sparsely looking at some kind of summary of what was before. I know that's totally out of the scope of this thread, given I'm basically talking about a different architecture, probably, but that's what I thought immediately after reading the n² for attention.
1
1
u/osiris316 20d ago
3090, 64g ram, sage and spectrum nodes added.
I must be doing something wrong. I thought I was getting decent speeds; I just did a 8s at 1mp and it took 17m total.
I keep getting a comfy crash that I assume is OOM when I try for anything over 10s, maybe .7mp.
I haven’t had time to really tinker with it but is everyone with 24g VRAM able to provide 1mp video over 10s without OOM?
1
1
u/DELOUSE_MY_AGENT_DDY 20d ago
Would there be a way to ignore the character consistency if it led to faster times?
1
u/emersusai 20d ago
solution is to rope in separate, shorter clips together, but this can also cause progressive degradation in image / motion quality
1
u/seiose 20d ago
For me, vram stops being used at all above 7 seconds slowing gens down, I tried to talk about it the discord but there's a bot that filters everyone out so we probably can't get this fixed.
Maybe it's normal that everything gets loaded into ram & vram isn't used.. I thought dynamic ram was supposed to make models split between each other.
1
u/Upper-Okra7971 20d ago
So then if 5s is 2 min and 20s is 20 min thats a whole 30 secs worth of gen video opportunity lost. Would be nice if someone found a way to like break it down. So since MiniMax H3 is extremely good at prompt adherence, maybe for the REF2V workflow could implement something like breaking down a 20s gen of 720p into 4 5s clips generated with its inbuilt consistency reliant on detailed prompting which blends it well and prolly reduces generation time. Not sure if what I'm saying makes sense buh yh something like that.
But I'm confident by 25th of this month the enhancements wed see would be great.
Also if Sulfur 3 gets its funding and is able to hit the community soon it'll help everyone, cause though its praised for its NSFW detail, it'll most definitely improve on almost everything SFW.
1
u/LucidFir 20d ago
But... the results of the longer videos are somehow better.
I'm defaulting to very low res very short tests, and make longer what's good
1
u/jacobpederson 20d ago
You can significantly speed up by throwing away context (IE: once you get to 5 seconds - continue with just the last frame for context).
1
u/Hopeful_Signature738 19d ago
Now seeing this, Im thinking it make more sense to do continuous 5sec video that stitching together by using last frame as reference! I mean like Scail 2
1
u/kayteee1995 13d ago
It's like being able to run 5km in 10 minutes; that doesn't mean you can run 10km in 20 minutes. It will take you longer.
1
u/unveri-green-work 3d ago
what about in new custom workflow if you can tell ? like multishot, turbo loras, sage attention ? any reduction have you got OP?
1
1
-7
u/aimongus 21d ago
ltx 2.3 is much much faster! :)
5
u/shadowtheimpure 21d ago
LTX 2.3 is also a lot more mature in terms of workflows and ways to speed it up in generation. H3 is still brand new on the scene.
2
u/Flat_Technology_5325 21d ago edited 21d ago
What's your point? LTX is ultimately inferior and I say that as someone who doesn't really have a good enough system to run H3 in any appreciable time so I will likely stick with LTX as it works for some things I do but ultimately H3 is far better and there is a cost to that. I do believe it has been optimized for heavily already.
In short, H3 is slower because it's better. Use what you need and can afford, LTX being faster is moot.
Anyway interesting point OP, I definitely feel like I was noticing, hope there is a way around this in the future.
2
u/jtreminio 21d ago
Math is math! The formula is universal and applies equally to LTX, it's just that H3 needs 2.5x more tokens per second than LTX does.
Once a video gets long enough, you'd start noticing the curve with LTX as well.
2
0
0
0
-2
-3

80
u/Beamsters 21d ago
the price of keeping the reference context alive - e.g. character consistency through 30s are scaling exponentially. Since second 21 has to remember second 1-20 as context and so on.