Views : 245,724
Genre: Education
Date of upload: Apr 6, 2023 ^^
Rating : 4.896 (161/6,039 LTDR)
RYD date created : 2024-05-15T16:22:56.67532Z
See in json
Top Comments of this video!! :3
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.
116 |
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.
148 |
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.
29 |
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.
2 |
1:09 - The scroll works by holding down Shift and scrolling the mouse wheel
1 |
@sebastiankamph
8 months ago
Early access to videos as a Patreon supporter www.patreon.com/sebastiankamph
1 |