2022-09-15 14:53:41 +00:00
|
|
|
---
|
|
|
|
title: Inpainting
|
|
|
|
---
|
|
|
|
|
2022-09-18 19:30:18 +00:00
|
|
|
# :octicons-paintbrush-16: Inpainting
|
|
|
|
|
2022-09-15 14:53:41 +00:00
|
|
|
## **Creating Transparent Regions for Inpainting**
|
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
Inpainting is really cool. To do it, you start with an initial image and use a
|
|
|
|
photoeditor to make one or more regions transparent (i.e. they have a "hole" in
|
|
|
|
them). You then provide the path to this image at the dream> command line using
|
|
|
|
the `-I` switch. Stable Diffusion will only paint within the transparent region.
|
|
|
|
|
|
|
|
There's a catch. In the current implementation, you have to prepare the initial
|
|
|
|
image correctly so that the underlying colors are preserved under the
|
|
|
|
transparent area. Many imaging editing applications will by default erase the
|
|
|
|
color information under the transparent pixels and replace them with white or
|
|
|
|
black, which will lead to suboptimal inpainting. It often helps to apply
|
|
|
|
incomplete transparency, such as any value between 1 and 99%
|
|
|
|
|
|
|
|
You also must take care to export the PNG file in such a way that the color
|
|
|
|
information is preserved. There is often an option in the export dialog that
|
|
|
|
lets you specify this.
|
|
|
|
|
|
|
|
If your photoeditor is erasing the underlying color information, `dream.py` will
|
|
|
|
give you a big fat warning. If you can't find a way to coax your photoeditor to
|
|
|
|
retain color values under transparent areas, then you can combine the `-I` and
|
|
|
|
`-M` switches to provide both the original unedited image and the masked
|
|
|
|
(partially transparent) image:
|
2022-09-15 14:53:41 +00:00
|
|
|
|
|
|
|
```bash
|
2022-10-08 13:32:06 +00:00
|
|
|
invoke> "man with cat on shoulder" -I./images/man.png -M./images/man-transparent.png
|
2022-09-11 15:52:43 +00:00
|
|
|
```
|
|
|
|
|
2022-10-17 03:30:24 +00:00
|
|
|
## **Masking using Text**
|
2022-09-11 15:52:43 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
You can also create a mask using a text prompt to select the part of the image
|
|
|
|
you want to alter, using the [clipseg](https://github.com/timojl/clipseg)
|
|
|
|
algorithm. This works on any image, not just ones generated by InvokeAI.
|
2022-10-17 03:30:24 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
The `--text_mask` (short form `-tm`) option takes two arguments. The first
|
|
|
|
argument is a text description of the part of the image you wish to mask (paint
|
|
|
|
over). If the text description contains a space, you must surround it with
|
|
|
|
quotation marks. The optional second argument is the minimum threshold for the
|
|
|
|
mask classifier's confidence score, described in more detail below.
|
2022-10-17 03:30:24 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
To see how this works in practice, here's an image of a still life painting that
|
|
|
|
I got off the web.
|
2022-10-17 03:30:24 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
<figure markdown>
|
|
|
|
![still life scaled](../assets/still-life-scaled.jpg)
|
|
|
|
</figure>
|
2022-10-17 03:30:24 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
You can selectively mask out the orange and replace it with a baseball in this
|
|
|
|
way:
|
2022-10-17 03:30:24 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
```bash
|
2022-10-17 03:30:24 +00:00
|
|
|
invoke> a baseball -I /path/to/still_life.png -tm orange
|
2022-11-04 19:17:28 +00:00
|
|
|
```
|
2022-10-17 03:30:24 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
<figure markdown>
|
|
|
|
![](../assets/still-life-inpainted.png)
|
|
|
|
</figure>
|
2022-10-17 03:30:24 +00:00
|
|
|
|
|
|
|
The clipseg classifier produces a confidence score for each region it
|
2022-11-04 19:17:28 +00:00
|
|
|
identifies. Generally regions that score above 0.5 are reliable, but if you are
|
|
|
|
getting too much or too little masking you can adjust the threshold down (to get
|
|
|
|
more mask), or up (to get less). In this example, by passing `-tm` a higher
|
|
|
|
value, we are insisting on a tigher mask. However, if you make it too high, the
|
|
|
|
orange may not be picked up at all!
|
|
|
|
|
|
|
|
```bash
|
2022-10-17 03:30:24 +00:00
|
|
|
invoke> a baseball -I /path/to/breakfast.png -tm orange 0.6
|
2022-11-04 19:17:28 +00:00
|
|
|
```
|
2022-10-17 03:30:24 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
The `!mask` command may be useful for debugging problems with the text2mask
|
|
|
|
feature. The syntax is `!mask /path/to/image.png -tm <text> <threshold>`
|
2022-10-20 06:33:07 +00:00
|
|
|
|
|
|
|
It will generate three files:
|
|
|
|
|
|
|
|
- The image with the selected area highlighted.
|
2022-10-22 17:53:23 +00:00
|
|
|
- it will be named XXXXX.<imagename>.<prompt>.selected.png
|
2022-10-20 06:33:07 +00:00
|
|
|
- The image with the un-selected area highlighted.
|
2022-10-22 17:53:23 +00:00
|
|
|
- it will be named XXXXX.<imagename>.<prompt>.deselected.png
|
2022-11-04 19:17:28 +00:00
|
|
|
- The image with the selected area converted into a black and white image
|
|
|
|
according to the threshold level
|
2022-10-22 17:53:23 +00:00
|
|
|
- it will be named XXXXX.<imagename>.<prompt>.masked.png
|
2022-10-20 06:33:07 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
The `.masked.png` file can then be directly passed to the `invoke>` prompt in
|
|
|
|
the CLI via the `-M` argument. Do not attempt this with the `selected.png` or
|
|
|
|
`deselected.png` files, as they contain some transparency throughout the image
|
|
|
|
and will not produce the desired results.
|
2022-10-20 06:33:07 +00:00
|
|
|
|
|
|
|
Here is an example of how `!mask` works:
|
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
```bash
|
2022-10-20 06:33:07 +00:00
|
|
|
invoke> !mask ./test-pictures/curly.png -tm hair 0.5
|
|
|
|
>> generating masks from ./test-pictures/curly.png
|
|
|
|
>> Initializing clipseg model for text to mask inference
|
|
|
|
Outputs:
|
|
|
|
[941.1] outputs/img-samples/000019.curly.hair.deselected.png: !mask ./test-pictures/curly.png -tm hair 0.5
|
|
|
|
[941.2] outputs/img-samples/000019.curly.hair.selected.png: !mask ./test-pictures/curly.png -tm hair 0.5
|
|
|
|
[941.3] outputs/img-samples/000019.curly.hair.masked.png: !mask ./test-pictures/curly.png -tm hair 0.5
|
|
|
|
```
|
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
<figure markdown>
|
|
|
|
![curly](../assets/outpainting/curly.png)
|
|
|
|
<figcaption>Original image "curly.png"</figcaption>
|
|
|
|
</figure>
|
2022-10-20 06:33:07 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
<figure markdown>
|
|
|
|
![curly hair selected](../assets/inpainting/000019.curly.hair.selected.png)
|
|
|
|
<figcaption>000019.curly.hair.selected.png</figcaption>
|
|
|
|
</figure>
|
2022-10-20 06:33:07 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
<figure markdown>
|
|
|
|
![curly hair deselected](../assets/inpainting/000019.curly.hair.deselected.png)
|
|
|
|
<figcaption>000019.curly.hair.deselected.png</figcaption>
|
|
|
|
</figure>
|
2022-10-20 06:33:07 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
<figure markdown>
|
|
|
|
![curly hair masked](../assets/inpainting/000019.curly.hair.masked.png)
|
|
|
|
<figcaption>000019.curly.hair.masked.png</figcaption>
|
|
|
|
</figure>
|
2022-10-20 06:33:07 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
It looks like we selected the hair pretty well at the 0.5 threshold (which is
|
|
|
|
the default, so we didn't actually have to specify it), so let's have some fun:
|
2022-10-20 06:33:07 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
```bash
|
2022-10-22 17:53:23 +00:00
|
|
|
invoke> medusa with cobras -I ./test-pictures/curly.png -M 000019.curly.hair.masked.png -C20
|
2022-10-20 06:33:07 +00:00
|
|
|
>> loaded input image of size 512x512 from ./test-pictures/curly.png
|
|
|
|
...
|
|
|
|
Outputs:
|
|
|
|
[946] outputs/img-samples/000024.801380492.png: "medusa with cobras" -s 50 -S 801380492 -W 512 -H 512 -C 20.0 -I ./test-pictures/curly.png -A k_lms -f 0.75
|
|
|
|
```
|
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
<figure markdown>
|
|
|
|
![](../assets/inpainting/000024.801380492.png)
|
|
|
|
</figure>
|
2022-09-11 15:52:43 +00:00
|
|
|
|
2022-10-22 17:53:23 +00:00
|
|
|
You can also skip the `!mask` creation step and just select the masked
|
|
|
|
|
|
|
|
region directly:
|
2022-11-04 19:17:28 +00:00
|
|
|
|
|
|
|
```bash
|
2022-10-22 17:53:23 +00:00
|
|
|
invoke> medusa with cobras -I ./test-pictures/curly.png -tm hair -C20
|
|
|
|
```
|
|
|
|
|
2022-10-27 22:42:51 +00:00
|
|
|
## Using the RunwayML inpainting model
|
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
The
|
|
|
|
[RunwayML Inpainting Model v1.5](https://huggingface.co/runwayml/stable-diffusion-inpainting)
|
|
|
|
is a specialized version of
|
|
|
|
[Stable Diffusion v1.5](https://huggingface.co/spaces/runwayml/stable-diffusion-v1-5)
|
|
|
|
that contains extra channels specifically designed to enhance inpainting and
|
|
|
|
outpainting. While it can do regular `txt2img` and `img2img`, it really shines
|
|
|
|
when filling in missing regions. It has an almost uncanny ability to blend the
|
|
|
|
new regions with existing ones in a semantically coherent way.
|
2022-10-27 22:42:51 +00:00
|
|
|
|
|
|
|
To install the inpainting model, follow the
|
2022-12-15 20:42:49 +00:00
|
|
|
[instructions](../installation/050_INSTALLING_MODELS.md) for installing a new model.
|
2022-11-04 19:17:28 +00:00
|
|
|
You may use either the CLI (`invoke.py` script) or directly edit the
|
|
|
|
`configs/models.yaml` configuration file to do this. The main thing to watch out
|
|
|
|
for is that the the model `config` option must be set up to use
|
|
|
|
`v1-inpainting-inference.yaml` rather than the `v1-inference.yaml` file that is
|
|
|
|
used by Stable Diffusion 1.4 and 1.5.
|
|
|
|
|
|
|
|
After installation, your `models.yaml` should contain an entry that looks like
|
|
|
|
this one:
|
|
|
|
|
2023-03-11 01:08:59 +00:00
|
|
|
```yml
|
|
|
|
inpainting-1.5:
|
|
|
|
weights: models/ldm/stable-diffusion-v1/sd-v1-5-inpainting.ckpt
|
|
|
|
description: SD inpainting v1.5
|
|
|
|
config: configs/stable-diffusion/v1-inpainting-inference.yaml
|
|
|
|
vae: models/ldm/stable-diffusion-v1/vae-ft-mse-840000-ema-pruned.ckpt
|
|
|
|
width: 512
|
|
|
|
height: 512
|
|
|
|
```
|
2022-11-04 19:17:28 +00:00
|
|
|
|
|
|
|
As shown in the example, you may include a VAE fine-tuning weights file as well.
|
|
|
|
This is strongly recommended.
|
|
|
|
|
|
|
|
To use the custom inpainting model, launch `invoke.py` with the argument
|
|
|
|
`--model inpainting-1.5` or alternatively from within the script use the
|
|
|
|
`!switch inpainting-1.5` command to load and switch to the inpainting model.
|
|
|
|
|
|
|
|
You can now do inpainting and outpainting exactly as described above, but there
|
|
|
|
will (likely) be a noticeable improvement in coherence. Txt2img and Img2img will
|
|
|
|
work as well.
|
2022-10-27 22:42:51 +00:00
|
|
|
|
|
|
|
There are a few caveats to be aware of:
|
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
1. The inpainting model is larger than the standard model, and will use nearly 4
|
|
|
|
GB of GPU VRAM. This makes it unlikely to run on a 4 GB graphics card.
|
2022-10-27 22:42:51 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
2. When operating in Img2img mode, the inpainting model is much less steerable
|
|
|
|
than the standard model. It is great for making small changes, such as
|
|
|
|
changing the pattern of a fabric, or slightly changing a subject's expression
|
|
|
|
or hair, but the model will resist making the dramatic alterations that the
|
|
|
|
standard model lets you do.
|
2022-10-27 22:42:51 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
3. While the `--hires` option works fine with the inpainting model, some special
|
|
|
|
features, such as `--embiggen` are disabled.
|
2022-10-27 22:42:51 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
4. Prompt weighting (`banana++ sushi`) and merging work well with the inpainting
|
|
|
|
model, but prompt swapping
|
|
|
|
(`a ("fluffy cat").swap("smiling dog") eating a hotdog`) will not have any
|
|
|
|
effect due to the way the model is set up. You may use text masking (with
|
|
|
|
`-tm thing-to-mask`) as an effective replacement.
|
2022-10-27 22:42:51 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
5. The model tends to oversharpen image if you use high step or CFG values. If
|
|
|
|
you need to do large steps, use the standard model.
|
2022-10-27 22:42:51 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
6. The `--strength` (`-f`) option has no effect on the inpainting model due to
|
|
|
|
its fundamental differences with the standard model. It will always take the
|
|
|
|
full number of steps you specify.
|
2022-10-27 22:02:08 +00:00
|
|
|
|
|
|
|
## Troubleshooting
|
|
|
|
|
|
|
|
Here are some troubleshooting tips for inpainting and outpainting.
|
|
|
|
|
|
|
|
## Inpainting is not changing the masked region enough!
|
2022-10-02 20:37:36 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
One of the things to understand about how inpainting works is that it is
|
|
|
|
equivalent to running img2img on just the masked (transparent) area. img2img
|
|
|
|
builds on top of the existing image data, and therefore will attempt to preserve
|
|
|
|
colors, shapes and textures to the best of its ability. Unfortunately this means
|
|
|
|
that if you want to make a dramatic change in the inpainted region, for example
|
|
|
|
replacing a red wall with a blue one, the algorithm will fight you.
|
|
|
|
|
|
|
|
You have a couple of options. The first is to increase the values of the
|
|
|
|
requested steps (`-sXXX`), strength (`-f0.XX`), and/or condition-free guidance
|
|
|
|
(`-CXX.X`). If this is not working for you, a more extreme step is to provide
|
|
|
|
the `--inpaint_replace 0.X` (`-r0.X`) option. This value ranges from 0.0 to 1.0.
|
|
|
|
The higher it is the less attention the algorithm will pay to the data
|
|
|
|
underneath the masked region. At high values this will enable you to replace
|
|
|
|
colored regions entirely, but beware that the masked region mayl not blend in
|
|
|
|
with the surrounding unmasked regions as well.
|
2022-10-02 20:37:36 +00:00
|
|
|
|
2022-09-19 10:34:34 +00:00
|
|
|
---
|
|
|
|
|
2022-09-11 15:52:43 +00:00
|
|
|
## Recipe for GIMP
|
|
|
|
|
|
|
|
[GIMP](https://www.gimp.org/) is a popular Linux photoediting tool.
|
|
|
|
|
|
|
|
1. Open image in GIMP.
|
|
|
|
2. Layer->Transparency->Add Alpha Channel
|
2022-10-16 12:25:57 +00:00
|
|
|
3. Use lasso tool to select region to mask
|
2022-09-11 15:52:43 +00:00
|
|
|
4. Choose Select -> Float to create a floating selection
|
2022-10-01 16:17:46 +00:00
|
|
|
5. Open the Layers toolbar (^L) and select "Floating Selection"
|
|
|
|
6. Set opacity to a value between 0% and 99%
|
2022-09-11 15:52:43 +00:00
|
|
|
7. Export as PNG
|
2022-11-04 19:17:28 +00:00
|
|
|
8. In the export dialogue, Make sure the "Save colour values from transparent
|
|
|
|
pixels" checkbox is selected.
|
2022-09-19 01:30:21 +00:00
|
|
|
|
mkdocs fixes, PR #1032
Squashed commit of the following:
commit 2c1e0168bb03a2cd625f2d4aca40eee0fdf7e4af
Merge: 2325c6c 31f2733
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date: Tue Oct 11 08:33:18 2022 -0400
Merge branch 'mkdocs-fixes' of https://github.com/mauwii/stable-diffusion into mauwii-mkdocs-fixes
commit 31f2733e898a9885afbb9c1e2b023cd08193767a
Merge: d9d6d3a a61a690
Author: Lincoln Stein <lincoln.stein@gmail.com>
Date: Tue Oct 11 08:05:52 2022 -0400
Merge branch 'main' into mkdocs-fixes
commit d9d6d3af3f0423e196ff7245a7c7d408bdab0fdd
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 08:13:04 2022 +0200
some more minor, overseen fixes to IMG2IMG
commit 4ab5a2aebac65f9f59f35f0ae10ece1741bb70d8
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 07:49:11 2022 +0200
add 4gotten alt-text to images
commit f778bd9c0f751699c215f2035c189b95647ddc83
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 07:18:11 2022 +0200
update OTHER.md
- fix codeblocks, add admonitions, embed graphic
commit a19f148a8eff910ff1c565bd24863a53dcad68e2
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 06:51:29 2022 +0200
update IMG2IMG.md
commit c1f1dfa714c9f93a1ff34f9773e438db5f88c83c
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 06:10:25 2022 +0200
update EMBIGGEN.md
- fix codeblocks
- fix toc
- use admonitions
commit 791e6c63ef29934c5b2692794a3825ef129fad0c
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 05:58:53 2022 +0200
better admonitions for CLI.md
commit e078025f002dc50d4942524e18e6cf44989c2bab
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 05:50:32 2022 +0200
huge update to CLI.md
way too many updates to list them all, including:
- render keys for keyboard-shortcuts
- quote commands and "unhide" parameter-values (like `<int>`, `<string>`
- fix codeblocks
- quote commands
- quote filenames
- use admonitions
- ....
commit bd98dd2307a461c15291e44f3bfb224a1aeb5819
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 04:49:57 2022 +0200
fix INPAINTING.md
- fix numbered List
- replace text key combos with actual rendered keyboard keys
commit 53920003352b6eaa867b2234594dfa504426323b
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 04:30:11 2022 +0200
fix nubered list and codeblocks in INSTALL_WINDOWS
commit ffe9276f1e59b97fa786e92d457a2f37126bb4ef
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 04:12:56 2022 +0200
fix numbered list in INSTALL_LINUX.md
also fix blank lines, codeblocks and admonition
commit 2c6a6a567f219248c60106de641764a855b54c84
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 03:51:03 2022 +0200
upgrade INSTALL_MAC.md:
- use annotations and content-tabs
yes, this looks ugly in repo afterwards, but plz also look at mkdocs:
https://mauwii.github.io/stable-diffusion/installation/INSTALL_MAC/
commit 8f6c54448044f7156612f5949177607aca253441
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 01:43:11 2022 +0200
comment out PR part in mkdocs-flow.yml
commit b52c14a67ffadd972f0da04fe3b66fa2300449e5
Merge: 97ebe58 a1b0b91
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 01:17:28 2022 +0200
Merge branch 'mkdocs-fixes' of github.com:mauwii/stable-diffusion into mkdocs-fixes
commit a1b0b91bb3d24cfc68304b717c3c6b2344d4ee4e
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:59:44 2022 +0200
fix conda env in codeblock
commit 5f9f9a266e070a84787667cd3fb18a87ad976c32
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:43:46 2022 +0200
fix 4gotten title in TEXTUAL_INVERSION
commit 8f025b034ec0b8c637d1b57a07b8e187b01b158e
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:41:52 2022 +0200
quote repo_url and repo_name
otherwise the version/stars/forks did not appear
commit 3a52b7deb340ba7d92601f8369f2a35d486cab88
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:39:54 2022 +0200
fix TEXTUAL_INVERSION headline to fit the others
commit 389b21f966cba769de548e30983cd55860e54bc4
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:35:48 2022 +0200
fix SAMPLER_CONVERGENCE and add emoji
commit f26fc79a18ef17a03569dfe5ccb5987d7f346764
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:32:04 2022 +0200
fix INSTALL_DOCKER.md:
- fix title (Docker instead of "Before you begin")
- add headline with Emoji
- fix headlines to render toc correct
commit cbc352048901447e3be4ac6a9dc8c78cbf74cb38
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:24:58 2022 +0200
add headline with emoji to INSTALL_MAC.md
commit 25f0614d66c7dcdb60aa1c6fccc32c831d348d69
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:21:01 2022 +0200
add log emoji to docs/CHANGELOG.md
commit 42005688fa3ad59af04c2a4ed198a943fa53f6b5
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:20:47 2022 +0200
use better fitting Icon for new Name
commit 0c65bad7f52152a5e264bf2b8509925350350e92
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:09:07 2022 +0200
add Headline with Emoji to WEB and POSTPROCESS
commit 1c1cf2692ea8ec4fbbc9a3c910ef8e285d149201
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 23:56:16 2022 +0200
update index.md:
- remove unused template reference
- make headline rendered bold and underlined, add (kind of) subtitle
- update discord badge and link
- update Quick links to look like in GH-Readme
- also remove self reference to docs
- add screenshot as in GH-Readme
- add note pointing to issues tab
- update path in command line to reflect new Repo Name
commit 0e29b0737edd1ef3d22dc808297174100c6de3c2
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 23:23:10 2022 +0200
chng site_name to `Stable Diffusion Toolkit Docs`
commit ad8a60d9927be9b4f1e056116cb9f38c30b840d6
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 23:00:02 2022 +0200
fix repo_url in mkdocs.yml
commit 234569d6b6cfd2d9775a2d5d8f8b951f3d8f5ff4
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 22:54:39 2022 +0200
fix link to upscaling in WEB.md and TOC
- TOC fixed by adding `#` to every headline after `## Parting remarks`
- add missing blank lines
commit 97c84ad82433b4b07b4c1908656763be8eb28b5b
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 22:25:32 2022 +0200
fix broken links in docs/CHANGELOG.md
commit bce62b3a32a839fa07b41b11cadd04dff2d9f7dd
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 22:15:37 2022 +0200
add title to CHANGELOG.md to render TOC wo. `**`
alternatively remove `**` around headline
commit 97ebe58b5bcfe4706386d79f26953b665c5c3251
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:59:44 2022 +0200
fix conda env in codeblock
commit 87ac217e43bf2a0293c1aa8b1894281d1b298084
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:43:46 2022 +0200
fix 4gotten title in TEXTUAL_INVERSION
commit 91439e8a52a918d9590830592f4f114bb44b47f0
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:41:52 2022 +0200
quote repo_url and repo_name
otherwise the version/stars/forks did not appear
commit 8a632a9e8fad884b99f54df8e0dc983552ce48eb
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:39:54 2022 +0200
fix TEXTUAL_INVERSION headline to fit the others
commit 7c8ffe2febd84faba1f7be0456d39ad9569239dc
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:35:48 2022 +0200
fix SAMPLER_CONVERGENCE and add emoji
commit e2e86d2d11b641c7f0dd713e2074083df2b902bc
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:32:04 2022 +0200
fix INSTALL_DOCKER.md:
- fix title (Docker instead of "Before you begin")
- add headline with Emoji
- fix headlines to render toc correct
commit 8b54c083fec0b05c965db40f9f2634662b26acd3
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:24:58 2022 +0200
add headline with emoji to INSTALL_MAC.md
commit 8d8a03243470281c3098cd77a8183ec62506d820
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:21:01 2022 +0200
add log emoji to docs/CHANGELOG.md
commit 76519f6fa475c9507e2deb037c7c27f08d96c14f
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:20:47 2022 +0200
use better fitting Icon for new Name
commit aff0725533324db359ad801bbc74d2478caae853
Author: mauwii <Mauwii@outlook.de>
Date: Tue Oct 11 00:09:07 2022 +0200
add Headline with Emoji to WEB and POSTPROCESS
commit 0f7898cbdd13cd48ee88eae6349adbc0bde344ce
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 23:56:16 2022 +0200
update index.md:
- remove unused template reference
- make headline rendered bold and underlined, add (kind of) subtitle
- update discord badge and link
- update Quick links to look like in GH-Readme
- also remove self reference to docs
- add screenshot as in GH-Readme
- add note pointing to issues tab
- update path in command line to reflect new Repo Name
commit f4c04eadf83e29f28a9919b78cc3583465bd1939
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 23:23:10 2022 +0200
chng site_name to `Stable Diffusion Toolkit Docs`
commit 6e624827c02af2c5f3ac2c64e137355fd6dcab1e
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 23:00:02 2022 +0200
fix repo_url in mkdocs.yml
commit 158848dd7edcea2a41a90c457faf00f0247784d2
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 22:54:39 2022 +0200
fix link to upscaling in WEB.md and TOC
- TOC fixed by adding `#` to every headline after `## Parting remarks`
- add missing blank lines
commit 533736e135a62dabc2dc937f6b81c5929d245b12
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 22:29:46 2022 +0200
fix link to truncation_comparison.jpg in OTHER.md
commit dd335142df32410590e03917a6f0b4a6879bbbdb
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 22:25:32 2022 +0200
fix broken links in docs/CHANGELOG.md
commit 374dd54f30e946cf856d59ebe530d819dd34b822
Author: mauwii <Mauwii@outlook.de>
Date: Mon Oct 10 22:15:37 2022 +0200
add title to CHANGELOG.md to render TOC wo. `**`
alternatively remove `**` around headline
2022-10-11 12:35:21 +00:00
|
|
|
---
|
2022-09-19 01:30:21 +00:00
|
|
|
|
|
|
|
## Recipe for Adobe Photoshop
|
|
|
|
|
2022-09-20 04:29:02 +00:00
|
|
|
1. Open image in Photoshop
|
2022-09-19 10:34:34 +00:00
|
|
|
|
2022-10-17 22:40:54 +00:00
|
|
|
<figure markdown>
|
|
|
|
![step1](../assets/step1.png)
|
|
|
|
</figure>
|
2022-09-19 10:34:34 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
2. Use any of the selection tools (Marquee, Lasso, or Wand) to select the area
|
|
|
|
you desire to inpaint.
|
2022-09-19 10:34:34 +00:00
|
|
|
|
2022-10-17 22:40:54 +00:00
|
|
|
<figure markdown>
|
2022-10-16 16:07:21 +00:00
|
|
|
![step2](../assets/step2.png)
|
2022-10-17 22:40:54 +00:00
|
|
|
</figure>
|
2022-09-19 10:34:34 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
3. Because we'll be applying a mask over the area we want to preserve, you
|
|
|
|
should now select the inverse by using the ++shift+ctrl+i++ shortcut, or
|
|
|
|
right clicking and using the "Select Inverse" option.
|
2022-09-19 10:34:34 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
4. You'll now create a mask by selecting the image layer, and Masking the
|
|
|
|
selection. Make sure that you don't delete any of the underlying image, or
|
|
|
|
your inpainting results will be dramatically impacted.
|
2022-09-19 10:34:34 +00:00
|
|
|
|
2022-10-17 22:40:54 +00:00
|
|
|
<figure markdown>
|
2022-10-16 16:07:21 +00:00
|
|
|
![step4](../assets/step4.png)
|
2022-10-17 22:40:54 +00:00
|
|
|
</figure>
|
2022-09-19 01:30:21 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
5. Make sure to hide any background layers that are present. You should see the
|
|
|
|
mask applied to your image layer, and the image on your canvas should display
|
|
|
|
the checkered background.
|
2022-09-19 01:30:21 +00:00
|
|
|
|
2022-10-17 22:40:54 +00:00
|
|
|
<figure markdown>
|
2022-10-16 16:07:21 +00:00
|
|
|
![step5](../assets/step5.png)
|
2022-10-17 22:40:54 +00:00
|
|
|
</figure>
|
2022-09-19 10:34:34 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
6. Save the image as a transparent PNG by using `File`-->`Save a Copy` from the
|
|
|
|
menu bar, or by using the keyboard shortcut ++alt+ctrl+s++
|
2022-09-19 10:34:34 +00:00
|
|
|
|
2022-10-17 22:40:54 +00:00
|
|
|
<figure markdown>
|
2022-10-16 16:07:21 +00:00
|
|
|
![step6](../assets/step6.png)
|
2022-10-17 22:40:54 +00:00
|
|
|
</figure>
|
2022-09-19 10:34:34 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
7. After following the inpainting instructions above (either through the CLI or
|
|
|
|
the Web UI), marvel at your newfound ability to selectively invoke. Lookin'
|
|
|
|
good!
|
2022-09-19 10:34:34 +00:00
|
|
|
|
2022-10-17 22:40:54 +00:00
|
|
|
<figure markdown>
|
2022-10-16 16:07:21 +00:00
|
|
|
![step7](../assets/step7.png)
|
2022-10-17 22:40:54 +00:00
|
|
|
</figure>
|
2022-09-19 01:30:21 +00:00
|
|
|
|
2022-11-04 19:17:28 +00:00
|
|
|
8. In the export dialogue, Make sure the "Save colour values from transparent
|
|
|
|
pixels" checkbox is selected.
|