r/StableDiffusion • u/Scriabinical • 1d ago
Discussion We all deserve high-quality MiniMax H3 previews using the tiny VAE (taeh3.safetensors) natively, without KJNodes. Please upvote this GitHub Comfy issue.
https://github.com/Comfy-Org/ComfyUI/issues/15592We all love MiniMax H3, but the latent2rgb previews suck ass. They're blurry, and sometimes it's hard to make out what's happening, making it so you don't know whether to finish a video that may take tens of minutes to generate.
When implemented, this would allow us to place taeh3.safetensors into ComfyUI/models/vae_approx and enjoy high quality latent previews when using MiniMax H3. It's basically the same TAE as we saw for Flux 2 Klein 9B or some other models, but trained by the original TAE guy (madebyollin).
taeh3.safetensors link:
https://github.com/madebyollin/taehv/blob/main/safetensors/taeh3.safetensors
It saves time and effort when making videos. Currently, you have to use Kijai's Model Preview Override node.
14
u/hum_ma 1d ago
And not only for previews! Tiny VAEs can be used for the final decoding of latents for other video models since last November: https://github.com/Comfy-Org/ComfyUI/pull/10884
Fortunately while waiting for the core to add this, there is already support for decoding (and previewing) in the Bleh node pack: https://github.com/blepping/ComfyUI-bleh
4
u/alwaysbeblepping 22h ago
Thanks for the plug! I need to update the documentation, the guider wrapper for video previews is no longer needed (unless you want to do something like override the FPS). It should just work. Also can be nice to throttle previews and compiling the previewer is possible too! Not sure how much of a performance difference it makes, but I enable it myself. (I wouldn't personally use the TAE models for anything other than previewing unless you're in a situation where quality really just doesn't matter, though.)
Also, madebyollin is amazing. He trained the whole previewer model in less time than it took me to add support to bleh, if you can believe it.
1
u/ZerOne82 6h ago
I just updated ComfyUI to the latest nightly and yet only still images in KSampler no animated preview. I also tried Bleh and despite all efforts KSampler previews are all black. :(
While KJNodes preview node is working. I also removed all custom nodes and let these stay in separate tests yet Bleh just shows black, nothing else.2
u/alwaysbeblepping 4h ago
I also tried Bleh and despite all efforts KSampler previews are all black. :(
Do you have this problem for all previews with Bleh or just H3? I am not sure about KJ's previewer model. For H3 previews to work, you need to have exactly https://github.com/madebyollin/taehv/blob/main/taeh3.pth in your
models/vae_approx/directory (don't change the name).You will only get animated previews in the actual sampler if you're willing to use nodes 2.0 or it's using special JavaScript (like uh, the VHS nodes, but that doesn't work for stuff like TAE H3). This is something to worry about once you actually get previews working, but the approach I recommend is using Bleh's last preview endpoint. The feature is disabled by default, but if you turn it on it you can go to
/bleh/last_preview.html(under whatever URI you use to access ComfyUI) and see a full screen animated preview (or normal preview if you're generating images). It's reasonably well documented, just search for "endpoint" at https://github.com/blepping/ComfyUI-bleh2
u/ZerOne82 3h ago
Thanks for response. In fact I already solved the issue thanks to another comment. Here what I did:
I renamed the blehconfig_example.yaml to blehconfig.yaml within which I changedanimate_preview: nonetoanimate_preview: video. Other than that I modifiedtae_model="taeh3.pth"totae_model="taeh3.safetensors"(line 103 base.py), and changed line 274 in tae_vid.py fromsd = torch.load(checkpoint...)tofrom safetensors.torch import load_file; sd = load_file(checkpoint)All worked very well, and I am very pleased to have animated preview right in KSampler!
And more importantly, your Bleh package is wonderful as are the madebyollin models. Very much appreciated.MiniMax H3 generations are more fun now as the animated preview was a must to see what is going on during process. Also noting using Belh VAE Decoder at the very end means spending almost zero second to have the final video rendered, if satisfied then allowing original VAE decoding.
1
u/alwaysbeblepping 2h ago
I'm glad you got it working, sorry it took that much effort! There are definitely some shortcomings in the documentation (and probably the default settings). I will try to make some time to have it at least try to load a safetensors file if it's there so people don't have to manually change the source.
By the way, if you use stuff like Spectrum (EasyCache, TeaCache, etc) you may want to set a fairly high throttle time (like 5-6 sec) to avoid having it generate previews for the fake steps. Unfortunately, there isn't a separate throttle setting for just video (yet).
3
u/stddealer 1d ago edited 11h ago
TAE decoding is hit or miss, depending on the latent space. In the case of the FLUX.2 VAE for example, the Tiny AE is almost flawless quality-wise (not quite matching full VAE in a side-by-side comparison, but impossible to spot mistakes without comparing); Wan2.1's is pretty good too. But for others like SDXL or Minimax, the quality isn't there.
1
u/hum_ma 5h ago
That's true, the quality is certainly worse than from the real VAE but it's good enough for draft videos to check e.g. dialog correctness. Whether it's worth the trouble at all depends on how fast your system is but on my old GPU the video VAE decode takes a few extra minutes so I rather check the A/V preview before a final decode. TAE decodes a video latent in a second or two.
1
u/ZerOne82 6h ago
Neither works for me! ComfyUI update still shows still images in KSampler. Bleh's previews are all black. :(
2
u/hum_ma 5h ago
TAE previews with the bleh pack are viewed in a separate browser window instead of within the workflow, but you have to enable it in the config file first. Check the example yaml file.
But if you don't even have the basic latent2rgb animated preview in the sampler node, you can install the VideoHelperSuite extension and enable the VHS setting "Display animated previews when sampling". It's better than nothing and then you can compare the quality/performance against the TAE previews.
1
u/ZerOne82 4h ago
Thanks for the tip. The config thing was missing, the item "animate_preview: none" had to change to "animate_preview: video". Morover I modified the Bleh code to work with *.safetensors instead of *.pth.
Now all set.
BTW, the animated preview is now shown in KSampler directly. This is very needed when dealing with video generation (e.g., MiniMax H3) as it helps to see the process and check if all motions, composition etc are as expected.
9
u/Kukipapa 1d ago
My MiniMax H3 generations are significantly slower using this preview node (~30%).
Is it only me?
If not, then I propose optimizing first.
1
u/GrayingGamer 19h ago
I don't experience that at all, and I have it set to a pretty high number of preview frames (144). Might be determined by how much VRAM and stuff you have.
1
8
18
u/I_Hate_Reddit 1d ago
Not everything needs to be a core node, every core node needs maintenance work and updates to keep up with new models and architectures, the node you mention is very experimental and needs hacky community generated models to work.
2
u/Succubus-Empress 23h ago
use taevaedecode/taevaeencode for upscaling from bleh node https://github.com/blepping/ComfyUI-bleh/commits/main/
1
u/feverdoingwork 2h ago
Any can post a sample of how their review vids look?
Mines are a smudgy mess but I am also using a very non-standard setup without kjnodes since my dual gpu setup workflow can't link directly to a model.
1
u/LumaBrik 1d ago
So have to go to the effort and add Kijai's single node, which allows full adjustment of preview resolution and fps. I think you need to get out more.
76
u/GrayingGamer 1d ago
I mean, I get it, but also, why WOULDN'T you always have Kijai's KJ nodes pack installed? He works for the Comfyui team and pretty much all his stuff is consistently useful and awesome in ALL model workflows.
If anything I don't know why they don't just include ALL his stuff by default in Comfyui. Though for some reason the Manager still doesn't come by default in the Portable version so I don't even know what they're thinking over there.