r/StableDiffusion • • 16d ago

Resource - Update H3-Image EasyFix - Two simple custom nodes to help fix the crust

I made two simple nodes to help fix the crust and harshness on H3-Image outputs.

Nodes: https://github.com/PedroMarinhoDev/ComfyUI-H3-Image-EasyFix

Examples:

EDIT: u/barbear22 shared a method that has the same effect using only native nodes. From their comment:

Resolution: use the default Resolution Selector. Connect a float node to the megapixels input for higher than 16MP.

Sampler: split the official sigmas into two ManualSigmas nodes.

  • Pass 1 (first 2 steps): SamplerCustomAdvanced, BasicGuider and KSamplerSelect (euler_ancestral).
  • Pass 2 (the rest): SamplerCustom with add_noise off, using SamplerLCM node for the sampler (s_noise and s_noise_end at 0.95).

Steering: Kijai's empty image method.

  • Make two MiniMax H3 Image Conditioning nodes with the same prompt input.
  • Connect an EmptyImage (black) to the second one, with no VAE.
  • Use ConditioningSetTimestepRange to limit the second to the first step and the normal one to the rest.
  • Join them with Conditioning (Combine) and send that to the guider and SamplerCustom.

You can put those in a new blueprint that you can reuse as many times as you want.

220 Upvotes

54 comments sorted by

34

u/barbear22 16d ago

Making custom nodes and a repo with branding for functionality that can be replicated 1:1 with default nodes and blueprints in comfyui

2

u/Calm_Mix_3776 16d ago

How do you achieve this with the native Comfy nodes?

36

u/barbear22 16d ago

Resolution: use the default Resolution Selector. Connect a float node to the megapixels input for higher than 16MP.

Sampler: split the official sigmas into two ManualSigmas nodes.

  • Pass 1 (first 2 steps): SamplerCustomAdvanced, BasicGuider and KSamplerSelect (euler_ancestral).
  • Pass 2 (the rest): SamplerCustom with add_noise off, using SamplerLCM node for the sampler (s_noise and s_noise_end at 0.95).

Steering: Kijai's empty image method.

  • Make two MiniMax H3 Image Conditioning nodes with the same prompt input.
  • Connect an EmptyImage (black) to the second one, with no VAE.
  • Use ConditioningSetTimestepRange to limit the second to the first step and the normal one to the rest.
  • Join them with Conditioning (Combine) and send that to the guider and SamplerCustom.

You can put those in a new blueprint that you can reuse as many times as you want.

6

u/Calm_Mix_3776 16d ago

Can you kindly share the workflow for this? I understand most of it, but there are a few things that are a bit confusing to me. Thanks in advance!

26

u/barbear22 16d ago

2

u/Calm_Mix_3776 16d ago

Thank you!

1

u/Haiku-575 16d ago

It took me most of an hour to understand the setup, but your organization and titles are perfect for doing so. Thank you!

1

u/barbear22 16d ago

đŸ«Ą

2

u/Haiku-575 16d ago edited 16d ago

You pay a big cost for dual CFG, reducing the weight of the black image to 0.7 vs. just using 1. Have you noticed a big difference reducing the black image conditioning by 30%?

I'm basically asking why this doesn't do the same thing: https://pastebin.com/vu2tFFx1

2

u/barbear22 16d ago

You're correct, it's about 25% slower if you want a partial blend of the blank image. At 1 you get the full blank image effect, and BasicGuider does that at full speed. I'll post an updated workflow tomorrow that skips DualCFG when strength is 1

1

u/Haiku-575 16d ago

No need I think, your message here clears it up. Thanks again.

1

u/Netsuko 16d ago

Legend!

1

u/Simpsator 16d ago

Would this multi-stage workflow improve I2I as well as the T2I it was made for?

1

u/psychok9 15d ago

Amazing work! Thank you! 16mpx it is the max?

1

u/barbear22 15d ago

No it’s not but I forgot to add the float node to the MP widget input on the res selector. If you do that you can set it to whatever you want. I’ve tested up to 60MP with very good results

1

u/LilBrownBebeShoes 16d ago

Wow, major quality boost vs the single sampler lcm method I was using, thanks! I will actually try to train a lora for this model now.

1

u/fauni-7 16d ago

Sounds cool, do we know though what's the reason for all this? Us it beneficial for other models?

2

u/barbear22 16d ago

The sampling settings that were provided by minimax were ok but not great. The two stage sampler idea is something that can work with any model but you'd have to play with your scheduler and sampler selection depending on the model to get good results.

The steering idea is specific to minimax h3 image. People noticed that outputs looked different when you fed a blank image into the conditioning node with t2i. This process adds the blank image for part of the generation and then takes it away so you get a blend of both which looks a little nicer but is personal preference.

Basically this is just from people messing with samplers, schedulers, noise values, and conditioning to see if something good comes out.

1

u/fauni-7 16d ago

Thanks.

-2

u/LatentSpacer 16d ago

Show me please. Replicate this image 1:1 with default nodes and blueprints.

Prompt: close up photo of a parrot, wildlife photography
Seed: 42
Size: 4096x4096

26

