Skip to content

Commit

Permalink
more updates to many docs, including:
Browse files Browse the repository at this point in the history
- better readability in dark mode since color change
- better looking changelog
- fix images which where not loading
- also center most of the images
- fix some syntax errors like
  - headlines ending with a colon
  - codeblocks with wrong fences
  - codeblocks without shell
- update conda prompts from ldm to invokeai
- ....
  • Loading branch information
mauwii authored and lstein committed Oct 12, 2022
1 parent 8ea07f3 commit 1c687d6
Show file tree
Hide file tree
Showing 14 changed files with 253 additions and 193 deletions.
30 changes: 15 additions & 15 deletions docs/CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,7 @@ title: Changelog

# :octicons-log-16: **Changelog**

- v2.0.0 (9 October 2022)
## v2.0.0 <small>(9 October 2022)</small>

- `dream.py` script renamed `invoke.py`. A `dream.py` script wrapper remains
for backward compatibility.
Expand All @@ -31,7 +31,7 @@ title: Changelog
- Deprecated `--full_precision` / `-F`. Simply omit it and `invoke.py` will auto
configure. To switch away from auto use the new flag like `--precision=float32`.

- v1.14 (11 September 2022)
## v1.14 <small>(11 September 2022)</small>

- Memory optimizations for small-RAM cards. 512x512 now possible on 4 GB GPUs.
- Full support for Apple hardware with M1 or M2 chips.
Expand All @@ -41,7 +41,7 @@ title: Changelog
- Improved web server GUI.
- Lots of code and documentation cleanups.

