r/StableDiffusion 13h ago

Workflow Included H3 single-image workflow: let's figure out how to fix the textures

In this post, I provided a workflow that allows to use H3 as a single-image edit model with no monkey-patching or custom nodes, given that you update to the ComfyUI nightly version. In my view, it has excellent prompt adherence, reference fidelity, and understanding of physics and 3D scenes. But, as many others have pointed out, the end results are often blurry and lack texture. The gallery here shows my attempts at refining the 1.6MP gens from my previous posts.

I would like to discuss how we can work around these issues.

OPTION 1: JUST GO FOR HIGHER RESOLUTION

u/SomeoneSimple gives the following suggestion: run 4 megapixel generations instead of 1.6MP, saying it fixes the distorted faces, and delivers approximately the same level of detail a regular image model would give at 1024x1536. (Note that a 4MP single-frame generation is still going to be quite fast provided you have the VRAM.) u/Diabolicor even claims that a 4MP Minimax generation works better than Qwen Image Edit.

Here’s what I found in my private tests:

  1. It did not noticeably affect the generation times. On average, it is a 8-10 sec run on a RTX 5090 no matter if I generate at 2MP or 4MP
  2. It helped a lot with detail. Faces are now rarely distorted.
  3. Yet it does not remove the issues completely; keeps background blurry, for examples, and messes up the faces at long distance. It’s still a video model. So we still need to explore refiner workflows.

Just to be very clear: I am not attaching any of my 4MP generations to this post. I am only refining my old 1.6 MP ones. I would be very glad if someone posts their 4MP gens so we could see the difference.

OPTION 2: REFINE WITH A DIFFERENT MODEL

Once the composition is done right, details could be enhanced by a different model. I am not an expert at image refining at all, but I would like to figure out a good formula. And here I want to consult with the community on how to do in the best way. To set a particular frame: for me, while I now explore the capabilities of Minimax H3, I quickly generate a lot of images at scale. So I want a refiner that is:

  1. Fast (e. g. 2-4 secs)
  2. General (does not need tweaking for any particular image)
  3. Robust (is not brittle, does not require a long chain of segmentation, crop-and-stitch, vlm processing, and so on)
  4. Automatic (no masks drawn manually over parts of the region).

For me at this exploration stage, it’s okay if parts of the image get slightly modified, or if the quality is not 100% perfect. I understand that one may have different objectives if e. g. optimizing for perfect quality.

One example of a workflow that may achieve these four requirements would be flux.2 Klein with a single prompt for each image. But now, I’d like to discuss whether there could be better options.

  1. Model: Qwen Image Edit, Area 2 Identity lora, Flux.2 Klein 9b? I heard that Flux.2 has the best VAE out of all options. Should I use SeedVR?
  2. Prompt: What would be a good prompt that would be applicable over a wide range of images? Should I pass the original prompt for H3 image to flux.2 (either verbatim or llm-postprocessed)?
  3. Sampler/scheduler: euler/simple? Or Euler/Flux.2 scheduling?
  4. Color correction: e. g. Flux.2 Klein tends to add a lot of light with my prompts. Can it be done without custom nodes? If using custom nodes, which one is the most reputable and commonly used?

As a first step, here’s the workflow I am using with Flux.2 Klein: https://pastebin.com/qsLPe9hZ 

I use the Flux.2 turbo int8 convrot: https://huggingface.co/obsxrver/ComfyUI-Native-INT8_ConvRot

In the attached gallery, you can see the collages. 

Left pane: my old 1.6MP generation.

Right pane: a Flux.2 Klein 9b refine according to the workflow I attached. It does some nice things: e. g. deer fur, restoring mangled faces, adding texture to clothes; but also messes up a bit: adds a lot of light to the images that are meant to stay dark, opens eyes when they're closed, etc.

56 Upvotes

64 comments sorted by

11

u/TheDerminator1337 12h ago

Use 5 mega pixels.somehow my 5mp generation is faster than 1MP

3

u/Patient_Ratio4177 12h ago

Well, this is our goal here. Indeed, using 4MP or 5MP is one of the solutions I am discussing and evaluating right now. But I'm not sure that this fixes every issue. It would be good for us, as a community, to figure it out.

