5f76b62553
# Make InvokeAI package installable by mere mortals This commit makes InvokeAI 3.0 to be installable via PyPi.org and/or the installer script. The install process is now pretty much identical to the 2.3 process, including creating launcher scripts `invoke.sh` and `invoke.bat`. Main changes: 1. Moved static web pages into `invokeai/frontend/web` and modified the API to look for them there. This allows pip to copy the files into the distribution directory so that user no longer has to be in repo root to launch, and enables PyPi installations with `pip install invokeai` 2. Update invoke.sh and invoke.bat to launch the new web application properly. This also changes the wording for launching the CLI from "generate images" to "explore the InvokeAI node system," since I would not recommend using the CLI to generate images routinely. 3. Fix a bug in the checkpoint converter script that was identified during testing. 4. Better error reporting when checkpoint converter fails. 5. Rebuild front end. # Major improvements to the model installer. 1. The text user interface for `invokeai-model-install` has been expanded to allow the user to install controlnet, LoRA, textual inversion, diffusers and checkpoint models. The user can install interactively (without leaving the TUI), or in batch mode after exiting the application. ![image](https://github.com/invoke-ai/InvokeAI/assets/111189/f8f7ac23-3e18-4973-b7fe-729864c703a0) 2. The `invokeai-model-install` command now lets you list, add and delete models from the command line: ## Listing models ``` $ invokeai-model-install --list diffusers Diffuser models: analog-diffusion-1.0 not loaded diffusers An SD-1.5 model trained on diverse analog photographs (2.13 GB) d&d-diffusion-1.0 not loaded diffusers Dungeons & Dragons characters (2.13 GB) deliberate-1.0 not loaded diffusers Versatile model that produces detailed images up to 768px (4.27 GB) DreamShaper not loaded diffusers Imported diffusers model DreamShaper sd-inpainting-1.5 not loaded diffusers RunwayML SD 1.5 model optimized for inpainting, diffusers version (4.27 GB) sd-inpainting-2.0 not loaded diffusers Stable Diffusion version 2.0 inpainting model (5.21 GB) stable-diffusion-1.5 not loaded diffusers Stable Diffusion version 1.5 diffusers model (4.27 GB) stable-diffusion-2.1 not loaded diffusers Stable Diffusion version 2.1 diffusers model, trained on 768 pixel images (5.21 GB) ``` ``` $ invokeai-model-install --list tis Loading Python libraries... Installed Textual Inversion Embeddings: EasyNegative ahx-beta-453407d ``` ## Installing models (this example shows correct handling of a server side error at Civitai) ``` $ invokeai-model-install --diffusers https://civitai.com/api/download/models/46259 Linaqruf/anything-v3.0 Loading Python libraries... [2023-06-05 22:17:23,556]::[InvokeAI]::INFO --> INSTALLING EXTERNAL MODELS [2023-06-05 22:17:23,557]::[InvokeAI]::INFO --> Probing https://civitai.com/api/download/models/46259 for import [2023-06-05 22:17:23,557]::[InvokeAI]::INFO --> https://civitai.com/api/download/models/46259 appears to be a URL [2023-06-05 22:17:23,763]::[InvokeAI]::ERROR --> An error occurred during downloading /home/lstein/invokeai-test/models/ldm/stable-diffusion-v1/46259: Internal Server Error [2023-06-05 22:17:23,763]::[InvokeAI]::ERROR --> ERROR DOWNLOADING https://civitai.com/api/download/models/46259: {"error":"Invalid database operation","cause":{"clientVersion":"4.12.0"}} [2023-06-05 22:17:23,764]::[InvokeAI]::INFO --> Probing Linaqruf/anything-v3.0 for import [2023-06-05 22:17:23,764]::[InvokeAI]::DEBUG --> Linaqruf/anything-v3.0 appears to be a HuggingFace diffusers repo_id [2023-06-05 22:17:23,768]::[InvokeAI]::INFO --> Loading diffusers model from Linaqruf/anything-v3.0 [2023-06-05 22:17:23,769]::[InvokeAI]::DEBUG --> Using faster float16 precision [2023-06-05 22:17:23,883]::[InvokeAI]::ERROR --> An unexpected error occurred while downloading the model: 404 Client Error. (Request ID: Root=1-647e9733-1b0ee3af67d6ac3456b1ebfc) Revision Not Found for url: https://huggingface.co/Linaqruf/anything-v3.0/resolve/fp16/model_index.json. Invalid rev id: fp16) Downloading (…)ain/model_index.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 511/511 [00:00<00:00, 2.57MB/s] Downloading (…)cial_tokens_map.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 472/472 [00:00<00:00, 6.13MB/s] Downloading (…)cheduler_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 341/341 [00:00<00:00, 3.30MB/s] Downloading (…)okenizer_config.json: 100%|██████████████████████████████████████████████████████████████████████████████████████████████| 807/807 [00:00<00:00, 11.3MB/s] ``` ## Deleting models ``` invokeai-model-install --delete --diffusers anything-v3 Loading Python libraries... [2023-06-05 22:19:45,927]::[InvokeAI]::INFO --> Processing requested deletions [2023-06-05 22:19:45,927]::[InvokeAI]::INFO --> anything-v3... [2023-06-05 22:19:45,927]::[InvokeAI]::INFO --> Deleting the cached model directory for Linaqruf/anything-v3.0 [2023-06-05 22:19:45,948]::[InvokeAI]::WARNING --> Deletion of this model is expected to free 4.3G ``` |
||
---|---|---|
.dev_scripts | ||
.github | ||
coverage | ||
docker | ||
docs | ||
installer | ||
invokeai | ||
notebooks | ||
scripts | ||
tests | ||
.dockerignore | ||
.editorconfig | ||
.git-blame-ignore-revs | ||
.gitattributes | ||
.gitignore | ||
.gitmodules | ||
.prettierrc.yaml | ||
CODE_OF_CONDUCT.md | ||
InvokeAI_Statement_of_Values.md | ||
LICENSE | ||
LICENSE-ModelWeights.txt | ||
mkdocs.yml | ||
pyproject.toml | ||
README.md | ||
shell.nix | ||
Stable_Diffusion_v1_Model_Card.md |
Note: The UI is not fully functional on main
. If you need a stable UI based on main
, use the pre-nodes
tag while we migrate to a new backend.
InvokeAI is a leading creative engine built to empower professionals and enthusiasts alike. Generate and create stunning visual media using the latest AI-driven technologies. InvokeAI offers an industry leading Web Interface, interactive Command Line Interface, and also serves as the foundation for multiple commercial products.
Quick links: [How to Install] [Discord Server] [Documentation and Tutorials] [Code and Downloads] [Bug Reports] [Discussion, Ideas & Q&A]
Note: InvokeAI is rapidly evolving. Please use the Issues tab to report bugs and make feature requests. Be sure to use the provided templates. They will help us diagnose issues faster.
Table of Contents
- Quick Start
- Installation
- Hardware Requirements
- Features
- Latest Changes
- Troubleshooting
- Contributing
- Contributors
- Support
- Further Reading
Getting Started with InvokeAI
For full installation and upgrade instructions, please see: InvokeAI Installation Overview
Automatic Installer (suggested for 1st time users)
-
Go to the bottom of the Latest Release Page
-
Download the .zip file for your OS (Windows/macOS/Linux).
-
Unzip the file.
-
If you are on Windows, double-click on the
install.bat
script. On macOS, open a Terminal window, drag the fileinstall.sh
from Finder into the Terminal, and press return. On Linux, runinstall.sh
. -
You'll be asked to confirm the location of the folder in which to install InvokeAI and its image generation model files. Pick a location with at least 15 GB of free memory. More if you plan on installing lots of models.
-
Wait while the installer does its thing. After installing the software, the installer will launch a script that lets you configure InvokeAI and select a set of starting image generation models.
-
Find the folder that InvokeAI was installed into (it is not the same as the unpacked zip file directory!) The default location of this folder (if you didn't change it in step 5) is
~/invokeai
on Linux/Mac systems, andC:\Users\YourName\invokeai
on Windows. This directory will contain launcher scripts namedinvoke.sh
andinvoke.bat
. -
On Windows systems, double-click on the
invoke.bat
file. On macOS, open a Terminal window, draginvoke.sh
from the folder into the Terminal, and press return. On Linux, runinvoke.sh
-
Press 2 to open the "browser-based UI", press enter/return, wait a minute or two for Stable Diffusion to start up, then open your browser and go to http://localhost:9090.
-
Type
banana sushi
in the box on the top left and clickInvoke
Command-Line Installation (for users familiar with Terminals)
You must have Python 3.9 or 3.10 installed on your machine. Earlier or later versions are not supported.
-
Open a command-line window on your machine. The PowerShell is recommended for Windows.
-
Create a directory to install InvokeAI into. You'll need at least 15 GB of free space:
mkdir invokeai
-
Create a virtual environment named
.venv
inside this directory and activate it:cd invokeai python -m venv .venv --prompt InvokeAI
-
Activate the virtual environment (do it every time you run InvokeAI)
For Linux/Mac users:
source .venv/bin/activate
For Windows users:
.venv\Scripts\activate
-
Install the InvokeAI module and its dependencies. Choose the command suited for your platform & GPU.
For Windows/Linux with an NVIDIA GPU:
pip install "InvokeAI[xformers]" --use-pep517 --extra-index-url https://download.pytorch.org/whl/cu117
For Linux with an AMD GPU:
pip install InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/rocm5.4.2
For non-GPU systems:
pip install InvokeAI --use-pep517 --extra-index-url https://download.pytorch.org/whl/cpu
For Macintoshes, either Intel or M1/M2:
pip install InvokeAI --use-pep517
-
Configure InvokeAI and install a starting set of image generation models (you only need to do this once):
invokeai-configure
-
Launch the web server (do it every time you run InvokeAI):
invokeai --web
-
Point your browser to http://localhost:9090 to bring up the web interface.
-
Type
banana sushi
in the box on the top left and clickInvoke
.
Be sure to activate the virtual environment each time before re-launching InvokeAI,
using source .venv/bin/activate
or .venv\Scripts\activate
.
Detailed Installation Instructions
This fork is supported across Linux, Windows and Macintosh. Linux users can use either an Nvidia-based card (with CUDA support) or an AMD card (using the ROCm driver). For full installation and upgrade instructions, please see: InvokeAI Installation Overview
Hardware Requirements
InvokeAI is supported across Linux, Windows and macOS. Linux users can use either an Nvidia-based card (with CUDA support) or an AMD card (using the ROCm driver).
System
You will need one of the following:
- An NVIDIA-based graphics card with 4 GB or more VRAM memory.
- An Apple computer with an M1 chip.
- An AMD-based graphics card with 4GB or more VRAM memory. (Linux only)
We do not recommend the GTX 1650 or 1660 series video cards. They are unable to run in half-precision mode and do not have sufficient VRAM to render 512x512 images.
Memory
- At least 12 GB Main Memory RAM.
Disk
- At least 12 GB of free disk space for the machine learning model, Python, and all its dependencies.
Features
Feature documentation can be reviewed by navigating to the InvokeAI Documentation page
Web Server & UI
InvokeAI offers a locally hosted Web Server & React Frontend, with an industry leading user experience. The Web-based UI allows for simple and intuitive workflows, and is responsive for use on mobile devices and tablets accessing the web server.
Unified Canvas
The Unified Canvas is a fully integrated canvas implementation with support for all core generation capabilities, in/outpainting, brush tools, and more. This creative tool unlocks the capability for artists to create with AI as a creative collaborator, and can be used to augment AI-generated imagery, sketches, photography, renders, and more.
Advanced Prompt Syntax
InvokeAI's advanced prompt syntax allows for token weighting, cross-attention control, and prompt blending, allowing for fine-tuned tweaking of your invocations and exploration of the latent space.
Command Line Interface
For users utilizing a terminal-based environment, or who want to take advantage of CLI features, InvokeAI offers an extensive and actively supported command-line interface that provides the full suite of generation functionality available in the tool.
Other features
- Support for both ckpt and diffusers models
- SD 2.0, 2.1 support
- Noise Control & Tresholding
- Popular Sampler Support
- Upscaling & Face Restoration Tools
- Embedding Manager & Support
- Model Manager & Support
Coming Soon
- Node-Based Architecture & UI
- And more...
Latest Changes
For our latest changes, view our Release Notes and the CHANGELOG.
Troubleshooting
Please check out our Q&A to get solutions for common installation problems and other issues.
Contributing
Anyone who wishes to contribute to this project, whether documentation, features, bug fixes, code cleanup, testing, or code reviews, is very much encouraged to do so.
To join, just raise your hand on the InvokeAI Discord server (#dev-chat) or the GitHub discussion board.
If you'd like to help with translation, please see our translation guide.
If you are unfamiliar with how to contribute to GitHub projects, here is a Getting Started Guide. A full set of contribution guidelines, along with templates, are in progress. You can make your pull request against the "main" branch.
We hope you enjoy using our software as much as we enjoy creating it, and we hope that some of those of you who are reading this will elect to become part of our community.
Welcome to InvokeAI!
Contributors
This fork is a combined effort of various people from across the world. Check out the list of all these amazing people. We thank them for their time, hard work and effort.
Thanks to Weblate for generously providing translation services to this project.
Support
For support, please use this repository's GitHub Issues tracking service, or join the Discord.
Original portions of the software are Copyright (c) 2023 by respective contributors.