- v1.13 (3 September 2022
## v1.13 <small>(3 September 2022)</small>

- Support image variations (see [VARIATIONS](features/VARIATIONS.md)
([Kevin Gibbons](https://github.com/bakkot) and many contributors and reviewers)
Expand All @@ -61,7 +61,7 @@ title: Changelog

---

## v1.12 (28 August 2022)
## v1.12 <small>(28 August 2022)</small>

- Improved file handling, including ability to read prompts from standard input.
(kudos to [Yunsaki](https://github.com/yunsaki)
Expand All @@ -75,7 +75,7 @@ title: Changelog

---

## v1.11 (26 August 2022)
## v1.11 <small>(26 August 2022)</small>

- NEW FEATURE: Support upscaling and face enhancement using the GFPGAN module. (kudos to [Oceanswave](https://github.com/Oceanswave)
- You now can specify a seed of -1 to use the previous image's seed, -2 to use the seed for the image generated before that, etc.
Expand All @@ -88,13 +88,13 @@ title: Changelog

---

## v1.10 (25 August 2022)
## v1.10 <small>(25 August 2022)</small>

- A barebones but fully functional interactive web server for online generation of txt2img and img2img.

---

## v1.09 (24 August 2022)
## v1.09 <small>(24 August 2022)</small>

- A new -v option allows you to generate multiple variants of an initial image
in img2img mode. (kudos to [Oceanswave](https://github.com/Oceanswave). [
Expand All @@ -104,7 +104,7 @@ title: Changelog

---

## v1.08 (24 August 2022)
## v1.08 <small>(24 August 2022)</small>

- Escape single quotes on the invoke> command before trying to parse. This avoids
parse errors.
Expand All @@ -115,22 +115,22 @@ title: Changelog

---

## v1.07 (23 August 2022)
## v1.07 <small>(23 August 2022)</small>

- Image filenames will now never fill gaps in the sequence, but will be assigned the
next higher name in the chosen directory. This ensures that the alphabetic and chronological
sort orders are the same.

---

## v1.06 (23 August 2022)
## v1.06 <small>(23 August 2022)</small>

- Added weighted prompt support contributed by [xraxra](https://github.com/xraxra)
- Example of using weighted prompts to tweak a demonic figure contributed by [bmaltais](https://github.com/bmaltais)

---

## v1.05 (22 August 2022 - after the drop)
## v1.05 <small>(22 August 2022 - after the drop)</small>

- Filenames now use the following formats:
000010.95183149.png -- Two files produced by the same command (e.g. -n2),
Expand All @@ -148,22 +148,22 @@ title: Changelog

---

## v1.04 (22 August 2022 - after the drop)
## v1.04 <small>(22 August 2022 - after the drop)</small>

- Updated README to reflect installation of the released weights.
- Suppressed very noisy and inconsequential warning when loading the frozen CLIP
tokenizer.

---

## v1.03 (22 August 2022)
## v1.03 <small>(22 August 2022)</small>

- The original txt2img and img2img scripts from the CompViz repository have been moved into
a subfolder named "orig_scripts", to reduce confusion.

---

## v1.02 (21 August 2022)
## v1.02 <small>(21 August 2022)</small>

- A copy of the prompt and all of its switches and options is now stored in the corresponding
image in a tEXt metadata field named "Dream". You can read the prompt using scripts/images2prompt.py,
Expand All @@ -172,7 +172,7 @@ title: Changelog

---

## v1.01 (21 August 2022)
## v1.01 <small>(21 August 2022)</small>

- added k_lms sampling.
**Please run "conda env update" to load the k_lms dependencies!!**
Expand Down
4 changes: 2 additions & 2 deletions docs/features/CLI.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ The script is confirmed to work on Linux, Windows and Mac systems.
currently rudimentary, but a much better replacement is on its way.

```bash
(ldm) ~/stable-diffusion$ python3 ./scripts/invoke.py
(invokeai) ~/stable-diffusion$ python3 ./scripts/invoke.py
* Initializing, be patient...
Loading model from models/ldm/text2img-large/model.ckpt
(...more initialization messages...)
Expand All @@ -51,7 +51,7 @@ invoke> "there's a fly in my soup" -n6 -g
invoke> q

# this shows how to retrieve the prompt stored in the saved image's metadata
(ldm) ~/stable-diffusion$ python ./scripts/images2prompt.py outputs/img_samples/*.png
(invokeai) ~/stable-diffusion$ python ./scripts/images2prompt.py outputs/img_samples/*.png
00009.png: "ashley judd riding a camel" -s150 -S 416354203
00010.png: "ashley judd riding a camel" -s150 -S 1362479620
00011.png: "there's a fly in my soup" -n6 -g -S 2685670268
Expand Down
12 changes: 6 additions & 6 deletions docs/features/INPAINTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,28 +50,28 @@ We are hoping to get rid of the need for this workaround in an upcoming release.

1. Open image in Photoshop

![step1](../assets/step1.png)
<div align="center" markdown>![step1](../assets/step1.png)</div>

2. Use any of the selection tools (Marquee, Lasso, or Wand) to select the area you desire to inpaint.

![step2](../assets/step2.png)
<div align="center" markdown>![step2](../assets/step2.png)</div>

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.

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 undrlying image, or your inpainting results will be dramatically impacted.

![step4](../assets/step4.png)
<div align="center" markdown>![step4](../assets/step4.png)</div>

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.

![step5](../assets/step5.png)
<div align="center" markdown>![step5](../assets/step5.png)</div>

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++

![step6](../assets/step6.png)
<div align="center" markdown>![step6](../assets/step6.png)</div>

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!

![step7](../assets/step7.png)
<div align="center" markdown>![step7](../assets/step7.png)</div>

8. In the export dialogue, Make sure the "Save colour values from transparent pixels" checkbox is selected.
18 changes: 10 additions & 8 deletions docs/features/OTHER.md
Original file line number Diff line number Diff line change
Expand Up @@ -6,11 +6,13 @@ title: Others

## **Google Colab**

Stable Diffusion AI Notebook: [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/lstein/stable-diffusion/blob/main/notebooks/Stable_Diffusion_AI_Notebook.ipynb)
[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg){ align="right" }](https://colab.research.google.com/github/lstein/stable-diffusion/blob/main/notebooks/Stable_Diffusion_AI_Notebook.ipynb)

Open and follow instructions to use an isolated environment running Dream.

Output Example: ![Colab Notebook](../assets/colab_notebook.png)
Output Example:

![Colab Notebook](../assets/colab_notebook.png)

---

Expand All @@ -29,12 +31,12 @@ invoke> "pond garden with lotus by claude monet" --seamless -s100 -n4
## **Shortcuts: Reusing Seeds**

Since it is so common to reuse seeds while refining a prompt, there is now a shortcut as of version
1.11. Provide a `**-S**` (or `**--seed**`) switch of `-1` to use the seed of the most recent image
generated. If you produced multiple images with the `**-n**` switch, then you can go back further
using -2, -3, etc. up to the first image generated by the previous command. Sorry, but you can't go
1.11. Provide a `-S` (or `--seed`) switch of `-1` to use the seed of the most recent image
generated. If you produced multiple images with the `-n` switch, then you can go back further
using `-2`, `-3`, etc. up to the first image generated by the previous command. Sorry, but you can't go
back further than one command.

Here's an example of using this to do a quick refinement. It also illustrates using the new `**-G**`
Here's an example of using this to do a quick refinement. It also illustrates using the new `-G`
switch to turn on upscaling and face enhancement (see previous section):

```bash
Expand All @@ -54,7 +56,7 @@ outputs/img-samples/000040.3498014304.png: "a cute child playing hopscotch" -G1.
## **Weighted Prompts**

You may weight different sections of the prompt to tell the sampler to attach different levels of
priority to them, by adding `:(number)` to the end of the section you wish to up- or downweight. For
priority to them, by adding `:<percent>` to the end of the section you wish to up- or downweight. For
example consider this prompt:

```bash
Expand Down Expand Up @@ -122,7 +124,7 @@ internet. In the following runs, it will load up the cached versions of the requ
`.cache` directory of the system.

```bash
(ldm) ~/stable-diffusion$ python3 ./scripts/preload_models.py
(invokeai) ~/stable-diffusion$ python3 ./scripts/preload_models.py
preloading bert tokenizer...
Downloading: 100%|██████████████████████████████████| 28.0/28.0 [00:00<00:00, 49.3kB/s]
Downloading: 100%|██████████████████████████████████| 226k/226k [00:00<00:00, 2.79MB/s]
Expand Down
35 changes: 21 additions & 14 deletions docs/features/OUTPAINTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -25,14 +25,16 @@ implementations.

Consider this image:

<div align="center" markdown>
![curly_woman](../assets/outpainting/curly.png)
</div>

Pretty nice, but it's annoying that the top of her head is cut
off. She's also a bit off center. Let's fix that!

~~~~
```bash
invoke> !fix images/curly.png --outcrop top 64 right 64
~~~~
```

This is saying to apply the `outcrop` extension by extending the top
of the image by 64 pixels, and the right of the image by the same
Expand All @@ -42,7 +44,9 @@ specify any number of pixels to extend. You can also abbreviate

The result looks like this:

<div align="center" markdown>
![curly_woman_outcrop](../assets/outpainting/curly-outcrop.png)
</div>

The new image is actually slightly larger than the original (576x576,
because 64 pixels were added to the top and right sides.)
Expand All @@ -66,33 +70,36 @@ The `outpaint` extension does the same thing, but with subtle
differences. Starting with the same image, here is how we would add an
additional 64 pixels to the top of the image:

~~~
```bash
invoke> !fix images/curly.png --out_direction top 64
~~~
```

(you can abbreviate `--out_direction` as `-D`.

The result is shown here:

<div align="center" markdown>
![curly_woman_outpaint](../assets/outpainting/curly-outpaint.png)
</div>

Although the effect is similar, there are significant differences from
outcropping:

1. You can only specify one direction to extend at a time.
2. The image is **not** resized. Instead, the image is shifted by the specified
- You can only specify one direction to extend at a time.
- The image is **not** resized. Instead, the image is shifted by the specified
number of pixels. If you look carefully, you'll see that less of the lady's
torso is visible in the image.
3. Because the image dimensions remain the same, there's no rounding
- Because the image dimensions remain the same, there's no rounding
to multiples of 64.
4. Attempting to outpaint larger areas will frequently give rise to ugly
- Attempting to outpaint larger areas will frequently give rise to ugly
ghosting effects.
5. For best results, try increasing the step number.
6. If you don't specify a pixel value in -D, it will default to half
- For best results, try increasing the step number.
- If you don't specify a pixel value in `-D`, it will default to half
of the whole image, which is likely not what you want.

Neither `outpaint` nor `outcrop` are perfect, but we continue to tune
and improve them. If one doesn't work, try the other. You may also
wish to experiment with other `img2img` arguments, such as `-C`, `-f`
and `-s`.
!!! tip

Neither `outpaint` nor `outcrop` are perfect, but we continue to tune
and improve them. If one doesn't work, try the other. You may also
wish to experiment with other `img2img` arguments, such as `-C`, `-f`
and `-s`.
18 changes: 9 additions & 9 deletions docs/features/POSTPROCESS.md
Original file line number Diff line number Diff line change
Expand Up @@ -34,13 +34,13 @@ work. These are loaded when you run `scripts/preload_models.py`. If
GFPAN is failing with an error, please run the following from the
InvokeAI directory:

~~~~
```bash
python scripts/preload_models.py
~~~~
```

If you do not run this script in advance, the GFPGAN module will attempt
to download the models files the first time you try to perform facial
reconstruction.
reconstruction.

Alternatively, if you have GFPGAN installed elsewhere, or if you are
using an earlier version of this package which asked you to install
Expand Down Expand Up @@ -89,13 +89,13 @@ too.
### Example Usage

```bash
invoke> superman dancing with a panda bear -U 2 0.6 -G 0.4
invoke> "superman dancing with a panda bear" -U 2 0.6 -G 0.4
```

This also works with img2img:

```bash
invoke> a man wearing a pineapple hat -I path/to/your/file.png -U 2 0.5 -G 0.6
invoke> "a man wearing a pineapple hat" -I path/to/your/file.png -U 2 0.5 -G 0.6
```

!!! note
Expand Down Expand Up @@ -129,14 +129,14 @@ You can use `-ft` prompt argument to swap between CodeFormer and the
default GFPGAN. The above mentioned `-G` prompt argument will allow
you to control the strength of the restoration effect.

### Usage:
### Usage

The following command will perform face restoration with CodeFormer instead of
the default gfpgan.

`<prompt> -G 0.8 -ft codeformer`

### Other Options:
### Other Options

- `-cf` - cf or CodeFormer Fidelity takes values between `0` and `1`. 0 produces
high quality results but low accuracy and 1 produces lower quality results but
Expand All @@ -162,15 +162,15 @@ previously-generated file. Just use the syntax `!fix path/to/file.png
2X for a file named `./outputs/img-samples/000044.2945021133.png`,
just run:

```
```bash
invoke> !fix ./outputs/img-samples/000044.2945021133.png -G 0.8 -U 2
```

A new file named `000044.2945021133.fixed.png` will be created in the output
directory. Note that the `!fix` command does not replace the original file,
unlike the behavior at generate time.

### Disabling:
### Disabling

If, for some reason, you do not wish to load the GFPGAN and/or ESRGAN libraries,
you can disable them on the invoke.py command line with the `--no_restore` and
Expand Down
Loading

0 comments on commit 1c687d6

Please sign in to comment.