diff --git a/.github/workflows/mkdocs-flow.yml b/.github/workflows/mkdocs-flow.yml deleted file mode 100644 index 318f180c1b..0000000000 --- a/.github/workflows/mkdocs-flow.yml +++ /dev/null @@ -1,28 +0,0 @@ -name: Deploy -on: - push: - branches: - - main - # pull_request: - # branches: - # - main -jobs: - build: - name: Deploy docs to GitHub Pages - runs-on: ubuntu-latest - steps: - - name: Checkout - uses: actions/checkout@v3 - with: - fetch-depth: 0 - - name: Build - uses: Tiryoh/actions-mkdocs@v0 - with: - mkdocs_version: 'latest' # option - requirements: '/requirements-mkdocs.txt' # option - configfile: '/mkdocs.yml' # option - - name: Deploy - uses: peaceiris/actions-gh-pages@v3 - with: - github_token: ${{ secrets.GITHUB_TOKEN }} - publish_dir: ./site diff --git a/.github/workflows/mkdocs-material.yml b/.github/workflows/mkdocs-material.yml index af03a524e9..8d3c262e47 100644 --- a/.github/workflows/mkdocs-material.yml +++ b/.github/workflows/mkdocs-material.yml @@ -4,7 +4,6 @@ on: branches: - 'main' - 'development' - - 'release-candidate-2-1' jobs: mkdocs-material: diff --git a/.github/workflows/test-invoke-conda.yml b/.github/workflows/test-invoke-conda.yml index e9a0719040..a144303cc3 100644 --- a/.github/workflows/test-invoke-conda.yml +++ b/.github/workflows/test-invoke-conda.yml @@ -4,6 +4,7 @@ on: branches: - 'main' - 'development' + - 'fix-gh-actions-fork' pull_request: branches: - 'main' diff --git a/.gitignore b/.gitignore index 33f0de4df2..54433c86dc 100644 --- a/.gitignore +++ b/.gitignore @@ -1,7 +1,7 @@ # ignore default image save location and model symbolic link outputs/ models/ldm/stable-diffusion-v1/model.ckpt -ldm/invoke/restoration/codeformer/weights +**/restoration/codeformer/weights # ignore user models config configs/models.user.yaml @@ -184,7 +184,7 @@ src **/__pycache__/ outputs -# Logs and associated folders +# Logs and associated folders # created from generated embeddings. logs testtube diff --git a/LICENSE b/LICENSE index d39808bfa0..cb9631b9f6 100644 --- a/LICENSE +++ b/LICENSE @@ -1,17 +1,6 @@ MIT License -Copyright (c) 2022 Lincoln Stein and InvokeAI Organization - -This software is derived from a fork of the source code available from -https://github.com/pesser/stable-diffusion and -https://github.com/CompViz/stable-diffusion. They carry the following -copyrights: - -Copyright (c) 2022 Machine Vision and Learning Group, LMU Munich -Copyright (c) 2022 Robin Rombach and Patrick Esser and contributors - -Please see individual source code files for copyright and authorship -attributions. +Copyright (c) 2022 InvokeAI Team Permission is hereby granted, free of charge, to any person obtaining a copy of this software and associated documentation files (the "Software"), to deal diff --git a/README.md b/README.md index 3b209c99da..808e5e69fe 100644 --- a/README.md +++ b/README.md @@ -68,11 +68,11 @@ requests. Be sure to use the provided templates. They will help aid diagnose iss This fork is supported across multiple platforms. You can find individual installation instructions below. -- #### [Linux](docs/installation/INSTALL_LINUX.md) +- #### [Linux](https://invoke-ai.github.io/InvokeAI/installation/INSTALL_LINUX/) -- #### [Windows](docs/installation/INSTALL_WINDOWS.md) +- #### [Windows](https://invoke-ai.github.io/InvokeAI/installation/INSTALL_WINDOWS/) -- #### [Macintosh](docs/installation/INSTALL_MAC.md) +- #### [Macintosh](https://invoke-ai.github.io/InvokeAI/installation/INSTALL_MAC/) ### Hardware Requirements @@ -103,34 +103,33 @@ errors like 'expected type Float but found Half' or 'not implemented for Half' you can try starting `invoke.py` with the `--precision=float32` flag: ```bash -(ldm) ~/stable-diffusion$ python scripts/invoke.py --precision=float32 +(invokeai) ~/InvokeAI$ python scripts/invoke.py --precision=float32 ``` ### Features #### Major Features -- [Web Server](docs/features/WEB.md) -- [Interactive Command Line Interface](docs/features/CLI.md) -- [Image To Image](docs/features/IMG2IMG.md) -- [Inpainting Support](docs/features/INPAINTING.md) -- [Outpainting Support](docs/features/OUTPAINTING.md) -- [Upscaling, face-restoration and outpainting](docs/features/POSTPROCESS.md) -- [Seamless Tiling](docs/features/OTHER.md#seamless-tiling) -- [Google Colab](docs/features/OTHER.md#google-colab) -- [Reading Prompts From File](docs/features/PROMPTS.md#reading-prompts-from-a-file) -- [Shortcut: Reusing Seeds](docs/features/OTHER.md#shortcuts-reusing-seeds) -- [Prompt Blending](docs/features/PROMPTS.md#prompt-blending) -- [Thresholding and Perlin Noise Initialization Options](/docs/features/OTHER.md#thresholding-and-perlin-noise-initialization-options) -- [Negative/Unconditioned Prompts](docs/features/PROMPTS.md#negative-and-unconditioned-prompts) -- [Variations](docs/features/VARIATIONS.md) -- [Personalizing Text-to-Image Generation](docs/features/TEXTUAL_INVERSION.md) -- [Simplified API for text to image generation](docs/features/OTHER.md#simplified-api) +- [Web Server](https://invoke-ai.github.io/InvokeAI/features/WEB/) +- [Interactive Command Line Interface](https://invoke-ai.github.io/InvokeAI/features/CLI/) +- [Image To Image](https://invoke-ai.github.io/InvokeAI/features/IMG2IMG/) +- [Inpainting Support](https://invoke-ai.github.io/InvokeAI/features/INPAINTING/) +- [Outpainting Support](https://invoke-ai.github.io/InvokeAI/features/OUTPAINTING/) +- [Upscaling, face-restoration and outpainting](https://invoke-ai.github.io/InvokeAI/features/POSTPROCESS/) +- [Reading Prompts From File](https://invoke-ai.github.io/InvokeAI/features/PROMPTS/#reading-prompts-from-a-file) +- [Prompt Blending](https://invoke-ai.github.io/InvokeAI/features/PROMPTS/#prompt-blending) +- [Thresholding and Perlin Noise Initialization Options](https://invoke-ai.github.io/InvokeAI/features/OTHER/#thresholding-and-perlin-noise-initialization-options) +- [Negative/Unconditioned Prompts](https://invoke-ai.github.io/InvokeAI/features/PROMPTS/#negative-and-unconditioned-prompts) +- [Variations](https://invoke-ai.github.io/InvokeAI/features/VARIATIONS/) +- [Personalizing Text-to-Image Generation](https://invoke-ai.github.io/InvokeAI/features/TEXTUAL_INVERSION/) +- [Simplified API for text to image generation](https://invoke-ai.github.io/InvokeAI/features/OTHER/#simplified-api) #### Other Features -- [Creating Transparent Regions for Inpainting](docs/features/INPAINTING.md#creating-transparent-regions-for-inpainting) -- [Preload Models](docs/features/OTHER.md#preload-models) +- [Google Colab](https://invoke-ai.github.io/InvokeAI/features/OTHER/#google-colab) +- [Seamless Tiling](https://invoke-ai.github.io/InvokeAI/features/OTHER/#seamless-tiling) +- [Shortcut: Reusing Seeds](https://invoke-ai.github.io/InvokeAI/features/OTHER/#shortcuts-reusing-seeds) +- [Preload Models](https://invoke-ai.github.io/InvokeAI/features/OTHER/#preload-models) ### Latest Changes @@ -144,33 +143,33 @@ you can try starting `invoke.py` with the `--precision=float32` flag: - `dream.py` script renamed `invoke.py`. A `dream.py` script wrapper remains for backward compatibility. - Completely new WebGUI - launch with `python3 scripts/invoke.py --web` - - Support for inpainting and outpainting + - Support for inpainting and outpainting - img2img runs on all k* samplers - - Support for negative prompts + - Support for negative prompts - Support for CodeFormer face reconstruction - Support for Textual Inversion on Macintoshes - - Support in both WebGUI and CLI for post-processing of previously-generated images + - Support in both WebGUI and CLI for post-processing of previously-generated images using facial reconstruction, ESRGAN upscaling, outcropping (similar to DALL-E infinite canvas), and "embiggen" upscaling. See the `!fix` command. - - New `--hires` option on `invoke>` line allows larger images to be created without duplicating elements, at the cost of some performance. + - New `--hires` option on `invoke>` line allows larger images to be created without duplicating elements, at the cost of some performance. - New `--perlin` and `--threshold` options allow you to add and control variation during image generation (see Thresholding and Perlin Noise Initialization - Extensive metadata now written into PNG files, allowing reliable regeneration of images and tweaking of previous settings. - Command-line completion in `invoke.py` now works on Windows, Linux and Mac platforms. - - Improved command-line completion behavior. + - Improved command-line completion behavior. New commands added: - * List command-line history with `!history` - * Search command-line history with `!search` - * Clear history with `!clear` + - List command-line history with `!history` + - Search command-line history with `!search` + - Clear history with `!clear` - 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`. -For older changelogs, please visit the **[CHANGELOG](docs/features/CHANGELOG.md)**. +For older changelogs, please visit the **[CHANGELOG](https://invoke-ai.github.io/InvokeAI/CHANGELOG#v114-11-september-2022)**. ### Troubleshooting -Please check out our **[Q&A](docs/help/TROUBLESHOOT.md)** to get solutions for common installation +Please check out our **[Q&A](https://invoke-ai.github.io/InvokeAI/help/TROUBLESHOOT/#faq)** to get solutions for common installation problems and other issues. # Contributing @@ -188,7 +187,7 @@ changes. ### Contributors This fork is a combined effort of various people from across the world. -[Check out the list of all these amazing people](docs/other/CONTRIBUTORS.md). We thank them for +[Check out the list of all these amazing people](https://invoke-ai.github.io/InvokeAI/other/CONTRIBUTORS/). We thank them for their time, hard work and effort. ### Support @@ -202,4 +201,4 @@ Original portions of the software are Copyright (c) 2020 ### Further Reading Please see the original README for more information on this software and underlying algorithm, -located in the file [README-CompViz.md](docs/other/README-CompViz.md). +located in the file [README-CompViz.md](https://invoke-ai.github.io/InvokeAI/other/README-CompViz/). diff --git a/docs/CHANGELOG.md b/docs/CHANGELOG.md index 556a9d9ace..9b4dfe1cfc 100644 --- a/docs/CHANGELOG.md +++ b/docs/CHANGELOG.md @@ -6,64 +6,64 @@ title: Changelog ## v2.0.1 (13 October 2022) - - fix noisy images at high step count when using k* samplers - - dream.py script now calls invoke.py module directly rather than +- fix noisy images at high step count when using k* samplers +- dream.py script now calls invoke.py module directly rather than via a new python process (which could break the environment) ## v2.0.0 (9 October 2022) - - `dream.py` script renamed `invoke.py`. A `dream.py` script wrapper remains +- `dream.py` script renamed `invoke.py`. A `dream.py` script wrapper remains for backward compatibility. - - Completely new WebGUI - launch with `python3 scripts/invoke.py --web` - - Support for inpainting and outpainting - - img2img runs on all k* samplers - - Support for negative prompts - - Support for CodeFormer face reconstruction - - Support for Textual Inversion on Macintoshes - - Support in both WebGUI and CLI for post-processing of previously-generated images +- Completely new WebGUI - launch with `python3 scripts/invoke.py --web` +- Support for [inpainting](features/INPAINTING.md) and [outpainting](features/OUTPAINTING.md) +- img2img runs on all k* samplers +- Support for [negative prompts](features/PROMPTS.md#negative-and-unconditioned-prompts) +- Support for CodeFormer face reconstruction +- Support for Textual Inversion on Macintoshes +- Support in both WebGUI and CLI for [post-processing of previously-generated images](features/POSTPROCESS.md) using facial reconstruction, ESRGAN upscaling, outcropping (similar to DALL-E infinite canvas), and "embiggen" upscaling. See the `!fix` command. - - New `--hires` option on `invoke>` line allows larger images to be created without duplicating elements, at the cost of some performance. - - New `--perlin` and `--threshold` options allow you to add and control variation - during image generation (see Thresholding and Perlin Noise Initialization - - Extensive metadata now written into PNG files, allowing reliable regeneration of images +- New `--hires` option on `invoke>` line allows [larger images to be created without duplicating elements](features/CLI.md#this-is-an-example-of-txt2img), at the cost of some performance. +- New `--perlin` and `--threshold` options allow you to add and control variation + during image generation (see [Thresholding and Perlin Noise Initialization](features/OTHER.md#thresholding-and-perlin-noise-initialization-options)) +- Extensive metadata now written into PNG files, allowing reliable regeneration of images and tweaking of previous settings. - - Command-line completion in `invoke.py` now works on Windows, Linux and Mac platforms. - - Improved command-line completion behavior. +- Command-line completion in `invoke.py` now works on Windows, Linux and Mac platforms. +- Improved [command-line completion behavior](features/CLI.md) New commands added: - * List command-line history with `!history` - * Search command-line history with `!search` - * Clear history with `!clear` - - Deprecated `--full_precision` / `-F`. Simply omit it and `invoke.py` will auto + - List command-line history with `!history` + - Search command-line history with `!search` + - Clear history with `!clear` +- 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) - - Memory optimizations for small-RAM cards. 512x512 now possible on 4 GB GPUs. - - Full support for Apple hardware with M1 or M2 chips. - - Add "seamless mode" for circular tiling of image. Generates beautiful effects. +- Memory optimizations for small-RAM cards. 512x512 now possible on 4 GB GPUs. +- Full support for Apple hardware with M1 or M2 chips. +- Add "seamless mode" for circular tiling of image. Generates beautiful effects. ([prixt](https://github.com/prixt)). - - Inpainting support. - - Improved web server GUI. - - Lots of code and documentation cleanups. +- Inpainting support. +- Improved web server GUI. +- Lots of code and documentation cleanups. ## v1.13 (3 September 2022) - - Support image variations (see [VARIATIONS](features/VARIATIONS.md) +- Support image variations (see [VARIATIONS](features/VARIATIONS.md) ([Kevin Gibbons](https://github.com/bakkot) and many contributors and reviewers) - - Supports a Google Colab notebook for a standalone server running on Google hardware +- Supports a Google Colab notebook for a standalone server running on Google hardware [Arturo Mendivil](https://github.com/artmen1516) - - WebUI supports GFPGAN/ESRGAN facial reconstruction and upscaling +- WebUI supports GFPGAN/ESRGAN facial reconstruction and upscaling [Kevin Gibbons](https://github.com/bakkot) - - WebUI supports incremental display of in-progress images during generation +- WebUI supports incremental display of in-progress images during generation [Kevin Gibbons](https://github.com/bakkot) - - A new configuration file scheme that allows new models (including upcoming +- A new configuration file scheme that allows new models (including upcoming stable-diffusion-v1.5) to be added without altering the code. ([David Wager](https://github.com/maddavid12)) - - Can specify --grid on invoke.py command line as the default. - - Miscellaneous internal bug and stability fixes. - - Works on M1 Apple hardware. - - Multiple bug fixes. +- Can specify --grid on invoke.py command line as the default. +- Miscellaneous internal bug and stability fixes. +- Works on M1 Apple hardware. +- Multiple bug fixes. --- @@ -88,7 +88,7 @@ title: Changelog Seed memory only extends back to the previous command, but will work on all images generated with the -n# switch. - Variant generation support temporarily disabled pending more general solution. - Created a feature branch named **yunsaki-morphing-invoke** which adds experimental support for - iteratively modifying the prompt and its parameters. Please see[ Pull Request #86](https://github.com/lstein/stable-diffusion/pull/86) + iteratively modifying the prompt and its parameters. Please see[Pull Request #86](https://github.com/lstein/stable-diffusion/pull/86) for a synopsis of how this works. Note that when this feature is eventually added to the main branch, it will may be modified significantly. diff --git a/docs/assets/outpainting/curly-outcrop-2.png b/docs/assets/outpainting/curly-outcrop-2.png new file mode 100644 index 0000000000..595f011f27 Binary files /dev/null and b/docs/assets/outpainting/curly-outcrop-2.png differ diff --git a/docs/features/CHANGELOG.md b/docs/features/CHANGELOG.md deleted file mode 100644 index 80ec5cf3a2..0000000000 --- a/docs/features/CHANGELOG.md +++ /dev/null @@ -1,143 +0,0 @@ ---- -title: Changelog ---- - -# :octicons-log-16: Changelog - -## v1.13 - -- Supports a Google Colab notebook for a standalone server running on Google - hardware [Arturo Mendivil](https://github.com/artmen1516) -- WebUI supports GFPGAN/ESRGAN facial reconstruction and upscaling - [Kevin Gibbons](https://github.com/bakkot) -- WebUI supports incremental display of in-progress images during generation - [Kevin Gibbons](https://github.com/bakkot) -- Output directory can be specified on the invoke> command line. -- The grid was displaying duplicated images when not enough images to fill the - final row [Muhammad Usama](https://github.com/SMUsamaShah) -- Can specify --grid on invoke.py command line as the default. -- Miscellaneous internal bug and stability fixes. - ---- - -## v1.12 (28 August 2022) - -- Improved file handling, including ability to read prompts from standard input. - (kudos to [Yunsaki](https://github.com/yunsaki) -- The web server is now integrated with the invoke.py script. Invoke by adding - --web to the invoke.py command arguments. -- Face restoration and upscaling via GFPGAN and Real-ESGAN are now automatically - enabled if the GFPGAN directory is located as a sibling to Stable Diffusion. - VRAM requirements are modestly reduced. Thanks to both - [Blessedcoolant](https://github.com/blessedcoolant) and - [Oceanswave](https://github.com/oceanswave) for their work on this. -- You can now swap samplers on the invoke> command line. - [Blessedcoolant](https://github.com/blessedcoolant) - ---- - -## v1.11 (26 August 2022) - -- 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. Seed memory only extends - back to the previous command, but will work on all images generated with the - -n# switch. -- Variant generation support temporarily disabled pending more general solution. -- Created a feature branch named **yunsaki-morphing-invoke** which adds - experimental support for iteratively modifying the prompt and its parameters. - Please - see[ Pull Request #86](https://github.com/lstein/stable-diffusion/pull/86) for - a synopsis of how this works. Note that when this feature is eventually added - to the main branch, it will may be modified significantly. - ---- - -## v1.10 (25 August 2022) - -- A barebones but fully functional interactive web server for online generation - of txt2img and img2img. - ---- - -## v1.09 (24 August 2022) - -- A new -v option allows you to generate multiple variants of an initial image - in img2img mode. (kudos to [Oceanswave](https://github.com/Oceanswave). -- [See this discussion in the PR for examples and details on use](https://github.com/lstein/stable-diffusion/pull/71#issuecomment-1226700810)) -- Added ability to personalize text to image generation (kudos to - [Oceanswave](https://github.com/Oceanswave) and - [nicolai256](https://github.com/nicolai256)) -- Enabled all of the samplers from k_diffusion - ---- - -## v1.08 (24 August 2022) - -- Escape single quotes on the invoke> command before trying to parse. This avoids - parse errors. -- Removed instruction to get Python3.8 as first step in Windows install. - Anaconda3 does it for you. -- Added bounds checks for numeric arguments that could cause crashes. -- Cleaned up the copyright and license agreement files. - ---- - -## v1.07 (23 August 2022) - -- 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) - -- 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) - -- Filenames now use the following formats: 000010.95183149.png -- Two files - produced by the same command (e.g. -n2), 000010.26742632.png -- distinguished - by a different seed. - 000011.455191342.01.png -- Two files produced by the same command using - 000011.455191342.02.png -- a batch size>1 (e.g. -b2). They have the same seed. - 000011.4160627868.grid#1-4.png -- a grid of four images (-g); the whole grid - can be regenerated with the indicated key - -- It should no longer be possible for one image to overwrite another -- You can use the "cd" and "pwd" commands at the invoke> prompt to set and - retrieve the path of the output directory. - -## v1.04 (22 August 2022 - after the drop) - -- 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) - -- 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) - -- 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, or an image editor that allows you to - explore the full metadata. **Please run "conda env update -f environment.yaml" - to load the k_lms dependencies!!** - -## v1.01 (21 August 2022) - -- added k_lms sampling. **Please run "conda env update -f environment.yaml" to - load the k_lms dependencies!!** -- use half precision arithmetic by default, resulting in faster execution and - lower memory requirements Pass argument --full_precision to invoke.py to get - slower but more accurate image generation diff --git a/docs/features/CLI.md b/docs/features/CLI.md index 7ce06d1fea..b7f048790a 100644 --- a/docs/features/CLI.md +++ b/docs/features/CLI.md @@ -101,9 +101,7 @@ overridden on a per-prompt basis (see [List of prompt arguments](#list-of-prompt | `--free_gpu_mem` | | `False` | Free GPU memory after sampling, to allow image decoding and saving in low VRAM conditions | | `--precision` | | `auto` | Set model precision, default is selected by device. Options: auto, float32, float16, autocast | -!!! warning deprecated - - These arguments are deprecated but still work: +!!! warning "These arguments are deprecated but still work"