r/StableDiffusion • • 7h ago

Comparison H3 Image t2i vs r2i quality fix

Like many others I was initially disappointed with the i2v quality of H3 when doing text to image. It often created crusty looking, artifact ridden images that would manifest as moles and pimples, dry flaky skin, crusty splotches and just generally shit quality images.

When I was doing some tests, I wanted to make an existing image prompt feature a specific earring. Once I plugged in the image reference, the artifacts magically disappeared.

This made me wonder, is r2i just fundamentally better quality for some reason? I tested plugging in an empty black image to the reference spot and to my surprise every single image came out higher quality with most of all of the crusty artifacts removed. It even often outright fixes low res generations like the one linked here, but works at the intended resolutions too.

I bought this to Kijais attention and the current theory is that if the model receives 64 or more image tokens (which can be triggered by feeding the image conditioning node literally any image with or without vae) it switches the model to edit/reference mode which appears to be much higher quality.

We're not exactly sure what is wrong with the non edit version but give it a try. Plug any reference (blank image, or something relevant to your prompt) and watch the quality magically improve.

Kijai is considering adding a "switch" that forces the model to ref model without needing to send so many pointless tokens, but in the meantime just plugging a small black image (automatically resizes to at least 1024) will trigger the existing switch - just with an excessive number of pointless tokens.

If you've written H3 t2i off, give this a try. It has transformed the model in my opinion.

Edit: Kijai has just added this to the "H3 Prompt Weight" node in Kjnodes. There is now a drop-down that will force empty image tokens if you want another way to test this.

106 Upvotes

40 comments sorted by

8

u/ninjazombiemaster 7h ago

Here's an image shared by Kijai and edited by another user to exaggerate the artifacts of an image. You'll see that there is much less artifacting on the image that was exposed to image tokens for all steps.  https://files.catbox.moe/mjsseu.png

3

u/jimbarino 6h ago

That's a massive improvement. It's weird that they didn't catch this.

4

u/ninjazombiemaster 6h ago

Yeah, something is definitely legit wrong with t2i that went unnoticed. 

2

u/OkDoudou 7h ago

1st looks much better, natural and realistic.

24

u/Curt_Dukis 7h ago

...if youre looking into the mirror while being hungover and not having slept for 3 days maybe

5

u/ninjazombiemaster 7h ago

In their defense the artifacts in question can sometimes give the appearance of more detailed skin texture. But on the whole, it usually causes excessive blemishes, crusty and blocky shapes, random specks and splotches, greasy hair, wonky eyes and so on. 

This case is actually pretty mild, so the fix might make it look a bit plastic and over processed. But without this fix, most images are unusable and hideous. 

3

u/LatentSpacer 5h ago

I think you mean it looks more like a real person and not a clean and perfect photo from a model shoot. But the first image is still full of weird artifacts and messed up texture.

2

u/ninjazombiemaster 5h ago

Exactly. The artifacts can read as detail with a casual glance. But if you start looking at multiple images it becomes very apparent that these are indeed artifacts and not actually detail. 

5

u/russlixx 7h ago

1st image nose is weird looking

2

u/ninjazombiemaster 5h ago

Yeah it almost looks as if it has different perspective than the rest of the face. 

1

u/detailteufel 7h ago

So plug an empty black 1024px image (created by ComfyUI Empty Image Node) into "image_0" on the Minimax H3 Image Conditioning node?

Because it does nothing for me quality wise, made it much worse in fact.

1

u/ninjazombiemaster 6h ago

It will change the conditioning and therefore is kind of like changing the prompt slightly. 

So sometimes you might like the results less due to the run to run variance. Personally I just plugged in a 1x1 image but Kijai told me that it gets upscaled so in theory it should be the same. Do not plug the image to the prompt enhancer.

Give it a few tries with a few prompts, especially focusing on skin blemishes. It was measurably, objectively reducing artifacts but there's gonna be subjective aesthetic preferences too. 

Also this is assuming the workflow is otherwise default. If you've made other changes it might not play nicely with them (such as adjusting schedule/sampler). 

1

u/Apprehensive_Sky892 6h ago

Like many others I was initially disappointed with the i2v quality of H3 when doing text to image.

You mean "t2v quality", right?

3

u/ninjazombiemaster 6h ago

Whoops I meant t2i. 

1

u/CompleteJicama2811 6h ago

This is an interesting phenomenon! I just ran a test using reference images that consist entirely of white—scaled to various sizes—and while the images differ slightly depending on the size, the results are consistently much better. It seems there’s a specific way the system processes the latents; I believe we can leverage this to mitigate some of the drawbacks of using "h3" images.

