remove feature list from index.md since in menu

fix double bs python path in cli.md and fix tables again
add more keys in cli.md
fix annotations in install_mac.md
remove torchaudio from pythorch-nightly installation
fix self reference
This commit is contained in:
mauwii 2022-09-19 08:36:42 +02:00
parent 23e62efdc5
commit ead0e92bac
No known key found for this signature in database
GPG Key ID: D923DB04ADB3F5AB
3 changed files with 48 additions and 72 deletions

View File

@ -71,26 +71,26 @@ These command-line arguments can be passed to `dream.py` when you first run it f
or Linux command line. Some set defaults that can be overridden on a per-prompt basis (see [List of or Linux command line. Some set defaults that can be overridden on a per-prompt basis (see [List of
prompt arguments] (#list-of-prompt-arguments). Others prompt arguments] (#list-of-prompt-arguments). Others
| Argument | Shortcut | Default | Description | Argument | Shortcut | Default | Description |
| ------------------------- | ------------- | ----------------------------- | ------------------------------------------------------------------------------------------------------- | ------------------------- | ------------- | ----------------------------- | ----------------------------------------------------------------------------------------------------- |
| `--help` | `-h` | | Print a concise help message. | `--help` | `-h` | | Print a concise help message. |
| `--outdir <path>` | `-o<path>` | `outputs/img_samples` | Location for generated images. | `--outdir <path>` | `-o<path>` | `outputs/img_samples` | Location for generated images. |
| `--prompt_as_dir` | `-p` | `False` | Name output directories using the prompt text. | `--prompt_as_dir` | `-p` | `False` | Name output directories using the prompt text. |
| `--from_file <path>` | | `None` | Read list of prompts from a file. Use "-" to read from<br>standard input | `--from_file <path>` | | `None` | Read list of prompts from a file. Use `-` to read from<br>standard input |
| `--model <modelname>` | | `stable-diffusion-1.4` | Loads model specified in configs/models.yaml. Currently<br>one of "stable-diffusion-1.4" or "laion400m" | `--model <modelname>` | | `stable-diffusion-1.4` | Loads model specified in configs/models.yaml. Currently<br>one of "stable-diffusion-1.4" or "laion400m" |
| `--full_precision` | `-F` | `False` | Run in slower full-precision mode. Needed for Macintosh<br>M1/M2 hardware and some older video cards. | `--full_precision` | `-F` | `False` | Run in slower full-precision mode. Needed for Macintosh<br>M1/M2 hardware and some older video cards. |
| `--web` | | `False` | Start in web server mode | `--web` | | `False` | Start in web server mode |
| `--host <ip addr>` | | `localhost` | Which network interface web server should listen on.<br>Set to 0.0.0.0 to listen on any. | `--host <ip addr>` | | `localhost` | Which network interface web server should listen on.<br>Set to 0.0.0.0 to listen on any. |
| `--port <port>` | | `9090` | Which port web server should listen for requests on. | `--port <port>` | | `9090` | Which port web server should listen for requests on. |
| `--config <path>` | | `configs/models.yaml` | Configuration file for models and their weights. | `--config <path>` | | `configs/models.yaml` | Configuration file for models and their weights. |
| `--iterations <int>` | `-n<int>` | `1` | How many images to generate per prompt. | `--iterations <int>` | `-n<int>` | `1` | How many images to generate per prompt. |
| `--grid` | `-g` | `False` | Save all image series as a grid rather than individually. | `--grid` | `-g` | `False` | Save all image series as a grid rather than individually. |
| `--sampler <sampler>` | `-A<sampler>` | `k_lms` | Sampler to use. Use -h to get list of available samplers. | `--sampler <sampler>` | `-A<sampler>` | `k_lms` | Sampler to use. Use -h to get list of available samplers. |
| `--seamless` | | `False` | Create interesting effects by tiling elements of the image. | `--seamless` | | `False` | Create interesting effects by tiling elements of the image. |
| `--embedding_path <path>` | | `None` | Path to pre-trained embedding manager checkpoints,<br>for custom models | `--embedding_path <path>` | | `None` | Path to pre-trained embedding manager checkpoints,<br>for custom models |
| `--gfpgan_dir` | | `src/gfpgan` | Path to where GFPGAN is installed. | `--gfpgan_dir` | | `src/gfpgan` | Path to where GFPGAN is installed. |
| `--gfpgan_model_path` | | see bellow\* | Path to GFPGAN model file, relative to `--gfpgan_dir`. | `--gfpgan_model_path` | | see bellow\* | Path to GFPGAN model file, relative to `--gfpgan_dir`. |
| `--device <device>` | `-d<device>` | `torch.cuda.current_device()` | Device to run SD on, e.g. "cuda:0" | `--device <device>` | `-d<device>` | `torch.cuda.current_device()` | Device to run SD on, e.g. "cuda:0" |
\*`experiments/pretrained_models/GFPGANv1.3.pth` \*`experiments/pretrained_models/GFPGANv1.3.pth`
@ -107,7 +107,7 @@ These arguments are deprecated but still work:
On Windows systems, you may run into problems when passing the dream script standard backslashed 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 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): slashes (ick): `C:\\path\\to\\my\\file`, or use Linux/Mac style forward slashes (better):
`C:/path/to/my/file`. `C:/path/to/my/file`.
### List of prompt arguments ### List of prompt arguments
@ -176,13 +176,13 @@ chain as the the reference image for each step in the chain.
In addition to the command-line options recognized by txt2img, img2img accepts additional options: In addition to the command-line options recognized by txt2img, img2img accepts additional options:
| Argument | Shortcut | Default | Description | | Argument | Shortcut | Default | Description |
| --------------------- | ---------- | ------- | ------------------------------------------------------------------------------------------------------------------------------------------ | | --------------------- | ---------- | ------- | --------------------------------------------------------------------------------------------------------------------------------------------- |
| `--init_img <path>` | `-I<path>` | `None` | Path to the initialization image | | `--init_img <path>` | `-I<path>` | `None` | Path to the initialization image |
| `--init_color <path>` | | `None` | Path to reference image for color correction | | `--init_color <path>` | | `None` | Path to reference image for color correction |
| `--fit` | `-F` | `False` | Scale the image to fit into the specified -H and -W dimensions | | `--fit` | `-F` | `False` | Scale the image to fit into the specified -H and -W dimensions |
| `--strength <float>` | `-f<float>` | `0.75` | How hard to try to match the prompt to the initial image. Ranges from 0.0-0.99, with higher values replacing the initial image completely. | | `--strength <float>` | `-f<float>` | `0.75` | How hard to try to match the prompt to the initial image. Ranges from 0.0-0.99,<br>with higher values replacing the initial image completely. |
#### inpainting #### Inpainting
!!! example !!! example
@ -195,11 +195,11 @@ In addition to the command-line options recognized by txt2img, img2img accepts a
the areas to overpaint made transparent, but you must be careful not to destroy the pixels the areas to overpaint made transparent, but you must be careful not to destroy the pixels
underneath when you create the transparent areas. See [Inpainting](./INPAINTING.md) for details. underneath when you create the transparent areas. See [Inpainting](./INPAINTING.md) for details.
inpainting accepts all the arguments used for txt2img and img2img, as well as the `--mask` (`-M`) Inpainting accepts all the arguments used for txt2img and img2img, as well as the `--mask` (`-M`)
argument: argument:
| Argument | Shortcut | Default | Description | | Argument | Shortcut | Default | Description |
| -------------------- | ---------- | ------- | ------------------------------------------------------------------------------------------------ | | -------------------- | ---------- | ------- | --------------------------------------------------------------------------------------------------- |
| `--init_mask <path>` | `-M<path>` | `None` | Path to an image the same size as the initial_image, with areas for<br>inpainting made transparent. | | `--init_mask <path>` | `-M<path>` | `None` | Path to an image the same size as the initial_image, with areas for<br>inpainting made transparent. |
## Command-line editing and completion ## Command-line editing and completion
@ -226,15 +226,15 @@ winpty python scripts\dream.py
On the Mac and Linux platforms, when you exit `dream.py`, the last 1000 lines of your command-line On the Mac and Linux platforms, when you exit `dream.py`, the last 1000 lines of your command-line
history will be saved. When you restart `dream.py`, you can access the saved history using the history will be saved. When you restart `dream.py`, you can access the saved history using the
up-arrow key. ++up++ key.
In addition, limited command-line completion is installed. In various contexts, you can start typing In addition, limited command-line completion is installed. In various contexts, you can start typing
your command and press tab. A list of potential completions will be presented to you. You can then your command and press tab. A list of potential completions will be presented to you. You can then
type a little more, hit tab again, and eventually autocomplete what you want. type a little more, hit tab again, and eventually autocomplete what you want.
When specifying file paths using the one-letter shortcuts, the CLI will attempt to complete When specifying file paths using the one-letter shortcuts, the CLI will attempt to complete
pathnames for you. This is most handy for the -I (init image) and -M (init mask) paths. To initiate pathnames for you. This is most handy for the `-I` (init image) and `-M` (init mask) paths. To initiate
completion, start the path with a slash ("/") or "./". For example: completion, start the path with a slash `/` or `./`, for example:
```bash ```bash
dream> "zebra with a mustache" -I./test-pictures<TAB> dream> "zebra with a mustache" -I./test-pictures<TAB>
@ -242,6 +242,6 @@ dream> "zebra with a mustache" -I./test-pictures<TAB>
-I./test-pictures/bad-sketch.png -I./test-pictures/man_with_eagle/ -I./test-pictures/bad-sketch.png -I./test-pictures/man_with_eagle/
``` ```
You can then type "z", hit ++tab++ again, and it will autofill to "zebra.jpg". You can then type ++z++, hit ++tab++ again, and it will autofill to `zebra.jpg`.
More text completion features (such as autocompleting seeds) are on their way. More text completion features (such as autocompleting seeds) are on their way.

View File

@ -1,5 +1,6 @@
--- ---
title: Home title: Home
template: main.html
--- ---
<!-- <!--
@ -10,7 +11,7 @@ title: Home
mkdocs serve mkdocs serve
``` ```
--> -->
<div align="center" markdown="1"> <div align="center" markdown>
# :material-script-text-outline: Stable Diffusion Dream Script # :material-script-text-outline: Stable Diffusion Dream Script
@ -42,6 +43,7 @@ title: Home
[latest commit to dev link]: https://github.com/lstein/stable-diffusion/commits/development [latest commit to dev link]: https://github.com/lstein/stable-diffusion/commits/development
[latest release badge]: https://flat.badgen.net/github/release/lstein/stable-diffusion/development?icon=github [latest release badge]: https://flat.badgen.net/github/release/lstein/stable-diffusion/development?icon=github
[latest release link]: https://github.com/lstein/stable-diffusion/releases [latest release link]: https://github.com/lstein/stable-diffusion/releases
</div> </div>
This is a fork of [CompVis/stable-diffusion](https://github.com/CompVis/stable-diffusion), the open This is a fork of [CompVis/stable-diffusion](https://github.com/CompVis/stable-diffusion), the open
@ -93,30 +95,6 @@ You wil need one of the following:
```bash ```bash
(ldm) ~/stable-diffusion$ python scripts/dream.py --full_precision (ldm) ~/stable-diffusion$ python scripts/dream.py --full_precision
``` ```
## :octicons-list-unordered-24: Features
### Major Features
- [Interactive Command Line Interface](features/CLI.md)
- [Image To Image](features/IMG2IMG.md)
- [Inpainting Support](features/INPAINTING.md)
- [GFPGAN and Real-ESRGAN Support](features/UPSCALE.md)
- [Seamless Tiling](features/OTHER.md#seamless-tiling)
- [Google Colab](features/OTHER.md#google-colab)
- [Web Server](features/WEB.md)
- [Reading Prompts From File](features/OTHER.md#reading-prompts-from-a-file)
- [Shortcut: Reusing Seeds](features/OTHER.md#shortcuts-reusing-seeds)
- [Weighted Prompts](features/OTHER.md#weighted-prompts)
- [Variations](features/VARIATIONS.md)
- [Personalizing Text-to-Image Generation](features/TEXTUAL_INVERSION.md)
- [Simplified API for text to image generation](features/OTHER.md#simplified-api)
### Other Features
- [Creating Transparent Regions for Inpainting](features/INPAINTING.md#creating-transparent-regions-for-inpainting)
- [Preload Models](features/OTHER.md#preload-models)
## :octicons-log-16: Latest Changes ## :octicons-log-16: Latest Changes
### v1.14 <small>(11 September 2022)</small> ### v1.14 <small>(11 September 2022)</small>

View File

@ -83,14 +83,14 @@ While that is downloading, open a Terminal and run the following commands:
=== "with pyenv" === "with pyenv"
```{.bash .annotate} ```{.bash .annotate}
brew install rust pyenv-virtualenv # (1) brew install rust pyenv-virtualenv # (1)!
pyenv install anaconda3-2022.05 pyenv install anaconda3-2022.05
pyenv virtualenv anaconda3-2022.05 pyenv virtualenv anaconda3-2022.05
eval "$(pyenv init -)" eval "$(pyenv init -)"
pyenv activate anaconda3-2022.05 pyenv activate anaconda3-2022.05
``` ```
1. you might already have this installed, no problem 1. You might already have this installed, if that is the case just continue.
```{.bash .annotate title="local repo setup"} ```{.bash .annotate title="local repo setup"}
# clone the repo # clone the repo
@ -102,7 +102,7 @@ cd stable-diffusion
# create symlink to checkpoint # create symlink to checkpoint
mkdir -p models/ldm/stable-diffusion-v1/ mkdir -p models/ldm/stable-diffusion-v1/
PATH_TO_CKPT="$HOME/Downloads" # (1) PATH_TO_CKPT="$HOME/Downloads" # (1)!
ln -s "$PATH_TO_CKPT/sd-v1-4.ckpt" \ ln -s "$PATH_TO_CKPT/sd-v1-4.ckpt" \
models/ldm/stable-diffusion-v1/model.ckpt models/ldm/stable-diffusion-v1/model.ckpt
@ -136,7 +136,7 @@ ln -s "$PATH_TO_CKPT/sd-v1-4.ckpt" \
python scripts/preload_models.py python scripts/preload_models.py
# now you can run SD in CLI mode # now you can run SD in CLI mode
python scripts/dream.py --full_precision # (1) python scripts/dream.py --full_precision # (1)!
# or run the web interface! # or run the web interface!
python scripts/dream.py --web python scripts/dream.py --web
@ -169,9 +169,7 @@ get several errors. Here's the errors I've seen and found solutions for.
### Is it slow? ### Is it slow?
Be sure to specify 1 sample and 1 iteration. ```bash title="Be sure to specify 1 sample and 1 iteration."
```bash
python ./scripts/orig_scripts/txt2img.py \ python ./scripts/orig_scripts/txt2img.py \
--prompt "ocean" \ --prompt "ocean" \
--ddim_steps 5 \ --ddim_steps 5 \
@ -197,8 +195,8 @@ One debugging step is to update to the latest version of PyTorch nightly.
conda install \ conda install \
pytorch \ pytorch \
torchvision \ torchvision \
torchaudio \ -c pytorch-nightly \
-c pytorch-nightly -n ldm
``` ```
If it takes forever to run If it takes forever to run
@ -397,7 +395,7 @@ python scripts/preload_models.py
WARNING: this will be slower than running natively on MPS. WARNING: this will be slower than running natively on MPS.
``` ```
The lstein branch includes this fix in This fork already includes a fix for this in
[environment-mac.yaml](https://github.com/lstein/stable-diffusion/blob/main/environment-mac.yaml). [environment-mac.yaml](https://github.com/lstein/stable-diffusion/blob/main/environment-mac.yaml).
--- ---