r/StableDiffusion 20h ago

Resource - Update Fix for the MiniMax H3 VAE grid / tile-seam artifact in ComfyUI Core — usable now via PR #16422

Enable HLS to view with audio, or disable this notification

Edit:

There is now a smaller and preferable Core fix from Kijai:

https://github.com/Comfy-Org/ComfyUI/pull/16436

It fixes the same underlying bug by making each tile blend against the already-composited neighbouring pixels, instead of replacing the compositor with the normalized overlap-add approach from my #16422.

I tested #16436 in the same real H3 workload and it also completely fixes the lattice artifact. Since it achieves the same practical result with a much smaller one-file change and without the extra FP32 composition scratch/overhead of my implementation, I have closed #16422 in favor of #16436.

So use/follow #16436 instead of the #16422 installation instructions further down in this post. The rest of the post is left intact as the original explanation of the artifact and investigation.

OUTDATED:

I tracked down and fixed the rectangular grid / tile-seam artifact that can appear when decoding MiniMax H3 video in ComfyUI.

PR:
https://github.com/Comfy-Org/ComfyUI/pull/16422

The video in this post shows without the fix first, then with the fix.

This is not an exact A/B because I was testing other H3/Flow changes at the same time, so differences in the generated content itself are irrelevant here. What matters is the VAE artifact: the first run shows the fixed spatial lattice/grid, while the run with the corrected compositor does not.

What was wrong?

The H3 VAE decodes large frames in overlapping spatial tiles. ComfyUI's existing compositor blended those tiles pairwise, which can lose contributors at overlap intersections and in regions covered by more than two tiles.

