Inpainting Tutorial - Stable Diffusion

preview_player
Показать описание
I'll teach you what you need to know about Inpainting in this Stable diffusion tutorial. Learn how to fix any Stable diffusion generated image through inpainting details.

FREE Prompt styles here:

My workflow to Perfect Images

Control Lights in Stable Diffusion

LIVE Pose in Stable Diffusion

ControlNet tutorial and install guide

Ultimate Stable diffusion guide

The Rise of AI Art: A Creative Revolution

7 Secrets to writing with ChatGPT (Don't tell your boss!)

Ultimate Animation guide in Stable diffusion

Dreambooth tutorial for Stable diffusion

5 tricks you're not using

Avoid these 7 mistakes

How to ChatGPT. ChatGPT explained:

How to fix live render preview:
Рекомендации по теме
Комментарии
Автор

Hey Seb, just a little tip. Once you're done inpainting, you can put the final image into img2img with very low denoise to remove inpainting blurs, shadows, etc. for a smoother result.

zoybean
Автор

A much better solution when using "Masked Only" is to place a tiny dot of masking on or near content of the image that gives your masked region and prompt some context. What happen with Masked Only is that the image is cropped to fit just the masked part so many times it loses context to fit the new generation into. So if you want to in paint a hand, add a dot of mask further up the arm so it knows how it should be positioned or sized to match the rest of the arm. In your example adding a tiny dot of mask to the other coffee cup would have produced a better result. Simply because the cropping will include that contextual information. You have to leave in enough for the AI to work with.

bellsTheorem
Автор

I immediately scrolled to comments after coffee cup fiasko and I wasn't disappointed. This community is so great, you can learn so much, so fast.

nightai
Автор

The reason that the coffee cup doesn't fit well within the image is because the render box for the inpaint area is such a small part of the image - anything generated is done so only within the context of a) what is not denoised i.e. the original image and b) what SD can actually see (within the render box). For high denoising strength you generally want a larger render box, otherwise it's easy to lose context.
But what if you only want to change a small area? No problem! The render area is created as a bounding box that contains all the inpaint area you've selected - so, you can increase it by adding tiny dots of inpaint area to the scene. If you make them very small then whatever is behind it will generally be unchanged once rendered, so only the main area you've selected will be altered - but the dots will still count towards the bounding box. In the example given, I would put one dot above and to the left of the first coffee cup, and one at the bottom and to the right of the table. That way, what is rendered will probably adher more closely to both the focus (the blur on the coffee cup) and orientation and size of the table.

For lower denoising strength (0.5 or below I'd say) it will generally be able to glean the context from what remains of the original image, but for anything higher I get much better results with this method.

Antalion
Автор

The reason you were struggling with the coffee cup is because "full image" is not just to keep the inpaint part the same resolution, but it tells the inpaint engine to look at the entire picture when drawing. So, you will get a perfectly sized cup, and correct sunlight on the cup coming from the window, for example. But with "masked only", it only looks at the area of the cup, and that's why it won't fit the scene as well.

zvit
Автор

Thank you for the knowledge. BTW, Did you hear about the artist who took things too far? Guess he didn't know where to draw the line.

coda
Автор

I love you! In a week you have turned me from someone who had zero experience using AI tools to being a pro using stable diffusion. Thank you for all the amazing tutorials!

MariyamJayne
Автор

Thank you for these tutorials and sharing your process. They've been a huge help for me as a beginner to these tools.

MaHo-cm
Автор

Awesome tutorial. Understanding the difference for masked content "original" and "latent noise" helped me so much. As others had already mentioned, making the inpaint area bigger also helps. When i Inpaint Body parts like the upper torso, I often mask the start of arms and the neck as well, so that inpaint understands in which direction the body is moving.

AIKnowledgeGo
Автор

I am new at the whole impainting topic and this video helped me a lot to get an overview of the possibilities. Many thanks ❤

aliceleblanc
Автор

Hi, only got into Stable Diffusion a couple of weeks ago and hadn't had much luck with Inpainting, this tutorial made a lot of sense and got much better results with my first Inpaint after watching this. Thanks :)

runebinder
Автор

Alright I've subbed? joined? I dont know what the term is-
I'm giving myself 2 full time weeks to really pick up on stable diffusion and you're helping to launch me. Thank you.

jkzrsch
Автор

This was helpful Seb, thanks. Inpainting has always been a bit of a mystery.

ovalshrimp
Автор

This is a great tutorial, while I worked through the pain of learning this myself. I know this would have helped me hugely. Bonus, I did learn a bit more about the blur settings. Thank you very much.

Remowylliams
Автор

I'm all for self-deprecating humo(u)r, but in all seriousness, you are a very capable teacher. Thank you.

pizzaluvah
Автор

Cool, Thanks for the simple perfect Instructions 💪💪

BrettArt-Channel
Автор

Awesome stuff! I was wondering what all the different settings for inpainting were for. I've just started messing around with Stable Diffusion and watching your videos has definitely helped me to start figuring out what's possible. Thanks again!

alexkatzfey
Автор

I never imagined inpainting would be so simple, which is why I'm here. I was like nice I can draw black lines on stuff how does that help me? I genuinely thought you had to be fluent with digital painting for this. Thanks for the tutorial dude.

GamerSix
Автор

It's like ASMR for SD. Thank you!

Smudgie
Автор

I wish there was a tool for drawing, like, a heat map on an image, that allowed you to highlight areas where major changes are required and areas where minor changes would be better, in the context of the whole image. Inpainting with a mask is a great tool, but it will always fail to account for image context. There's basically no way to get SD to make a second cup like the first one, for example (short of exporting to Photoshop or something). There's a tool in DALL-E where you can choose different mask colors and assign each color to specific idea, and I feel like that would be really useful if you could also assign weights to those colors.

michaelleue