Commit Graph

2364 Commits

Author SHA1 Message Date
5344481809 Fix Slider not being able to take typed input 2023-01-24 16:43:29 +13:00
884768c39d Make sure --free_gpu_mem still works when using CKPT-based diffuser model (#2367)
This PR attempts to fix `--free_gpu_mem` option that was not working in
CKPT-based diffuser model after #1583.

I noticed that the memory usage after #1583 did not decrease after
generating an image when `--free_gpu_mem` option was enabled.
It turns out that the option was not propagated into `Generator`
instance, hence the generation will always run without the memory saving
procedure.

This PR also related to #2326. Initially, I was trying to make
`--free_gpu_mem` works on 🤗 diffuser model as well.
In the process, I noticed that InvokeAI will raise an exception when
`--free_gpu_mem` is enabled.
I tried to quickly fix it by simply ignoring the exception and produce a
warning message to user's console.
2023-01-23 21:48:23 -05:00
10c3afef17 Merge branch 'main' into bugfix/free-gpu-mem-diffuser 2023-01-23 21:15:12 -05:00
66babb2e81 Japanese Localization Build 2023-01-24 09:07:29 +13:00
31a967965b Add Japanese Localization 2023-01-24 09:07:29 +13:00
b9c9b947cd update japanese translation 2023-01-24 09:07:29 +13:00
1eee08a070 add Japanese Translation 2023-01-24 09:07:29 +13:00
aca1b61413 [Feature] Add interactive diffusers model merger (#2388)
This PR adds `scripts/merge_fe.py`, which will merge any 2-3 diffusers
models registered in InvokeAI's `models.yaml`, producing a new merged
model that will be registered as well.

Currently this script will only work if all models to be merged are
known by their repo_ids. Local models, including those converted from
ckpt files, will cause a crash due to a bug in the diffusers
`checkpoint_merger.py` code. I have made a PR against
huggingface/diffusers which fixes this:
https://github.com/huggingface/diffusers/pull/2060
2023-01-23 09:27:05 -05:00
e18beaff9c Merge branch 'main' into feat/merge-script 2023-01-23 09:05:38 -05:00
ea61bf2c94 [bugfix] ckpt conversion script respects cache in ~/invokeai/models (#2395) 2023-01-23 00:07:23 -08:00
7dead7696c fixed setup.py to install the new scripts 2023-01-23 00:43:15 -05:00
ffcc5ad795 conversion script uses invokeai models cache by default 2023-01-23 00:35:16 -05:00
48deb3e49d add model merging documentation and launcher script menu entries 2023-01-23 00:20:28 -05:00
6c31225d19 create small module for merge importation logic 2023-01-22 18:07:53 -05:00
f0fe483915 Merge branch 'main' into feat/merge-script 2023-01-21 18:42:40 -05:00
4ee8d104f0 working, but needs diffusers PR to be accepted 2023-01-21 18:39:13 -05:00
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
87f3da92e9 Merge branch 'main' into fix/sd2-padding-token 2023-01-21 13:11:02 -08:00
f169bb0020 fix long prompt weighting bug in ckpt codepath (#2382) 2023-01-21 15:14:14 -05:00
155efadec2 Merge branch 'main' into fix/sd2-padding-token 2023-01-21 21:05:40 +01:00
e94c8fa285 fix long prompt weighting bug in ckpt codepath 2023-01-21 12:08:21 +01:00
b3363a934d Update index.md (#2377) 2023-01-21 00:17:23 -05:00
599c558c87 Merge branch 'main' into patch-1 2023-01-20 23:54:40 -05:00
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
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
279ffcfe15 Merge branch 'main' into lstein/xformers-instructions 2023-01-20 17:29:39 -05:00
9b73292fcb add pip install documentation for xformers 2023-01-20 17:28:14 -05:00
da81165a4b Update index.md 2023-01-20 19:03:12 +01:00
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
da524f159e Merge branch 'main' into feat/enhance-ti-training-ui 2023-01-20 10:28:27 -05:00
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
a8bb1a1109 Save HFToken only if it is present 2023-01-19 21:47:27 -05:00
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
02ce602a38 Merge branch 'main' into feat/disable-xformers 2023-01-19 18:45:59 -05:00
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
f0010919f2 Merge branch 'main' into bugfix/free-gpu-mem-diffuser 2023-01-19 18:03:36 -05:00
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
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
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
284b432ffd add triton install instructions 2023-01-18 22:34:36 -05:00
be58a6bfbc Merge branch 'main' into bugfix/free-gpu-mem-diffuser 2023-01-19 10:21:06 +07:00
5a40aadbee Ensure free_gpu_mem option is passed into the generator (#2326) 2023-01-19 09:57:03 +07:00
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
c5b802b596 Merge branch 'main' into feature/hub-in-xdg-cache-home 2023-01-18 11:53:46 -05:00
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
4556f29359 Merge branch 'main' into lstein/xformers-instructions 2023-01-18 09:33:17 -05:00
c1521be445 add instructions for installing xFormers on linux 2023-01-18 09:31:19 -05:00
f3e952ecf0 Use global_cache_dir calls properly 2023-01-18 21:06:01 +07:00
aa4e8d8cf3 Migrate legacy models (pre-2.3.0) to 🤗 cache directory if exists 2023-01-18 21:02:31 +07:00
a7b2074106 Ignore free_gpu_mem when using 🤗 diffuser model (#2326) 2023-01-18 19:42:11 +07:00