We are pleased to announce a features update to InvokeAI with the release of version 2.3.4.
- What's New
- Installation and Upgrading
- Known Bugs
- Getting Help
- Detailed Change Log
- Acknowledgements
What's New in 2.3.4
This features release adds support for LoRA (Low-Rank Adaptation) and LyCORIS (Lora beYond Conventional) models, as well as some minor bug fixes.
LoRA and LyCORIS Support
LoRA files contain fine-tuning weights that enable particular styles, subjects or concepts to be applied to generated images. LyCORIS files are an extended variant of LoRA. InvokeAI supports the most common LoRA/LyCORIS format, which ends in the suffix .safetensors
. You will find numerous LoRA and LyCORIS models for download at Civitai, and a small but growing number at Hugging Face. Full documentation of LoRA support is available at InvokeAI LoRA Support.( Pre-release note: this page will only be available after release)
To use LoRA/LyCORIS models in InvokeAI:
-
Download the
.safetensors
files of your choice and place in/path/to/invokeai/loras
. This directory was not present in earlier version of InvokeAI but will be created for you the first time you run the command-line or web client. You can also create the directory manually. -
Add
withLora(lora-file,weight)
to your prompts. The weight is optional and will default to 1.0. A few examples, assuming that a LoRA file namedloras/sushi.safetensors
is present:
family sitting at dinner table eating sushi withLora(sushi,0.9)
family sitting at dinner table eating sushi withLora(sushi, 0.75)
family sitting at dinner table eating sushi withLora(sushi)
Multiple withLora()
prompt fragments are allowed. The weight can be arbitrarily large, but the useful range is roughly 0.5 to 1.0. Higher weights make the LoRA's influence stronger. Negative weights are also allowed, which can lead to some interesting effects.
-
Generate as you usually would! If you find that the image is too "crisp" try reducing the overall CFG value or reducing individual LoRA weights. As is the case with all fine-tunes, you'll get the best results when running the LoRA on top of the model similar to, or identical with, the one that was used during the LoRA's training. Don't try to load a SD 1.x-trained LoRA into a SD 2.x model, and vice versa. This will trigger a non-fatal error message and generation will not proceed.
-
You can change the location of the
loras
directory by passing the--lora_directory
option to `invokeai.
New WebUI LoRA and Textual Inversion Buttons
This version adds two new web interface buttons for inserting LoRA and Textual Inversion triggers into the prompt as shown in the screenshot below.
Clicking on one or the other of the buttons will bring up a menu of available LoRA/LyCORIS or Textual Inversion trigger terms. Select a menu item to insert the properly-formatted withLora()
or <textual-inversion>
prompt fragment into the positive prompt. The number in parentheses indicates the number of trigger terms currently in the prompt. You may click the button again and deselect the LoRA or trigger to remove it from the prompt, or simply edit the prompt directly.
Currently terms are inserted into the positive prompt textbox only. However, some textual inversion embeddings are designed to be used with negative prompts. To move a textual inversion trigger into the negative prompt, simply cut and paste it.
By default the Textual Inversion menu only shows locally installed models found at startup time in /path/to/invokeai/embeddings
. However, InvokeAI has the ability to dynamically download and install additional Textual Inversion embeddings from the HuggingFace Concepts Library. You may choose to display the most popular of these (with five or more likes) in the Textual Inversion menu by going to Settings and turning on "Show Textual Inversions from HF Concepts Library." When this option is activated, the locally-installed TI embeddings will be shown first, followed by uninstalled terms from Hugging Face. See The Hugging Face Concepts Library and Importing Textual Inversion files for more information.
Minor features and fixes
This release changes model switching behavior so that the command-line and Web UIs save the last model used and restore it the next time they are launched. It also improves the behavior of the installer so that the pip
utility is kept up to date.
Installation / Upgrading
To install or upgrade to InvokeAI 2.3.4 please download the zip file at the bottom of the release notes (under "Assets"), unpack it, and then double-click to launch the script install.sh
(Macintosh, Linux) or install.bat
(Windows). Alternatively, you can open a command-line window and execute the installation script directly.
To update from versions 2.3.1 or higher, select the "update" option (choice 6) in the invoke.sh
/invoke.bat
launcher script and choose the option to update to 2.3.4. Alternatively, you may use the installer zip file to update. When it asks you to confirm the location of the invokeai
directory, type in the path to the directory you are already using, if not the same as the one selected automatically by the installer. When the installer asks you to confirm that you want to install into an existing directory, simply indicate "yes".
Developers and power users can upgrade to the current version by activating the InvokeAI environment and then using pip install --use-pep517 --upgrade InvokeAI
. You may specify a particular version by adding the version number to the command, as in InvokeAI==2.3.4
. To upgrade to an xformers
version if you are not currently using xformers
, use pip install --use-pep517 --upgrade InvokeAI[xformers]
. You can see which versions are available by going to The PyPI InvokeAI Project Page (Pre-release note: this will only work after the official release.)
Known Bugs in 2.3.4
These are known bugs in the release.
- The Ancestral DPMSolverMultistepScheduler (
k_dpmpp_2a
) sampler is not yet implemented fordiffusers
models and will disappear from the WebUI Sampler menu when adiffusers
model is selected. - Windows Defender will sometimes raise Trojan or backdoor alerts for the
codeformer.pth
face restoration model, as well as theCIDAS/clipseg
andrunwayml/stable-diffusion-v1.5
models. These are false positives and can be safely ignored. InvokeAI performs a malware scan on all models as they are loaded. For additional security, you should use safetensors models whenever they are available.
Getting Help
Please see the InvokeAI Issues Board or the InvokeAI Discord for assistance from the development team.
Change Log
- [FEATURE] Lora support in 2.3 by @lstein in #3072
- [FEATURE] LyCORIS support in 2.3 by @StAlKeR7779 in #3118
- [Bugfix] Pip - Access is denied durring installation by @StAlKeR7779 in #3123
- ui: translations update from weblate by @weblate in #2804
- [Enhancement] save name of last model to disk whenever model changes by @lstein in #3102
New Contributors and Acknowledgements
- @felorhik contributed the vast bulk of the LoRA implementation in #2712
- @felorhik, @neecapp, and @StAlKeR7779 (Sergey Borisov) all contributed to the v2.3 backport in #3072
- @StAlKeR7779 (Sergey Borisov) contributed LyCORIS support in #3118, plus multiple bugfixes to the LoRA manager.
Many thanks to these individuals, as well as @blessedcoolant and @damian0815 for their contributions to this release.
Full Changelog: v2.3.3...v2.3.4rc1