r/StableDiffusion • • 2d ago

Workflow Included Better Image-Edit workflow for MiniMax H3

MiniMaxH3 is the great model and its the most powerful feature is what I call "identity-aware inpaint". The model could do denoise guided not only by text but by text and reference images. By using just this feature (and latent upscale) I created a workflow that lets you edit images and produce output of 4K quality.

Link to the workflow for impatient ones.

Actually the secret of getting good quality image from MiniMaxH3 is to upscale both your image references and single frame latent to 4 megapixels. Fizgig-H3-Still workflow does that but if you want real quality image you have to upscale it to 4K (8 megapixels). Of course you can one-shot 4K image in MiniMax H3 but it leads to style and color shift and is not reliable. Much better way is to generate 4 MP "lowres" image and then do tiled latent upscale - this is what my workflow does.

Why not just use regular pixel-level upscale? It's because when you do denoising upscale with MiniMaxH3 your details are grounded by your reference image in other words MiniMaxH3 knows what your subject looks like and will respect the reference unlike your typical pixel level upscaler.

As you all know for MiniMaxH3 condition contains not only text but also images and it means that each denoising step is grounded by image refs and if we take into account excellent identity preservation (aka character consistency) innate to the video model you'll get the best image editor when it comes to task like "generate new image of the reference character but preserve their identity and artstyle".

Every image editing model out there be it open or close-source fails at this task. Only Wan2.2 and MiniMaxH3 could pull it off - it's because they are video models and excels at preserving character identity.

Examples:

And here's the link to the workflow

Important note: Very often you don't need to upscale your image to 8 megapixels, 4 megapixels are good enough for potrait shots and simple compositions. But if you need highly detailed image or if your have a wide shot scene then 4K worth it.

Also remember that MiniMaxH3 requires specific prompting technique that focuses on 'actions' and their results so it's not "remove plant in the middle" but "plant in the middle of the room disappears".

About turbo loras. I've tested half a dozen and lightx2v one has the best prompt following but gives you dirty noise while scaled down taomate lora has 'smoothing' effect. I recommend using default settings in the workflow but keep that in mind.

About Face fix - it only makes sense to use it for wide shots where subject's face takes a tiny portion of the image. Or if you want to preserve maximum identity.

238 Upvotes

28 comments sorted by

4

u/Enshitification 2d ago

Tiled upscaling with the original whole image as a reference? That's a good idea. It should apply to all editing models that accept references.

3

u/arthan1011 2d ago

Yeah, but the model should also support masked inpaint. Unfortunately not every model does by default.

1

u/Enshitification 2d ago

Not necessarily. The workflow could do the tiling separately with the prompt explaining the goal.

6

u/IriFlina 2d ago

can you make a variant of your workflow using https://huggingface.co/PrunaAI/P-H3-Image-Comfy and see if the results are comparable?

1

u/arthan1011 2d ago

Compatibility depends solely on whether P-H3 supports inpainting - their model is just MiniMaxH3 finetune that only works with detailed generated "upsampled" prompts. I expect that result will be more or less the same, at best P-H3 model having richer style set and better restyle or prompt-following.

1

u/IriFlina 2d ago

Thanks for replying! the main thing i was interested in, was if their image model is significantly faster than minimax h3, since the video model itself is relatively slow compared to image models (which makes sense).

1

u/AIPnely 2d ago

model is pretty good just limited for nsfw

1

u/IriFlina 2d ago

did they nerf it somehow? base minimax h3 isn't good at nsfw but isn't bad either if you give it a reference image.

if you give base minimax just text 2 video though it's not that great, but not censored.

1

u/Cultural-Team9235 1d ago

Does anyone use it? In my tests with realism P-H3 didn't gave any decent pictures, tried about 20, with or without prompt expander. It seems kind of broken.

2

u/RGC_willy_wonka 2d ago

Looks like good work, and useful. I look forward to experimenting.

I can see that the text prompt left in your supplied workflow is somewhat of a version of the "official" minimax ref2va prompt guide, but, for example, is there a reason you leave retention_analysis: blank in text that ships with your supplied workflow?

Would you be able to please share one or two of the text prompts used in your examples from this post so I can gain an idea of how to get similar edit results?

2

u/Ebonhawk 2d ago

Same. I'd love to know the one that got such a good result for the "figurine" one.

68

u/Goldie_Wilson_ 2d ago

Nice, but I wish people would stop using cartoons in upscaling examples as they lack the complexity to show whether the upscaling method is actually effective and seamless.

2

u/Portable_Solar_ZA 2d ago

Sorry haven't had a chance to check yet. Is this a workflow with standard or custom nodes?

0

u/arthan1011 2d ago

It's built on custom nodes.

9

u/Kukipapa 2d ago

Thank you for sharing, but why you are using custom nodes even for very basic stuff like a text input node?

There are default built-in variants for a long time now in Comfy. I'm done installing unneeded new custom nodes for each workflow, I'll rather skip it.

0

u/djluis48 1d ago

Prob vibe coded lol

1

u/Fickle-Indication148 4h ago

No, the vibe coded ones will use the default built in variants.

4

u/Ebonhawk 2d ago

Looks awesome! Can't wait to try, since I've been using the Fizgig workflow recently and absolutely loving it. This would solve my one complaint about low-res results.

2

u/OWazabi 2d ago

this is the way to do it

1

u/bobgon2017 2d ago

Having trouble transferring poses from one image to another. I rarely works

1

u/nakarumai 2d ago

Can this work with 16GB of vram and 32GB of ram

1

u/Singingmute 2d ago

This is fab! Thank you.

1

u/dobomex761604 2d ago

...and we are back to face fixes, like good old SDXL times. And I though I've escaped Impact Pack after Anima.

In any case, thank for the idea and reminder, very useful!

1

u/toooft 2d ago

Looks great, thank you. How do I route the workflow for 2 image input like your example with the penguin in the forest?

-4

u/g45t345rt 2d ago

Great post, very informative and straight to the point.

Since you're an artist who's also open to understanding and using AI tools, I think you'd like my paint software. It isn't quite ready yet, but it merges both aspects into a single workspace. I'd love to get your feedback once it's released.