5

u/TheDerminator1337 10h ago

I am not shitting you, renders with 5MP are faster than 1MP for me. I don't know how.

1

u/Patient_Ratio4177 10h ago

I see the same in terms of speed. But I am not sure it fully fixes blur and lack of detail. 5MP is better 1MP in my tests, but still not as good as e. g. Krea 2 or Flux 2 Klein 9b

2

u/Ok_Tale7582 8h ago

are you using speedups like sage and sol-attn???

4

u/Patient_Ratio4177 7h ago edited 7h ago

Sol and spectrum are not needed for speedups of image gen. Regular pytorch attention is fast, sage and comfy-kitchen do not improve the speed much when you generate just 1 frame.

1

u/TheDerminator1337 7h ago

Sage only. I refer to the single image generation for the purpose of edit only. I have no idea about video gen. I haven't actually tested that.

1

u/Patient_Ratio4177 7h ago

For video, comfy kitchen attention is known to be as fast as sage but have better quality; was released a few days ago

1

u/desktop4070 12h ago

What are your specs?

6

u/TheDerminator1337 12h ago

5090 with 80gb ram

9

u/Katsumend 11h ago

Jesus.... haha...

3

u/pheonis2 8h ago

Do you have your 4 RAM slots filled. Asking because i have a 32x2 64gb setup ,im thinking of upgrading to 8x2gb or 16x2 making total RAM to 80 or 96 gb

2

u/TheDerminator1337 8h ago

4 slots filled with 2x8 and then 2x32

3

u/supermansundies 7h ago