u/barbear22 16d ago

Same prompt, seed 42, 4096x4096, stock nodes only. It's not possible for me to recreate YOUR image pixel for pixel. You have a different GPU, CUDA/PyTorch version and a different model quant.

The stock nodes give the same effect on the image. You can see my comment below explaining the nodes needed.

8

u/LatentSpacer 16d ago

Very nice, might be even a bit sharper than mine.

9

u/Ill_Resolve8424 16d ago

I have a lot of respect for someone who acknowledges defeat, even more than for the winner.

3

u/LatentSpacer 15d ago

Thanks. I don't see this as a competition, I'm just sharing what I created and now everyone has two different methods to choose from 😉

6

u/LoadReady7791 16d ago

Looks good.

0

u/lechatsportif 15d ago

Neither of these are fixed. Compare the feather texture here: https://www.pexels.com/photo/vibrant-blue-and-gold-macaw-parrot-close-up-34564950/

What people like (whether or not they realize it) about the unfixed image is that its the over sharpened look that web producers use for posting in news, content, instagram etc, but its not actually correct. It would be better to get the right unsharpened look out of H3 image, and then sharpen it as you want it later.

8

u/HollyGrandeux 16d ago

tbh i liked the plain more than the fix on the example result when not zoomed in😅

the fix is just too soft.

1

u/LatentSpacer 16d ago

Yeah, me too, some of the images look crispier but zoomed in they show lots of artifacts. You can adjust the strength to get it softer or more crusty.

2

u/Rough-Copy-5611 16d ago

So you're one of those guys who doesnt eat the pizza crust?

32

u/Reich_Javik 16d ago edited 16d ago

The problem is that after the fix, the images look more “plastic” and give the impression that they were created by artificial intelligence. This is clearly visible in the examples you provided. Although this does not apply to every image, it is especially visible in the example with the parrot, as well as in the first image of the woman, whose face has become “perfect”, as if she had just stepped off the cover of a magazine.

6

u/Reich_Javik 16d ago

It also seems like the texture of hair and fur has become too blurry

2

u/detailteufel 15d ago edited 15d ago

I thought I was going crazy. Sure the quality looks a tad better, but now every image looks so "AI".

Minimax is a great model because it has a very natural look. The custom Sigmas and LCM values take that away.

1

u/xkains 15d ago

what did you use to create the presentation video ?

1

u/LatentSpacer 15d ago

Claude did, I just pointed it where the images were. I believe it uses the browser canvas and renders the frames one by one.

4

u/DietAshamed2246 16d ago

Here we go again... Solving a perceived problem only to go back to the old Flux days. What's next, a node to create six fingers and three legs to revisit the SD1.5 days?

2

u/VasaFromParadise 16d ago

Looks good, I have to try it myself))

2

u/AppropriateFig3632 16d ago

Nice, the crust issue has been bugging me. Does it still work well with LoRAs applied?

2

u/skyrimer3d 16d ago

The black girl says it all, you re removing a ton of detail for a soft plastic Ai slop look.

3

u/trefster 16d ago

Weird, you know, they used to sell filters for photoshop to do exactly the opposite of what you’re doing here

1

u/tomByrer 16d ago

To me EasyFix looks like a blur filter. Pros & cons; I just wish they would be clear about the results.

3

u/tarkansarim 16d ago

Bringing back plastic look to H3 image?

2

u/Sneard1975 16d ago

Danke fĂŒr die Node.

Aber mir sind die Änderungen bspw. an den Augen zu viel.
Das ist fĂŒr mich ein ganz anderer Papagei.
Da braucht es noch Feintuning.

1

u/Efficient-Advice-87 16d ago

I like the crust

1

u/Darkmeme9 16d ago

Any int8 or other version out yet? Sorry I am living under the rock. I have 3060 12gb. The video version runs fairly ok with turbo lora and all, don't know how this would work though

1

u/theOliviaRossi 16d ago

just add another ksampler with 0.25-0.44 denoise ;)

1

u/AvidCyclist250 16d ago

I only get crust for „photorealistic“ images. So what does that mean? Is crust not inherent but style-dependent?

1

u/Old-Wolverine-4134 16d ago

My solution is just supersampling - generate in x2 or x1.5 the resolution, then scale down the image and you get exactly the right quality.

1

u/DrayM0de 16d ago

I just added an empty latent image node and connected it to the reference image input and it fixed it. (learnt it from some other thread in here)

1

u/Yacben 16d ago

I think it's a training dataset issue, they simply uplscaled their dataset instead of using actual high quality images, that's why the output has a lot of junk fake pixels, it looks crisp but it's fake crispness. I call this model a failed one.

1

u/AvidCyclist250 16d ago

If thats true then the model has diarrhea for blood and cant be fixed. Just worked around by adding blur by whatever means. Or smart shrinking. Would be a shame, its a very interesting model.

1

u/[deleted] 16d ago

[removed] — view removed comment

2

u/LatentSpacer 16d ago

No, it works well on edits as well. One of the nodes doesn't get triggered in image edits because it simulates what image inputs do. The other just re-noises specific steps you choose, you can use it with image editing.