Commit Graph

2360 Commits

Author SHA1 Message Date
Kevin Turner
70f8793700
Merge branch 'main' into feat/import-with-vae 2023-01-23 00:17:46 -08:00
Kevin Turner
ea61bf2c94
[bugfix] ckpt conversion script respects cache in ~/invokeai/models (#2395) 2023-01-23 00:07:23 -08:00
Lincoln Stein
ffcc5ad795 conversion script uses invokeai models cache by default 2023-01-23 00:35:16 -05:00
Kevin Turner
89791d91e8
fix: use pad_token for padding (#2381)
Stable Diffusion 2 does not use eos_token for padding.

Fixes #2378
2023-01-21 13:30:03 -08:00
Kevin Turner
87f3da92e9
Merge branch 'main' into fix/sd2-padding-token 2023-01-21 13:11:02 -08:00
Lincoln Stein
f169bb0020
fix long prompt weighting bug in ckpt codepath (#2382) 2023-01-21 15:14:14 -05:00
Damian Stewart
155efadec2
Merge branch 'main' into fix/sd2-padding-token 2023-01-21 21:05:40 +01:00
Damian Stewart
e94c8fa285 fix long prompt weighting bug in ckpt codepath 2023-01-21 12:08:21 +01:00
Lincoln Stein
b3363a934d
Update index.md (#2377) 2023-01-21 00:17:23 -05:00
Lincoln Stein
599c558c87
Merge branch 'main' into patch-1 2023-01-20 23:54:40 -05:00
Kevin Turner
d35ec3398d fix: use pad_token for padding
Stable Diffusion does not use the eos_token for padding.
2023-01-20 19:25:20 -08:00
Lincoln Stein
96a900d1fe correctly import diffusers models by their local path
- Corrects a bug in which the local path was treated as a repo_id
2023-01-20 20:13:43 -05:00
Lincoln Stein
f00f7095f9
Add instructions for installing xFormers on linux (#2360)
I've written up the install procedure for xFormers on Linux systems.

I need help with the Windows install; I don't know what the build
dependencies (compiler, etc) are. This section of the docs is currently
empty.

Please see `docs/installation/070_INSTALL_XFORMERS.md`
2023-01-20 17:57:12 -05:00
Lincoln Stein
279ffcfe15
Merge branch 'main' into lstein/xformers-instructions 2023-01-20 17:29:39 -05:00
Lincoln Stein
9b73292fcb add pip install documentation for xformers 2023-01-20 17:28:14 -05:00
michaelk71
da81165a4b
Update index.md 2023-01-20 19:03:12 +01:00
Lincoln Stein
f3ff386491
[enhancement] Reorganize form for textual inversion training (#2375)
- Add num_train_epochs
- Reorganize widgets so all sliders that control # of steps are together
2023-01-20 10:58:26 -05:00
Lincoln Stein
da524f159e
Merge branch 'main' into feat/enhance-ti-training-ui 2023-01-20 10:28:27 -05:00
Lincoln Stein
2d1eeec063
Save HFToken only if it is present (#2370)
Fixes https://github.com/invoke-ai/InvokeAI/issues/2083
2023-01-19 22:16:19 -05:00
Nicholas Koh
a8bb1a1109 Save HFToken only if it is present 2023-01-19 21:47:27 -05:00
Lincoln Stein
d9fa505412
[feat] Provide option to disable xformers from command line (#2373)
Starting `invoke.py` with --no-xformers will disable
memory-efficient-attention support if xformers is installed.

For symmetry, `--xformers` will enable support, but this is already the
default if xformers is available.
2023-01-19 19:15:57 -05:00
Lincoln Stein
02ce602a38
Merge branch 'main' into feat/disable-xformers 2023-01-19 18:45:59 -05:00
Lincoln Stein
9b1843307b [enhancement] Reorganize form for textual inversion training
- Add num_train_epochs
- Reorganize widgets so all sliders that control # of steps are together
2023-01-19 18:43:12 -05:00
Lincoln Stein
d113b4ad41
[bugfix] suppress extraneous warning messages generated by diffusers (#2374)
This commit suppresses a few irrelevant warning messages that the
diffusers module produces:

1. The warning that turning off the NSFW detector makes you an
irresponsible person.
2. Warnings about running fp16 models stored in CPU (we are not running
them in CPU, just caching them in CPU RAM)
2023-01-19 18:00:31 -05:00
Lincoln Stein
895505976e [bugfix] suppress extraneous warning messages generated by diffusers
This commit suppresses a few irrelevant warning messages that the
diffusers module produces:

1. The warning that turning off the NSFW detector makes you an
irresponsible person.
2. Warnings about running fp16 models stored in CPU (we are not running
   them in CPU, just caching them in CPU RAM)
2023-01-19 16:49:40 -05:00
Lincoln Stein
171f4aa71b [feat] Provide option to disable xformers from command line
Starting `invoke.py` with --no-xformers will disable
memory-efficient-attention support if xformers is installed.

--xformers will enable support, but this is already the
default.
2023-01-19 16:16:35 -05:00
Lincoln Stein
33a5c83c74 during ckpt->diffusers tell user when custom autoencoder can't be loaded
- When a ckpt or safetensors file uses an external autoencoder and we
  don't know which diffusers model corresponds to this (if any!), then
  we fallback to using stabilityai/sd-vae-ft-mse
- This commit improves error reporting so that user knows what is happening.
2023-01-19 12:05:49 -05:00
Lincoln Stein
7ee0edcb9e when converting a ckpt/safetensors model, preserve vae in diffusers config
- After successfully converting a ckt file to diffusers, model_manager
  will attempt to create an equivalent 'vae' entry to the resulting
  diffusers stanza.

- This is a bit of a hack, as it relies on a hard-coded dictionary
  to map ckpt VAEs to diffusers VAEs. The correct way to do this
  would be to convert the VAE to a diffusers model and then point
  to that. But since (almost) all models are using vae-ft-mse-840000-ema-pruned,
  I did it the easy way first and will work on the better solution later.
2023-01-19 11:02:49 -05:00
Lincoln Stein
7bd2220a24 fix two bugs in model import
1. !import_model did not allow user to specify VAE file. This is now fixed.
2. !del_model did not offer the user the opportunity to delete the underlying
   weights file or diffusers directory. This is now fixed.
2023-01-19 01:30:58 -05:00
Lincoln Stein
284b432ffd add triton install instructions 2023-01-18 22:34:36 -05:00
Lincoln Stein
e11f15cf78 Merge branch 'main' into lstein-import-safetensors 2023-01-18 17:09:48 -05:00
Lincoln Stein
ce17051b28
Store & load 🤗 models at XDG_CACHE_HOME if HF_HOME is not set (#2359)
This commit allows InvokeAI to store & load 🤗 models at a location set
by `XDG_CACHE_HOME` environment variable if `HF_HOME` is not set.

By integrating this commit, a user who either use `HF_HOME` or
`XDG_CACHE_HOME` environment variables in their environment can let
InvokeAI to reuse the existing cache directory used by 🤗 library by
default. I happened to benefit from this commit because I have a Jupyter
Notebook that uses 🤗 diffusers model stored at `XDG_CACHE_HOME`
directory.

Reference:
https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#xdgcachehome
2023-01-18 17:05:06 -05:00
Lincoln Stein
a2bdc8b579 Merge branch 'lstein-import-safetensors' of github.com:invoke-ai/InvokeAI into lstein-import-safetensors 2023-01-18 12:16:06 -05:00
Lincoln Stein
1c62ae461e fix vae safetensor loading 2023-01-18 12:15:57 -05:00
Lincoln Stein
c5b802b596
Merge branch 'main' into feature/hub-in-xdg-cache-home 2023-01-18 11:53:46 -05:00
Lincoln Stein
b9ab9ffb4a
Merge branch 'main' into lstein-import-safetensors 2023-01-18 10:58:38 -05:00
Lincoln Stein
f232068ab8
Update automated install doc - link to MS C libs (#2306)
Updated the link for the MS Visual C libraries - I'm not sure if MS
changed the location of the files but this new one leads right to the
file downloads.
2023-01-18 10:56:09 -05:00
Lincoln Stein
4556f29359
Merge branch 'main' into lstein/xformers-instructions 2023-01-18 09:33:17 -05:00
Lincoln Stein
c1521be445 add instructions for installing xFormers on linux 2023-01-18 09:31:19 -05:00
Daya Adianto
f3e952ecf0
Use global_cache_dir calls properly 2023-01-18 21:06:01 +07:00
Daya Adianto
aa4e8d8cf3
Migrate legacy models (pre-2.3.0) to 🤗 cache directory if exists 2023-01-18 21:02:31 +07:00
Daya Adianto
2282e681f7
Store & load 🤗 models at XDG_CACHE_HOME if HF_HOME is not set
This commit allows InvokeAI to store & load 🤗 models at a location
set by `XDG_CACHE_HOME` environment variable if `HF_HOME` is not set.

Reference: https://huggingface.co/docs/huggingface_hub/main/en/package_reference/environment_variables#xdgcachehome
2023-01-18 19:32:09 +07:00
Lincoln Stein
6e2365f835
Merge branch 'main' into patch-1 2023-01-17 23:52:13 -05:00
Lincoln Stein
e4ea98c277
further improvements to initial load (#2330)
- Migration process will not crash if duplicate model files are found,
one in legacy location and the other in new location. The model in the
legacy location will be deleted in this case.

- Added a hint to stable-diffusion-2.1 telling people it will work best
with 768 pixel images.

- Added the anything-4.0 model.
2023-01-17 23:21:14 -05:00
Lincoln Stein
2fd5fe6c89
Merge branch 'main' into lstein-improve-migration 2023-01-17 22:55:58 -05:00
Lincoln Stein
4a9e93463d Merge branch 'lstein-import-safetensors' of github.com:invoke-ai/InvokeAI into lstein-import-safetensors 2023-01-17 22:52:50 -05:00
Lincoln Stein
0b5c0c374e load safetensors vaes 2023-01-17 22:51:57 -05:00
Lincoln Stein
5750f5dac2
Merge branch 'main' into lstein-import-safetensors 2023-01-17 21:31:56 -05:00
Kevin Turner
3fb095de88
do not use autocast for diffusers (#2349)
fixes #2345
2023-01-17 14:26:35 -08:00
Lincoln Stein
c5fecfe281
Merge branch 'main' into lstein-improve-migration 2023-01-17 17:05:12 -05:00