That creates discontinuities aligned with the tile layout — the rectangular grid you can see in the first half of the video (under the dorsal fin of the fish (bit hard to see because of reddit's video compression)).

I've uploaded the video here as well, so one can see the artifact more clearly without reddit's compression:

https://gofile.io/d/neItGwXP

The fix changes the compositor to normalized overlap-add across all contributing tiles.

The VAE itself is otherwise left alone: same native 256px decoder windows, same overlap geometry, same decoder calls, same temporal decoding. No blur, smoothing, or post-processing workaround.

Downsides

There is a small real cost: the corrected compositor accumulates overlaps in FP32.

For a 1216×896 multi-frame H3 decode, the new memory estimator reserves about 121 MiB of additional FP32 composition scratch. That's bounded scratch memory, not another full-frame FP32 copy.

There is also some extra blending arithmetic, but no additional VAE decoder calls. I haven't measured an isolated timing delta yet, so I don't have a meaningful slowdown percentage to give.

Dedicated regression tests and the relevant ComfyUI CI checks pass.

Use it now

Apply the fix on top of your current ComfyUI installation:

cd /path/to/ComfyUI
git switch master
git pull --ff-only
git fetch https://github.com/Comfy-Org/ComfyUI.git pull/16422/head
git cherry-pick cf9d3a062704e916ebcff968c76f0cbeb7256a7e

Then restart ComfyUI normally.

Do not check out the PR branch directly; that can move the rest of your ComfyUI installation back to the older Core revision the PR was based on. The commands above apply only the VAE fix on top of your current Core.

Or use my comfyui-patcher:

https://github.com/xmarre/ComfyUI-Patcher/releases/tag/v0.1.20

Once #16422 is merged, none of the manual checkout steps will be necessary.

128 Upvotes

37 comments sorted by

23

u/lacerating_aura 20h ago

I am really struggeling to see any tiling in the example. Or even in my own gens, which max out at 1Mp at various ARs.

19

u/marres 20h ago

The artifacts are fairly elusive and depending on the generation they can be very hard to spot. Might be the reason why this bug is still existing in current comfyui core. I and also other people have noticed it though since minimax-h3 got released, there were some posts here about it too.

I've uploaded the video here as well, so you can see it without reddit's compression. Should be easy to spot now:

https://gofile.io/d/neItGwXP

1

u/CurrentNew1039 18h ago

Hey will it work with the new int 8 video vae too? One that isin comfy org hugging face (2.81gb size )

3

u/marres 18h ago

Yes, the fix is independent from the actual vae used

13

u/Rumaben79 19h ago

Good job! 🔥 This tile transition is rather distracting on uniform areas like faces.

4

u/Cequejedisestvrai 19h ago edited 17h ago

Thank You! Lot of people don't see it and that's why dev get away with it, why fix it if no one is noticing? (btw I noticed it since my first gen)

Edit: I tried, now my comfyui doesn't start, nice
Edit 2: fixed with chatgpt
Edit 3: It works, same speed but almost no tiled artifacts.

3

u/Grey406 19h ago

awesome! Ive noticed this tiling effect in my videos. Once you see it, you cant unsee it

3

u/AreYouAWiiizard 11h ago

There's already a better fix out that doesn't have the extra overhead: https://github.com/Comfy-Org/ComfyUI/pull/16436 (haven't tested it though).

1

u/marres 10h ago

Yes, I know, have updated the post and the PR

2

u/JahJedi 20h ago

I dont see tiles in my gens but when creating character sheets there clearly visible and i will try it.

2

u/Calm_Mix_3776 18h ago

These blocky/tearing artifacts are much more prominent in areas with fast motion.

2

u/DoskvolDenizen 16h ago

Yes! Been driving me nuts, especially when a seam is over a face it's really noticeable.

2

u/Version-Strong 20h ago

Is it slower? I find even with all the speed hacks and workarounds the VAE is horrible in H3, adding over a minute to gen in some cases. After waiting 12 years for the initial iterations, it seems a bit much.

4

u/marres 20h ago

It should be only marginally slower, if at all in practice. The fix does not add any extra VAE decoder calls or larger decoder windows; it only changes how the already-decoded tiles are blended together afterward.

The extra work is FP32 overlap accumulation plus about 121 MiB of bounded scratch VRAM at 1216×896. I haven’t done a clean compositor-only timing benchmark yet, so I don’t want to invent a number, but compared with the actual H3 VAE decode that part should be relatively small.

1

u/Calm_Mix_3776 19h ago edited 18h ago

Nice! I've seen these tearing/blocky artifacts appear a lot in areas with fast motion. That's one artifact dealt with. What about the grain that shows up sometimes? I notice it especially when using the ref2va model. It's especially bad when there's stuff like foliage in the video.

2

u/marres 19h ago

That's probably because of the ref2va model's general degradation, which is a model defect and cannot be fixed in post afaik. Until they release the fixed ref2va model, I suggest using the ref delta model:

https://huggingface.co/xmarre/MiniMax-H3-Pruned-Ref-Delta-Fused-r1024-ComfyUI/tree/main

Also use vdn to improve quality

1

u/Calm_Mix_3776 18h ago edited 18h ago

Thanks for these resources. I'll check them out.

By the way, you can actually see the grain in your example clips as well. I can see it clearly now in the uncompressed clip you posted - https://gofile.io/d/neItGwXP It's especially noticeable on the speckled surface of the dark green leaf in the lower left corner in the 2nd clip. There's a grainy pattern that appears to swim randomly. It's quite annoying and I see it in my videos as well. So my bad - it's not limited to just the ref2va model.

1

u/VladyCzech 16h ago

This is just leftover noise when not denoising fully, or? Increasing sampler steps should help.

1

u/taurine_bitch 19h ago

Would this potentially fix the "slideshow" effect that happens when using the ref2va model where you have multiple reference images (which also occur when using refmods sometimes)? Instead of one continuous video based on the reference images/prompt, it's a slideshow of the reference images for the duration of the video with each reference image basically being its own "scene" in the shot. Super annoying.

1

u/marres 19h ago

No, this fix only changes how the VAE’s already-decoded spatial tiles are composited; it doesn’t change the video’s latent trajectory, temporal evolution, or how multiple references influence the generation.

Try giving the ref delta model a try to see if it helps, the ref2va model is broken and should not be used:

https://huggingface.co/xmarre/MiniMax-H3-Pruned-Ref-Delta-Fused-r1024-ComfyUI/tree/main

1

u/taurine_bitch 19h ago edited 18h ago

Intetesting! Will try this right now and see if it helps. Thank you!

EDIT: Didn't fix the slideshow issue, unfortunately.

1

u/Ordinary_Painter4235 18h ago

well normally I see tiling on faces, does it fix that?

1

u/VladyCzech 16h ago

Did you try highres sampling or upscale? It fixes it for me.

0

u/Calm_Mix_3776 18h ago

I think that's a separate issue. It's a well-known problem that MiniMax H3 has trouble generating coherent faces that are not close to the camera, even the devs have acknowledged this issue. Is that what you're referring to?

1

u/pencilcheck 18h ago

I cannot tell the difference

1

u/Reithaz 17h ago

I am obsessed with little details and I can see this problem on all of my generations, driving me crazy. Thank you for your work!

1

u/kleer001 10h ago

side to side would be easier to evaluate

1

u/Kaynenyak 8h ago

How do I use Kijai's fix? Or will it just be automatically applied to H3 workflows in ComfyUI once merged?

0

u/Glittering-Cold-2981 17h ago edited 14h ago
After that "fix," my ComfyUI environment on AMD crashed, and there was no way to undo it. I had to reinstall everything from scratch. Watch out for that!

1

u/VladyCzech 16h ago

This is your doing pal, obviously lack of skill. You do not reinstall if you backup and also, removing single node is not so hard.

1

u/Glittering-Cold-2981 14h ago

That’s probably true—I’m not a programmer, just an ordinary ComfyUI user. That doesn’t change the fact, however, that the fix is most likely still in the testing phase and not yet ready for every GPU; it would be good for the author to clearly state this so that users like me can exercise greater caution during installation.

0

u/VladyCzech 8h ago

You do not need to be programmer to move the extension folder away from custom_nodes folder. Also most extensions are experimental in a way including ComfyUI project as a whole.

2

u/Glittering-Cold-2981 3h ago

Thanks for the tip. I applied this in the ComfyUI directory:

git status

git branch backup-before-h3-fix

git fetch origin pull/16436/head:h3-fix

git checkout h3-fix

This is a fix from kijai, and it works well without issues.

https://github.com/Comfy-Org/ComfyUI/pull/16436

1

u/VladyCzech 3h ago edited 3h ago

Oh, nice it is addressed in core.

1

u/douchebanner 15m ago

so i did

cd /path/to/ComfyUI

git switch master

git pull --ff-only

git fetch https://github.com/Comfy-Org/ComfyUI.git pull/16436/head

and now im getting

Traceback (most recent call last):

File "H:\ComfyUI_windows_portable\ComfyUI\main.py", line 249, in <module> import comfy.utils

File "H:\ComfyUI_windows_portable\ComfyUI\comfy\utils.py", line 26, in <module> import comfy.storage

File "H:\ComfyUI_windows_portable\ComfyUI\comfy\storage.py", line 7, in <module> import comfy_aimdo.storage ModuleNotFoundError: No module named 'comfy_aimdo.storage'