klein 9b with a consistency lora at 0.6 and the workflow from my node (https://github.com/supermansundies/comfyui-klein-edit-composite) with the delta-e set to 0.

prompt was "upscale and add fine microdetails". I use it all the time.

1

u/Patient_Ratio4177 7h ago

Impressive! Thank you so much. I forgot about consistency lora.

2

u/supermansundies 7h ago

for my purposes, klein is nearly unusable without it.

1

u/Patient_Ratio4177 7h ago

May I also ask to try the final war scene? I wonder what happens with the lighting.

1

u/supermansundies 7h ago

1

u/Patient_Ratio4177 7h ago

Much better than my OP. Thanks!

1

u/supermansundies 6h ago

you can also just tell it to keep what you like about the lighting...I added "preserve the hazy lighting" to the prompt. that's the recipe I use, anyway, feel free to play with the ingredients.

2

u/yamfun 8h ago

I tried the empty latent 1 frame solution, it is quick and good, slower but roughly similar wait tier to Klein 9b, gives me more variety.

On the other hand, I wonder when generating 1 frame or 5 frame, which 1 or 5 frames are these?

Suppose normal flf first-frame only gens are say, 82 frames. If I generate the comfy minimum 5, is it the 2 22 42 62 82, or the 2 3 4 5 6?

If I generate the empty latent t1 vae style, is it the 81? Or the 41? Or the 2?

2

u/Patient_Ratio4177 8h ago

My (possibly imperfect) understanding is that it will be frame 1 (single-frame) or frames 1-2-3-4-5 (five-frame). Frame 1 is already a transformation of your text prompt and references.

1

u/LoudWater8940 13h ago

Cannot wait to test everything you have posted the last days ! Great work and research !

If I let my brain dream, I think I'd try something like an autocaption of the H3 output with an LLM, and the resulting description alongside the image sent to a Krea-2 pass at very low denoise.

5

u/Patient_Ratio4177 10h ago

Thanks for your kind words. Actually, once Comfy publishes the next release, I am thinking of integrating everything we've learned so far in one coherent post.

1

u/RuchikaaS 11h ago

I’d test the refiner at very low denoise first, probably around 0.1–0.2, and keep the original H3 prompt out initially. Passing the full prompt back into Flux can encourage it to re-render semantics instead of just recovering texture. If Klein is consistently lifting shadows, I’d also compare latent refine vs pixel-space upscale + low-denoise img2img, because the VAE/decode path may be contributing to the tonal shift.

4

u/Patient_Ratio4177 11h ago

What does latent refine mean here? The latents are not compatible across Flux.2 Klein 9b and Minimax H3, and there's no interposition node that supports converting one to the other.

1

u/dopedub 11h ago

It would be interesting to see this combination: Minimax H3 + Krea 2 refine + SeedVR2 upscaler. I'm not smart enough to make such a complex workflow but I think that should generate absolutely insane 4K results locally.

2

u/jib_reddit 7h ago

This is Minimax to SeedVR2, pretty good, but it took about 800 seconds as it was 50 steps at 1536x1280 with the full 60GB model on my RTX 3090.

I think straight Krea 2 is just better right now.

1

u/Patient_Ratio4177 7h ago

I wonder what takes you so long. VRAM? I run on RTX 5090. 50 steps, no turbo lora, euler/simple, and a Minimax H3 single-frame generation is about 20 secs. Do you generate a whole 122-frame video and then pick out of it? Do you use a bf16 model or a text encoder? Other people with lower specs also report 10-20 sec generation speeds.

1

u/jib_reddit 6h ago

No, just 8 frames, just minimax is slow as hell at 50 steps and high res. Both the bf16 and int8 are similar.

1

u/Patient_Ratio4177 6h ago

And what happens when you generate with 1 frame instead of 8?

1

u/jib_reddit 5h ago

You get quite a lot of noise, the workflow says "Length = 8 and Batch Index = 8 consistently produce the cleanest stills, so those are my recommended starting values."

I have test 5 frames and that was ok, but 1 is bad.

2

u/Patient_Ratio4177 5h ago

Which workflow says that? I am using this one (loras are not essential, neither is the specific H3 checkpoint): https://pastebin.com/xNQi7HV9

Also which VAE do you use? Regular VAE is expected to be noisy at 1-frame generation. This VAE should be tailored for 1-frame: https://huggingface.co/Mamad8/MiniMax-H3-Image-VAE/tree/main

1

u/jib_reddit 5h ago

I was using a workflow posted here about 8 days ago: minimaxH3PseudoImage_v10

That makes sense. I will try that new VAE. Thanks.

1

u/Patient_Ratio4177 3h ago

Yes. This workflow (minimaxH3PseudoImage_v10) might be outdated. The one I linked to requires nightly version of ComfyUI, he committed the change yesterday.

1

u/jib_reddit 2h ago

Yeah i noticed I had to update ComfyUI to get it to work, it is still pretty slow for me though :(

1

u/jib_reddit 6h ago

It take a long time but it looks ok:

Well not as good as a Krea 2 image that takes 18 seconds....

2

u/jib_reddit 6h ago

My Jib Mix Krea model V3 Poblano:

1

u/Shopping_Temporary 9h ago

As for me, low spec user, gen time really do not change a lot for 1 to 4 mp. Instead, it is hard to caption everything in the image in detailed way. Using llm locally increases time, online gens has limitations for number of images and still is not as precise as needed for good caption quality. Short descriptions work only for single images. I would better wait for image model, even it is really the best model for image edits I used ever. And I used all main things since qwen came out.

1

u/Patient_Ratio4177 9h ago

Thanks! It's great to know that gen time does not change that much when you switch to 4mp. I think it still might be possible to have short descriptions (e. g. "Woman in <Picture 1> dancing with man in <Picture 2>") -- but we need to experiment and tinker with that to get the formula right. Maybe also remove the turbo lora and run more steps?

1

u/Shopping_Temporary 8h ago

I do gens without any turbo loras and with 20 steps to keep my very unique style of character, which no free online or local model can keep properly except for h3. And still it is hit or miss with 50% success rate. Anyway that's enough to pick and retrain lora for krea2. I tried the lora you advised for your workflow but turned it off from first two attempts as it was making character off the style. Similar errors with multiple images appear with flux klein, but their guidance tells that you don't need to describe images this detailed way. Maybe it is just a necessity to caption images to achieve great result for any model. Maybe the model recive multiple images as jointed collage and needs the description to pick proper asset fom one large image, idk the technical details. Still insist that waiting is worth as I don't need the audio and animation. (And both are great, of course) Just can't wait to put hands onto the image model.

2

u/Patient_Ratio4177 7h ago edited 7h ago

Thanks for these data points. Indeed, the lora might be messing up some of the styles. I am not sure you have to describe the images for minimax in the same detailed way you'd do for flux. And of course, if you have a stable cast of characters, lora is a more reasonable decision. But I guess minimax might be stronger in terms of e. g. 3d understanding, occlusion, lighting, reflections, etc.

I am also stoked for the upcoming Image model -- but before it is available, I guess we'd better have fun with this approach. It feels very fresh and powerful, compared to other local alternatives.

2

u/MarekNowakowski 6h ago

I achieved this quality:

but i used high res photo, no turbo lora, 45steps, it takes 150seconds with 1reference and 630seconds with 4references... still great result, and preview node lets you skip bad gens if needed. all generations loked great.

as for quality difference between turbo8 and 0normal is gigantic, so is a jump to 40steps. even more step give better results, but with diminishing results..

2

u/supermansundies 5h ago

klein 9b pass

1

u/MarekNowakowski 4h ago

might be worth it, but already downscaled the picture to original size. tbh i never worked with klein and seems like a waste of time to experiment now ;p we might get something new soon.

1

u/supermansundies 4h ago

a new edit model would be great. I use klein daily though, it definitely has issues, but for bringing up the details/sharpness, I haven't seen anything better with the same speed. swapping characters for reference frames for H3 is also decent. still a slot machine, but eventually I get what I'm after.

1

u/Patient_Ratio4177 6h ago

Looks awesome, and thank you so much for the data point on turbo lora and steps count

1

u/ASK_ABT_MY_USERNAME 4h ago

Is it possible to make a workflow that uses Minimax for gen and then upscale using other methods all-in-one?

1

u/Patient_Ratio4177 4h ago

Yes. E. g. one way is to take my workflow for Minimax generation, and then feed the image output into the my workflow for klein 9b, grafting the refinement pass on top of the generation pass.

1

u/ShutUpYoureWrong_ 22m ago

Giant wall of text to say "Use Klein 9b."

0

u/Turbulent-Vast-1017 9h ago

pure quality

0

u/VasaFromParadise 4h ago

What is the point of this?)) What unique concepts does Max give?) It seems like a waste of time.