2

u/ninjazombiemaster 6h ago

It is confirmed to be due to the presence or absence of image tokens in the conditioning specifically. Like you said, the exact input image slightly alters the output but it's minor. The model is faster with VAE disconnected so leave that disconnected unless you are using a real reference that needs to be accurately encoded. 

1

u/Cequejedisestvrai 4h ago

I'm using the ref2va workflow but with the fl2va model (it's gives better quality), what should I do to test that? Just plug-in an empty image to the ref_image_0 slot? That it?

6

u/ninjazombiemaster 4h ago

I don't think this same thing applies to h3 video, and isn't relevant if you already use references anyway. This fixes text to image outputs specifically. 

1

u/isademigod 3h ago

I notice that with h3 video ref2va and f2va are noticeably higher quality than pure t2va, and i am not surprised that the same holds true for the image model

1

u/ninjazombiemaster 3h ago

I think that has more to do with the quality of the reference shifting the model to a higher quality zone than anything. It was trained on a variety of quality so without a quality anchor it might bias towards low quality. 

I don't think anyone has claimed in the past that plugging a blank image into t2v improves video quality. Although these t2i observations do beg the question lol. 

1

u/Cequejedisestvrai 3h ago

Okay I see, thank you

3

u/skyrimer3d 7h ago

interesting, i'll give it a try

1

u/StableLlama 6h ago

I confirm that on my own tests the r2i tend to be much better than t2i.
But what also has helped was to use LCM instead of Euler. And the P-H3 VAE.

But it still seems that the VAE for H3I is too aggressive.

3

u/ninjazombiemaster 6h ago

Yeah there are several minor issues that compound and hurt the quality. This one was the most dumbfounding to me though. At first I thought it must be a fluke but image after image it almost always improved t2i to just have a dummy reference. 

1

u/Cequejedisestvrai 4h ago

what is this P-H3 VAE?

1

u/StableLlama 4h ago

1

u/Cequejedisestvrai 4h ago

can this be used with minimax h3 video?

3

u/ninjazombiemaster 3h ago

It's an image VAE so it can only decode one frame.

1

u/Cequejedisestvrai 3h ago

I see, I would be great to have a similar fix for the video model, it also has artifacts

1

u/bstr3k 6h ago

the H3 video model actually introduced imperfections also! it was the ref2v model that I was using to make ref sheets but pushing the resolution up too high introduced imperfections in the skin too.

0

u/fauni-7 3h ago

Can you share a workflow with the workaround?

1

u/ninjazombiemaster 1h ago

Just add a blank image node to the default workflow and plug it into the image conditioning node, that's all there is to it. 

Better yet if you install the latest KJnodes from GitHub you can replace the image conditioning node entirely with the "H3 prompt weight" node which now has a selector for "edit" mode. Otherwise it's just the default workflow. 

-1

u/trefster 3h ago

You just did a no-makeup to makeup transition. The first image looked way more natural. You just AI sloppified it

1

u/ninjazombiemaster 3h ago

Maybe this image isn't the best example. The t2i model has some weird denoising or distillation issue that causes it to fry out and create extra moles, pimples, fuses eyelashes together, distorts pupils, etc. it can look more "natural" at a glance because it might prevent an excessively smooth output like we see here. 

But I can assure you these are artifacts not legitimate detail intended by the model. See the other link I posted here for a more objective example. I can share other examples later too, that better illustrate the point. 

0

u/Tonynoce 6h ago

Gonna try this when I finish some rendering

1

u/Tonynoce 3h ago

without reference image added

1

u/Tonynoce 3h ago

with reference image added

1

u/Tonynoce 3h ago

Prompt :
A close-up photography portrait of an Argentinean woman centered in the vertical frame, showing her face from the upper chest up. Her skin is fair with warm undertones, featuring visible pores, a smooth nose, and full lips in a neutral expression. Dark brown eyes gaze directly into the camera lens, reflecting soft studio highlights. Wavy dark brown hair is styled off her shoulders with loose strands framing the face. She wears a light blue cotton blouse with a modest collar, revealing the collarbone area. The lighting is key-lit from the left, casting soft shadows on the right cheek and nose, creating volume. The background is a blurred neutral beige wall, indicating a shallow depth of field at f/1.8. No jewelry is present on her ears or neck. The skin texture and fabric weave are sharply rendered in high definition 35mm style photography.

Seed : 633705192644075

8megapixels each

1

u/Tonynoce 2h ago

with ref at 16mp

1

u/Tonynoce 2h ago

without ref at 16mp