This commit fixes bugs related to the on-the-fly conversion and loading of
legacy checkpoint models built on SD-2.0 base.
- When legacy checkpoints built on SD-2.0 models were converted
on-the-fly using --ckpt_convert, generation would crash with a
precision incompatibility error.
- In addition, broken logic was causing some 2.0-derived ckpt files to
be converted into diffusers and then processed through the legacy
generation routines - not good.
- installer now installs the pretty dialog-based console launcher
- added dialogrc for custom colors
- add updater to download new launcher when users do an update
- Imported V2 legacy models will now autoconvert into diffusers
at load time regardless of setting of --ckpt_convert.
- model manager `heuristic_import()` function now looks for
side-by-side yaml and vae files for custom configuration and VAE
respectively.
Example of this:
illuminati-v1.1.safetensors
illuminati-v1.1.vae.safetensors
illuminati-v1.1.yaml
When the user tries to import `illuminati-v1.1.safetensors`, the yaml
file will be used for its configuration, and the VAE will be used for
its VAE. Conversion to diffusers will happen if needed, and the yaml
file will be used to determine which V2 format (if any) to apply.
- Since 2.3.2 invokeai stores the next PNG file's numeric prefix in a
file named `.next_prefix` in the outputs directory. This avoids the
overhead of doing a directory listing to find out what file number
comes next.
- The code uses advisory locking to prevent corruption of this file in
the event that multiple invokeai's try to access it simultaneously,
but some users have experienced corruption of the file nevertheless.
- This PR addresses the problem by detecting a potentially corrupted
`.next_prefix` file and falling back to the directory listing method.
A fixed version of the file is then written out.
- Closes#3001
Lots of little bugs have been squashed since 2.3.2 and a new minor
point release is imminent. This PR updates the version number in
preparation for a RC.
- `invokeai-batch --invoke` was created a time-stamped logfile with colons in its
name, which is a Windows no-no. This corrects the problem by writing
the timestamp out as "13-06-2023_8-35-10"
- Closes#3005
This PR addresses issues raised by #3008.
1. Update documentation to indicate the correct maximum batch size for
TI training when xformers is and isn't used.
2. Update textual inversion code so that the default for batch size
is aware of xformer availability.
3. Add documentation for how to launch TI with distributed learning.
Two related security fixes:
1. Port #2946 from main to 2.3.2 branch - this closes a hole that
allows a pickle checkpoint file to masquerade as a safetensors
file.
2. Add pickle scanning to the checkpoint to diffusers conversion
script. This will be ported to main in a separate PR.
This commit enhances support for V2 variant (epsilon and v-predict)
import and conversion to diffusers, by prompting the user to select
the proper config file during startup time autoimport as well as
in the invokeai installer script..
This PR ports the `main` PR #2871 to the v2.3 branch. This adjusts
the global diffusers model cache to work with the 0.14 diffusers
layout of placing models in HF_HOME/hub rather than HF_HOME/diffusers.
When a legacy ckpt model was converted into diffusers in RAM, the
built-in NSFW checker was not being disabled, in contrast to models
converted and saved to disk. Because InvokeAI does its NSFW checking
as a separate post-processing step (in order to generate blurred
images rather than black ones), this defeated the
--nsfw and --no-nsfw switches.
This closes#2836 and #2580.
- Crash would occur at the end of this sequence:
- launch CLI
- !convert <URL pointing to a legacy ckpt file>
- Answer "Y" when asked to delete original .ckpt file
- This commit modifies model_manager.heuristic_import()
to silently delete the downloaded legacy file after
it has been converted into a diffusers model. The user
is no longer asked to approve deletion.
NB: This should be cherry-picked into main once refactor
is done.