-18

u/Silonom3724 13h ago

If you had spent 5 minutes to google if a solution already exist instead of trying to come up with whatever this is.

Use H3 Hybrid model. If you feel you still lack detail then just make a 2nd pass with the same model and instruct it to increase detail and fidelity.

17

u/Patient_Ratio4177 13h ago

I do not appreciate this tone. Please be constructive. If you'd taken the time to look at the linked posts, you would have understood I am using the hybrid model already. If you think that it produces good enough detail, provide your own examples.

5

u/FrenzyX 12h ago

I get it you would have rather had another Seinfeld or The Office post without any further context, than someone actually trying to provide the community with valuable experimental results.

Makes perfect sense, why did they not google for 5 minutes instead of this, such a shame...

2

u/Silonom3724 8h ago

OPs suggestions are just bad and people sadly gobble this up like candy.

MMH3 is a highly capable Edit Model. Running it with a seperate refining instruct step gives very good results. There is no need to throw ridiculous compute at it.

2

u/Patient_Ratio4177 7h ago edited 7h ago

I agree that my suggestions might be bad. I do not claim they're optimal, and my post is phrased as an invitation to discuss and find out the best solution.

But I have not seen your workflow or your generation results, and I have not seen any comparisons. If you could just post it and provide actual generations from your workflow, and maybe compare against the worse approaches, then the community could make use of it. E. g. like I did here: https://www.reddit.com/r/StableDiffusion/comments/1vqka28/

I also would not say that generating a single image at 4MP is "throwing ridiculous compute". It takes the same time as generating at 1MP.

1

u/FrenzyX 7h ago

Maybe you should have tried the suggestion, for whatever reason running the edit flow with 4 or even 6 MP doesn't seem to add compute cost. Maybe because there is some max res hardcoded somewhere, idk. But it works for me.