From 0071f43b2c094cb663a6bf1595fc1710c04ffe14 Mon Sep 17 00:00:00 2001 From: mauwii Date: Sun, 18 Sep 2022 04:54:20 +0200 Subject: [PATCH] use Admonitions for notes, warnings, ... --- docs/features/CLI.md | 22 +++++++++++-------- docs/features/EMBIGGEN.md | 27 ++++++++++++------------ docs/features/TEXTUAL_INVERSION.md | 2 +- docs/features/UPSCALE.md | 34 ++++++++++++++++-------------- docs/features/VARIATIONS.md | 3 ++- docs/index.md | 24 +++++++++++---------- docs/installation/INSTALL_LINUX.md | 8 ++++--- 7 files changed, 65 insertions(+), 55 deletions(-) diff --git a/docs/features/CLI.md b/docs/features/CLI.md index 830456829f..0b27095950 100644 --- a/docs/features/CLI.md +++ b/docs/features/CLI.md @@ -22,8 +22,10 @@ be retrieved using scripts/images2prompt.py The script is confirmed to work on Linux, Windows and Mac systems. -_Note:_ This script runs from the command-line or can be used as a Web application. The Web GUI is -currently rudimentary, but a much better replacement is on its way. +!!! note + + This script runs from the command-line or can be used as a Web application. The Web GUI is + currently rudimentary, but a much better replacement is on its way. ```bash (ldm) ~/stable-diffusion$ python3 ./scripts/dream.py @@ -99,12 +101,12 @@ These arguments are deprecated but still work: | `--weights ` | | `None` | Pth to weights file; use `--model stable-diffusion-1.4` instead | | `--laion400m` | `-l` | `False` | Use older LAION400m weights; use `--model=laion400m` instead | -### **A note on path names:** +!!! note -On Windows systems, you may run into problems when passing the dream script standard backslashed -path names because the Python interpreter treats "\" as an escape. You can either double your -slashes (ick): `C:\\\\path\\\\to\\\\my\\\\file`, or use Linux/Mac style forward slashes (better): -`C:/path/to/my/file`. + On Windows systems, you may run into problems when passing the dream script standard backslashed + path names because the Python interpreter treats `\` as an escape. You can either double your + slashes (ick): `C:\\\\path\\\\to\\\\my\\\\file`, or use Linux/Mac style forward slashes (better): + `C:/path/to/my/file`. ### List of prompt arguments @@ -144,8 +146,10 @@ Those are the `dream` commands that apply to txt2img: | `--variation ` | `-v` | `0.0` | Add a bit of noise (0.0=none, 1.0=high) to the image
in order to generate a series of variations. Usually
used in combination with `-S` and `-n`
to generate a series a riffs on a starting image.
See [Variations](./VARIATIONS.md). | | `--with_variations ` | `-V` | `None` | Combine two or more variations. See [Variations](./VARIATIONS.md)
for now to use this. | -Note that the width and height of the image must be multiples of 64. You can provide different -values, but they will be rounded down to the nearest multiple of 64. +!!! note + + The width and height of the image must be multiples of 64. You can provide different + values, but they will be rounded down to the nearest multiple of 64. ### This is an example of img2img diff --git a/docs/features/EMBIGGEN.md b/docs/features/EMBIGGEN.md index ae12f29b6d..16acd36cba 100644 --- a/docs/features/EMBIGGEN.md +++ b/docs/features/EMBIGGEN.md @@ -59,7 +59,6 @@ and it can also be less than one if the init_img is too big. Esrgan_strength defaults to 0.75, and the overlap_ratio defaults to 0.25, both are optional. - Unlike Img2Img, the `--width` (`-W`) and `--height` (`-H`) arguments do not control the size of the image as a whole, but the size of the tiles used to Embiggen the image. @@ -120,19 +119,19 @@ tiles: dream> a photo of puffy clouds over a forest at sunset -s 100 -W 512 -H 512 -I outputs/000002.seed.png -f 0.5 -embiggen_tiles 1 2 3 ``` -## Note +!!! note -Because the same prompt is used on all the tiled images, and the model -doesn't have the context of anything outside the tile being run - it -can end up creating repeated pattern (also called 'motifs') across all -the tiles based on that prompt. The best way to combat this is -lowering the `--strength` (`-f`) to stay more true to the init image, -and increasing the number of steps so there is more compute-time to -create the detail. Anecdotally `--strength` 0.35-0.45 works pretty -well on most things. It may also work great in some examples even with -the `--strength` set high for patterns, landscapes, or subjects that -are more abstract. Because this is (relatively) fast, you can also -always create a few Embiggen'ed images and manually composite them to -preserve the best parts from each. + Because the same prompt is used on all the tiled images, and the model + doesn't have the context of anything outside the tile being run - it + can end up creating repeated pattern (also called 'motifs') across all + the tiles based on that prompt. The best way to combat this is + lowering the `--strength` (`-f`) to stay more true to the init image, + and increasing the number of steps so there is more compute-time to + create the detail. Anecdotally `--strength` 0.35-0.45 works pretty + well on most things. It may also work great in some examples even with + the `--strength` set high for patterns, landscapes, or subjects that + are more abstract. Because this is (relatively) fast, you can also + always create a few Embiggen'ed images and manually composite them to + preserve the best parts from each. Author: [Travco](https://github.com/travco) diff --git a/docs/features/TEXTUAL_INVERSION.md b/docs/features/TEXTUAL_INVERSION.md index b8dbc21192..9e8e0052f9 100644 --- a/docs/features/TEXTUAL_INVERSION.md +++ b/docs/features/TEXTUAL_INVERSION.md @@ -39,7 +39,7 @@ and one with the init word provided. On a RTX3090, the process for SD will take ~1h @1.6 iterations/sec. -!!! Info _Note_ +!!! note According to the associated paper, the optimal number of images is 3-5. Your model may not converge if you use more images than diff --git a/docs/features/UPSCALE.md b/docs/features/UPSCALE.md index 231e6bfbb6..9c16b3a3aa 100644 --- a/docs/features/UPSCALE.md +++ b/docs/features/UPSCALE.md @@ -30,11 +30,13 @@ this package which asked you to install GFPGAN in a sibling directory, you may u `--gfpgan_dir` argument with `dream.py` to set a custom path to your GFPGAN directory. _There are other GFPGAN related boot arguments if you wish to customize further._ -**Note: Internet connection needed:** Users whose GPU machines are isolated from the Internet (e.g. -on a University cluster) should be aware that the first time you run dream.py with GFPGAN and -Real-ESRGAN turned on, it will try to download model files from the Internet. To rectify this, you -may run `python3 scripts/preload_models.py` after you have installed GFPGAN and all its -dependencies. +!!! warning "Internet connection needed" + + Users whose GPU machines are isolated from the Internet (e.g. + on a University cluster) should be aware that the first time you run dream.py with GFPGAN and + Real-ESRGAN turned on, it will try to download model files from the Internet. To rectify this, you + may run `python3 scripts/preload_models.py` after you have installed GFPGAN and all its + dependencies. ## **Usage** @@ -83,17 +85,17 @@ This also works with img2img: dream> a man wearing a pineapple hat -I path/to/your/file.png -U 2 0.5 -G 0.6 ``` -### **Note** +!!! note -GFPGAN and Real-ESRGAN are both memory intensive. In order to avoid crashes and memory overloads -during the Stable Diffusion process, these effects are applied after Stable Diffusion has completed -its work. + GFPGAN and Real-ESRGAN are both memory intensive. In order to avoid crashes and memory overloads + during the Stable Diffusion process, these effects are applied after Stable Diffusion has completed + its work. -In single image generations, you will see the output right away but when you are using multiple -iterations, the images will first be generated and then upscaled and face restored after that -process is complete. While the image generation is taking place, you will still be able to preview -the base images. + In single image generations, you will see the output right away but when you are using multiple + iterations, the images will first be generated and then upscaled and face restored after that + process is complete. While the image generation is taking place, you will still be able to preview + the base images. -If you wish to stop during the image generation but want to upscale or face restore a particular -generated image, pass it again with the same prompt and generated seed along with the `-U` and `-G` -prompt arguments to perform those actions. + If you wish to stop during the image generation but want to upscale or face restore a particular + generated image, pass it again with the same prompt and generated seed along with the `-U` and `-G` + prompt arguments to perform those actions. diff --git a/docs/features/VARIATIONS.md b/docs/features/VARIATIONS.md index 23b6cf2917..053f6f0a3a 100644 --- a/docs/features/VARIATIONS.md +++ b/docs/features/VARIATIONS.md @@ -29,7 +29,7 @@ This will be indicated as `prompt` in the examples below. First we let SD create a series of images in the usual way, in this case requesting six iterations: -``` +```bash dream> lucy lawless as xena, warrior princess, character portrait, high resolution -n6 ... Outputs: @@ -102,6 +102,7 @@ generate more variations around the almost-but-not-quite image. We do the latter, using both the `-V` (combining) and `-v` (variation strength) options. Note that we use `-n6` to generate 6 variations: +```bash dream> "prompt" -S3357757885 -V3647897225,0.1,1614299449,0.1 -v0.05 -n6 Outputs: ./outputs/Xena/000004.3279757577.png: "prompt" -s50 -W512 -H512 -C7.5 -Ak_lms -V 3647897225:0.1,1614299449:0.1,3279757577:0.05 -S3357757885 diff --git a/docs/index.md b/docs/index.md index 0a909c5d83..189e362ae3 100644 --- a/docs/index.md +++ b/docs/index.md @@ -34,9 +34,11 @@ source text-to-image generator. It provides a streamlined process with various n options to aid the image generation process. It runs on Windows, Mac and Linux machines, and runs on GPU cards with as little as 4 GB or RAM. -_Note: This fork is rapidly evolving. Please use the -[Issues](https://github.com/lstein/stable-diffusion/issues) tab to report bugs and make feature -requests. Be sure to use the provided templates. They will help aid diagnose issues faster._ +!!! note + + This fork is rapidly evolving. Please use the + [Issues](https://github.com/lstein/stable-diffusion/issues) tab to report bugs and make feature + requests. Be sure to use the provided templates. They will help aid diagnose issues faster. ## Installation @@ -64,18 +66,18 @@ You wil need one of the following: - At least 6 GB of free disk space for the machine learning model, Python, and all its dependencies. -### Note +!!! note -If you are have a Nvidia 10xx series card (e.g. the 1080ti), please run the dream script in -full-precision mode as shown below. + If you are have a Nvidia 10xx series card (e.g. the 1080ti), please run the dream script in + full-precision mode as shown below. -Similarly, specify full-precision mode on Apple M1 hardware. + Similarly, specify full-precision mode on Apple M1 hardware. -To run in full-precision mode, start `dream.py` with the `--full_precision` flag: + To run in full-precision mode, start `dream.py` with the `--full_precision` flag: -```bash -(ldm) ~/stable-diffusion$ python scripts/dream.py --full_precision -``` + ```bash + (ldm) ~/stable-diffusion$ python scripts/dream.py --full_precision + ``` ## Features diff --git a/docs/installation/INSTALL_LINUX.md b/docs/installation/INSTALL_LINUX.md index 0cc6388725..4b9be84542 100644 --- a/docs/installation/INSTALL_LINUX.md +++ b/docs/installation/INSTALL_LINUX.md @@ -57,9 +57,11 @@ title: Linux (ldm) ~/stable-diffusion$ python3 scripts/preload_models.py ``` - Note that this step is necessary because I modified the original just-in-time - model loading scheme to allow the script to work on GPU machines that are not - internet connected. See [Preload Models](../features/OTHER.md#preload-models) + !!! note + + This step is necessary because I modified the original just-in-time + model loading scheme to allow the script to work on GPU machines that are not + internet connected. See [Preload Models](../features/OTHER.md#preload-models) 7. Now you need to install the weights for the stable diffusion model.