mirror of
https://github.com/easydiffusion/easydiffusion.git
synced 2025-06-21 18:31:28 +02:00
Created Inpainting (markdown)
parent
92210dd819
commit
6ba1aeda43
79
Inpainting.md
Normal file
79
Inpainting.md
Normal file
@ -0,0 +1,79 @@
|
|||||||
|
**Inpainting** is a stable diffusion mode, in which stable diffusion only changes a part of the initial image, while keeping other parts of the
|
||||||
|
initial image intact. To use inpainting, first select an initial image using the "Choose file" button (①), then put a checkmark into the In-Painting checkbox (②):
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The In-Painting tool gets activated by this and can be used to select the area which the AI will paint into:
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
The first two buttons activate the brush or the rubber. Using the brush, you mark areas. Using the rubber, you can un-mark areas again. Marked areas
|
||||||
|
get desaturated.
|
||||||
|
|
||||||
|
The slider can be used to change the size of the brush.
|
||||||
|
|
||||||
|
The next two buttons can be used to undo or redo your last actions.
|
||||||
|
|
||||||
|
The last button clears the marked area.
|
||||||
|
|
||||||
|
Inpainting works together with the prompt. In the prompt, describe the image that you want to get. In general, it helps to also describe the
|
||||||
|
part of the picture that the AI shall not change.
|
||||||
|
|
||||||
|
## Examples
|
||||||
|
|
||||||
|
The following example used the prompt `Black woman in front of the niagara falls`, a guidance of 7.5, a prompt strength of 0.8 and 45 steps:
|
||||||
|
|
||||||
|
<table><tr><td>
|
||||||
|
|
||||||
|
**Initial image**
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
</td><td>
|
||||||
|
|
||||||
|
**Mask**
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
</td><td>
|
||||||
|
|
||||||
|
**Result**
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
</td></tr></table>
|
||||||
|
|
||||||
|
You can notice how the initial image impacted the result image: green and brown areas of the initial image result in green and brown areas of the result image. It's usually hard to get e.g. a blue sky if there's nothing blue in the initial image. To guide the AI, paint some sky into the initial image
|
||||||
|
using a painting software:
|
||||||
|
|
||||||
|
<table><tr><td>
|
||||||
|
|
||||||
|
**Initial image**
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
</td><td>
|
||||||
|
|
||||||
|
**Mask**
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
</td><td>
|
||||||
|
|
||||||
|
**Result**
|
||||||
|
|
||||||
|

|
||||||
|
|
||||||
|
</td></tr></table>
|
||||||
|
|
||||||
|
## Tips
|
||||||
|
* Larger areas work better than smaller areas.
|
||||||
|
* The initial image impacts the result. If you can't get good results, try to sketch the desired results using a simple paint program.
|
||||||
|
* The unmasked area will be slightly changed by the inpainting process. This is a known bug and shall be fixed in upcoming versions.
|
||||||
|
Compare the camera lens in the above examples:
|
||||||
|
|
||||||
|

|
||||||
|

|
||||||
|
|
||||||
|
To repair these distortions, open the initial and result images as two layers in a photo editor and create a mask to select the initial image
|
||||||
|
where it should be kept intact.
|
Loading…
x
Reference in New Issue
Block a user