Commit Graph

2473 Commits

Author SHA1 Message Date
37bcf9cc47 this small fix adds back the load_models.py script
- fixes broken setup.py in current dev
- it is just an alias for configure_invokeai.py
- preload_models.py will be deprecated, but for now
  it is a second alias
2022-11-22 11:21:04 -05:00
0340d9ad53 fix(install): more fixes
- install scripts:
   - allow EN-abling pip cache (use 'use-cache' as an arg to the install script)
   - debug message showing which sourceball we're downloading
   - add 'wheel' to pip update, so we can speed up installs from source (and quiet deprecations)
- install.sh: use absolute path for micromamba
- setup.py:
  - fill 'install_requires' using 'requirements.in'
  - fix 'load_models' script name
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-11-22 11:06:50 -05:00
0d35a67e9c fix run-breaking typo (#1532) 2022-11-22 14:27:23 +01:00
1260e28d94 fix typo 2022-11-22 14:21:15 +01:00
229f782e3b check the function signatures and add some easy annotations
Signed-off-by: devops117 <55235206+devops117@users.noreply.github.com>
2022-11-22 08:14:58 -05:00
c15b839dd4 remove additional newline from the textwrap.dedent string
Signed-off-by: devops117 <55235206+devops117@users.noreply.github.com>
2022-11-22 08:14:58 -05:00
a095214e52 cleanup ldm/invoke/model_cache.py
remove duplicate import: os
ldm.util.ask_user is imported only once now
introduce textwrap and contextlib packages to clean up the code
return, returns None implicitly so it is omitted
a function returns None by default so it is omitted
dict.get returns None by default if the value is not found so it is omitted
type of True is a bool and if the module only returns True then it should not return anything in the first place
added some indentations and line breaks to further improve readability

Signed-off-by: devops117 <55235206+devops117@users.noreply.github.com>
2022-11-22 08:14:58 -05:00
8e81425e89 fix outcropping crash when png has no InvokeAI metadata
- Closes #1461
2022-11-21 16:35:00 -05:00
c5cbe8f87d When doing -t/--log_tokenization, also log prompt parser output (#1529)
The log was deleted at some point, this brings it back when user does
`--log_tokenization`/`-t`
2022-11-21 19:37:55 +01:00
e0581a2c37 when doing --log_tokenization/-t also log parsed prompt 2022-11-21 19:27:44 +01:00
32f538bf3a fix another place where rename() should be replace() 2022-11-21 08:44:26 -05:00
3c5a14a814 fixes configure_invokeai.py crash on Windows systems
The step in which the new models.yaml file replaces the old one was
crashing on Windows due to the fact that on Windows, the os.rename()
function will refuse to replace an existing file, unlike the behavior
on Linux and Mac. The os.replace() function, which was introduced in
python3, supposedly fixes this.
2022-11-21 08:44:26 -05:00
0661256b61 Merge branch 'interactive-configuration' into development 2022-11-20 23:32:28 +00:00
602e35db65 Fix issues with '.' not being consisent when run using web gui. 2022-11-20 18:22:13 -05:00
bc7ece771d instead linking modelfile use custom models.yaml 2022-11-20 18:21:34 -05:00
38bdb440d0 remove several debugging messages
- dangling debug messages in several files, introduced during
  testing of the external root directory
- these need to be removed before they are interpreted as errors by users
2022-11-20 18:20:40 -05:00
ce8c2bea2f fix(install): load_models needs to be absolutely last
setup.py: Put in the name of the *product*, not the project

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-11-20 12:23:20 -05:00
3ac0f11e97 toil(invoke): more meaningful messaging
Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-11-20 12:23:20 -05:00
98fe49cb55 hotfix(unified install): last minute changes missing from PR #1506
'requirements.in':
  - add picklescan
  - finally find a good compromise for torch (==1.12.0) and
    torchvision (==0.13.0) across all platforms
'invoke.sh: hotfix for MacOS - add `export PYTORCH_ENABLE_MPS_FALLBACK=1`

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-11-20 12:23:20 -05:00
2b7e3abe57 fix(args): fix INITFILE spelling (#1518)
fixes #1516
2022-11-20 01:45:27 +01:00
150c4a5d2d fix(args): fix INITFILE spelling 2022-11-19 12:01:02 -08:00
0381a853b5 add interactive configuration to the model loader
- Loader is renamed `configure_invokeai.py`, but `preload_models.py` is retained
  (as a shell) for backward compatibility

- At startup, if no runtime root directory exists and no `.invokeai` startup file is
  present, user will be prompted to select the runtime and outputs directories.

- Also expanded the number of initial models offered to the user to include the
  most "liked" ones from HuggingFace, including the two trinart models, the
  PaperCut model, and the VoxelArt model.

- Created a configuration file for initial models to be offered to the user, at
  configs/INITIAL_MODELS.yaml
2022-11-19 19:20:28 +00:00
c79ec204ec Fixed default --embiggen_strength to None to avoid it being printed on every run (#1515) 2022-11-19 13:24:11 +01:00
8d3b1582a5 Fixed default to None 2022-11-19 11:50:26 +00:00
5fd7d71a7a remove several debugging messages
- dangling debug messages in several files, introduced during
  testing of the external root directory
- these need to be removed before they are interpreted as errors by users
2022-11-18 21:14:28 +00:00
19e2cff18c Fix micromamba tar command for macOS
Moved the -O from after the file to after the tar command for compatibility with macOS

Signed-off-by: Kevin Coakley <kcoakley@sdsc.edu>
2022-11-18 16:08:17 -05:00
1f0220697b Fix micromamba tar command for macOS
Moved the -O from after the file to after the tar command for compatibility with macOS

Signed-off-by: Kevin Coakley <kcoakley@sdsc.edu>
2022-11-18 15:57:06 -05:00
18ae3949ef fix typo in error message 2022-11-18 20:53:49 +00:00
aa95510444 Merge branch 'development' into create-invokeai-run-directory 2022-11-18 15:27:51 -05:00
f33df25830 address all review comments; needs testing 2022-11-18 15:25:23 -05:00
3a5a8ceba5 Merge branch 'create-invokeai-run-directory' of github.com:/invoke-ai/InvokeAI into create-invokeai-run-directory 2022-11-18 19:35:45 +00:00
a1e5f17d1e realesrgan and facexlib now download models to correct directory
- fix issue in which both realesrgan and facexlib were downloading
  weight files to source directory

- cleaned up status reporting in load_models.py
2022-11-18 19:35:13 +00:00
303431be89 move CLI into its own module 2022-11-18 19:35:10 +00:00
8e9f80cc97 web server runs off runtime directory now 2022-11-18 19:34:28 +00:00
3ad598761c support for wheel building; webserver broken 2022-11-18 19:34:28 +00:00
b4eaf8b751 fix (unified installer): various fixes (#1506)
This list makes it look like there's lot going on for a single commit,
but the changes are actually pretty small

- 'install'/'invoke' scripts:
  - use venv's 'activate' script instead of hacking PATH
- 'deactivate' before exiting, so we don't leave a confusing environment
hanging around
- 'setup.py':
- make 'install_requires" an accurate list of our direct dependencies,
as it should be
  - add more info/details for eventual use in pypi
- 'invoke' scripts: "developer console" invocation simplified/better
logging (it's now *much* more obvious from inspection what the
"developer console" actually *is*)
- 'requirements.in':
- move 'clipseg' package out of installer and into requirements where it
should be
- bump/pin 'accelerate' package to 0.14.0 to bypass torch 1.13 SIGKILL
issue on Windows (prep for when we decide to upgrade)
- pin 'torch' as well as 'torchvision', to reduce pip-compile's
confusion
- notebooks: delete unused/deprecated notebook installer

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-11-18 16:54:00 +01:00
fa608efa11 move CLI into its own module 2022-11-18 06:48:42 +00:00
e9d319bfde ensure web server works with legacy runtime directory 2022-11-18 06:48:14 +00:00
561721aef7 web server runs off runtime directory now 2022-11-18 06:10:52 +00:00
891c0f21d5 web server now observes --root option 2022-11-18 05:00:02 +00:00
8973ce7d47 support for wheel building; webserver broken 2022-11-18 03:21:07 +00:00
51c283ba56 fix(install): various fixes
- 'install'/'invoke' scripts: use venv 'activate' script
- 'setup.py':
  - make  'install_requires" accurate
  - add more details for eventual use in pypi
- 'invoke' scripts: "developer" console invocation simplified/better logging
- requirements:
  - move 'clipseg' package out of installer and into requirements where it should be
  - bump/pin 'accelerate' package to 0.14.0 to bypass torch 1.13 SIGKILL issue on Windows (prep for when we decide to upgrade)
- 'requirements.in': pin torch as well to reduce pip-compile's confusion
- notebooks: delete unused/deprecated notebook installer

Signed-off-by: Ben Alkov <ben.alkov@gmail.com>
2022-11-17 16:35:24 -05:00
7d262fc158 Fix macOS install.sh by patching sysconfig (#1488)
On macOS, patch python sysconfig just before creating the venv so that
extensions (greenlet & grpcio) can build.

Ref https://github.com/indygreg/python-build-standalone/issues/103, in
particular the solution from @alecthomas posted here:
https://github.com/indygreg/python-build-standalone/issues/103#issuecomment-1234942425

To use: checkout, cd into `installer`, run `create_installers.sh`, copy
`InvokeAI-mac.zip` into an empty folder outside of your existing
invokeAI install, unzip it and run `install.sh`.
2022-11-17 22:34:23 +01:00
fdb16000ab add module __init__ files for backend 2022-11-17 19:54:28 +00:00
f62cc7db9d add a ~/.invokeai file the first time we load
- If there is not already a `.invokeai` file in the user's home directory
  the first time invoke.py runs, it will create an empty one with comments
  showing how to customize it.
2022-11-17 10:15:05 -05:00
9fa3e28dd4 Fixed Google Colab requirements URL
Signed-off-by: slashtechno <77907286+slashtechno@users.noreply.github.com>
2022-11-17 10:14:43 -05:00
9200b26f21 Merge branch 'development' into create-invokeai-run-directory 2022-11-16 23:10:46 -05:00
d998b2f806 Add picklescan to env files 2022-11-16 23:02:35 -05:00
ac8a7ff70b Unpin picklescan req and cleanup 2022-11-16 23:02:35 -05:00
2d6e0baa87 Add Model Scanning 2022-11-16 23:02:35 -05:00