mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
5347c12fed
20 Commits
Author | SHA1 | Message | Date | |
---|---|---|---|---|
Lincoln Stein
|
9b157b6532 |
fix several issues with Windows installs
1. resize installer window to give more room for configure and download forms 2. replace '\' with '/' in directory names to allow user to drag-and-drop folders into the dialogue boxes that accept directories. 3. similar change in CLI for the !import_model and !convert_model commands 4. better error reporting when a model download fails due to network errors 5. put the launcher scripts into a loop so that menu reappears after invokeai, merge script, etc exits. User can quit with "Q". 6. do not try to download fp16 of sd-ft-mse-vae, since it doesn't exist. 7. cleaned up status reporting when installing models |
||
Lincoln Stein
|
fff41a7349 | merged with main | ||
Lincoln Stein
|
9d8236c59d |
tested and working on Ubuntu
- You can now achieve several effects: `invokeai-configure` This will use console-based UI to initialize invokeai.init, download support models, and choose and download SD models `invokeai-configure --yes` Without activating the GUI, populate invokeai.init with default values, download support models and download the "recommended" SD models `invokeai-configure --default_only` As above, but only download the default SD model (currently SD-1.5) `invokeai-model-install` Select and install models. This can be used to download arbitrary models from the Internet, install HuggingFace models using their repo_id, or watch a directory for models to load at startup time `invokeai-model-install --yes` Import the recommended SD models without a GUI `invokeai-model-install --default_only` As above, but only import the default model |
||
Lincoln Stein
|
7545e38655 | frontend design done; functionality not hooked up yet | ||
Lincoln Stein
|
714fff39ba |
add new console frontend to initial model selection, and other improvements
1. The invokeai-configure script has now been refactored. The work of selecting and downloading initial models at install time is now done by a script named invokeai-initial-models (module name is ldm.invoke.config.initial_model_select) The calling arguments for invokeai-configure have not changed, so nothing should break. After initializing the root directory, the script calls invokeai-initial-models to let the user select the starting models to install. 2. invokeai-initial-models puts up a console GUI with checkboxes to indicate which models to install. It respects the --default_only and --yes arguments so that CI will continue to work. 3. User can now edit the VAE assigned to diffusers models in the CLI. 4. Fixed a bug that caused a crash during model loading when the VAE is set to None, rather than being empty. |
||
Lincoln Stein
|
24e32f6ae2 |
add 'update' action to launcher script
- Adds an update action to launcher script - This action calls new python script `invokeai-update`, which prompts user to update to latest release version, main development version, or an arbitrary git tag or branch name. - It then uses `pip` to update to whatever tag was specified. |
||
Lincoln Stein
|
c6d13e679f |
make menu options in invoke.bat the same as options in invoke.sh
- This makes the launcher options menu on Windows look and act the same as the Linux/Mac launcher, which previously was lacking the command-line help option and didn't list item (6) as an option. |
||
Lincoln Stein
|
61c3886843
|
Merge branch 'main' into bugfix/use-cu117-wheel | ||
Lincoln Stein
|
c50b64ec1d | correct default menu entry in install.bat file | ||
Lincoln Stein
|
ca0f3ec0e4 | fix launcher shell script to use correct names for ti and merge functions | ||
Lincoln Stein
|
3996ee843c |
fix bugs in launcher script installation
- launcher scripts are installed *before* the configure script runs, so that if something goes wrong in the configure script, the user can run invoke.{sh,bat} and get the option to re-run configure - fixed typo in invoke.sh which misspelled name of invokeai-configure |
||
Eugene Brodsky
|
6cbdd88fe2 | (installer) correctly call invokeai entrypoints in .bat launch script | ||
Eugene Brodsky
|
34e0d7aaa8 | (config) rename all mentions of scripts/configure_invokeai.py to the new invokeai-configure command | ||
Eugene Brodsky
|
71733bcfa1 |
(installer) copy launch/update scripts to the root dir; improve launch experience on Linux/Mac
- install.sh is now a thin wrapper around the pythonized install script - install.bat not done yet - to follow - user messaging is tailored to the current platform (paste shortcuts, file paths, etc) - emit invoke.sh/invoke.bat scripts to the runtime dir - improve launch scripts (add help option, etc) - only emit the platform-specific scripts |
||
Lincoln Stein
|
2817f8a428 | update launcher shell scripts for new script names & paths | ||
Lincoln Stein
|
48deb3e49d | add model merging documentation and launcher script menu entries | ||
Kevin Turner
|
6fdbc1978d
|
use 🧨diffusers model (#1583)
* initial commit of DiffusionPipeline class * spike: proof of concept using diffusers for txt2img * doc: type hints for Generator * refactor(model_cache): factor out load_ckpt * model_cache: add ability to load a diffusers model pipeline and update associated things in Generate & Generator to not instantly fail when that happens * model_cache: fix model default image dimensions * txt2img: support switching diffusers schedulers * diffusers: let the scheduler do its scaling of the initial latents Remove IPNDM scheduler; it is not behaving. * web server: update image_progress callback for diffusers data * diffusers: restore prompt weighting feature * diffusers: fix set-sampler error following model switch * diffusers: use InvokeAIDiffuserComponent for conditioning * cross_attention_control: stub (no-op) implementations for diffusers * model_cache: let offload_model work with DiffusionPipeline, sorta. * models.yaml.example: add diffusers-format model, set as default * test-invoke-conda: use diffusers-format model test-invoke-conda: put huggingface-token where the library can use it * environment-mac: upgrade to diffusers 0.7 (from 0.6) this was already done for linux; mac must have been lost in the merge. * preload_models: explicitly load diffusers models In non-interactive mode too, as long as you're logged in. * fix(model_cache): don't check `model.config` in diffusers format clean-up from recent merge. * diffusers integration: support img2img * dev: upgrade to diffusers 0.8 (from 0.7.1) We get to remove some code by using methods that were factored out in the base class. * refactor: remove backported img2img.get_timesteps now that we can use it directly from diffusers 0.8.1 * ci: use diffusers model * dev: upgrade to diffusers 0.9 (from 0.8.1) * lint: correct annotations for Python 3.9. * lint: correct AttributeError.name reference for Python 3.9. * CI: prefer diffusers-1.4 because it no longer requires a token The RunwayML models still do. * build: there's yet another place to update requirements? * configure: try to download models even without token Models in the CompVis and stabilityai repos no longer require them. (But runwayml still does.) * configure: add troubleshooting info for config-not-found * fix(configure): prepend root to config path * fix(configure): remove second `default: true` from models example * CI: simplify test-on-push logic now that we don't need secrets The "test on push but only in forks" logic was only necessary when tests didn't work for PRs-from-forks. * create an embedding_manager for diffusers * internal: avoid importing diffusers DummyObject see https://github.com/huggingface/diffusers/issues/1479 * fix "config attributes…not expected" diffusers warnings. * fix deprecated scheduler construction * work around an apparent MPS torch bug that causes conditioning to have no effect * 🚧 post-rebase repair * preliminary support for outpainting (no masking yet) * monkey-patch diffusers.attention and use Invoke lowvram code * add always_use_cpu arg to bypass MPS * add cross-attention control support to diffusers (fails on MPS) For unknown reasons MPS produces garbage output with .swap(). Use --always_use_cpu arg to invoke.py for now to test this code on MPS. * diffusers support for the inpainting model * fix debug_image to not crash with non-RGB images. * inpainting for the normal model [WIP] This seems to be performing well until the LAST STEP, at which point it dissolves to confetti. * fix off-by-one bug in cross-attention-control (#1774) prompt token sequences begin with a "beginning-of-sequence" marker <bos> and end with a repeated "end-of-sequence" marker <eos> - to make a default prompt length of <bos> + 75 prompt tokens + <eos>. the .swap() code was failing to take the column for <bos> at index 0 into account. the changes here do that, and also add extra handling for a single <eos> (which may be redundant but which is included for completeness). based on my understanding and some assumptions about how this all works, the reason .swap() nevertheless seemed to do the right thing, to some extent, is because over multiple steps the conditioning process in Stable Diffusion operates as a feedback loop. a change to token n-1 has flow-on effects to how the [1x4x64x64] latent tensor is modified by all the tokens after it, - and as the next step is processed, all the tokens before it as well. intuitively, a token's conditioning effects "echo" throughout the whole length of the prompt. so even though the token at n-1 was being edited when what the user actually wanted was to edit the token at n, it nevertheless still had some non-negligible effect, in roughly the right direction, often enough that it seemed like it was working properly. * refactor common CrossAttention stuff into a mixin so that the old ldm code can still work if necessary * inpainting for the normal model. I think it works this time. * diffusers: reset num_vectors_per_token sync with |
||
Lincoln Stein
|
3929bd3e13
|
Lstein release candidate 2.2.5 (#2137)
* installer tweaks in preparation for v2.2.5 - pin numpy to 1.23.* to avoid requirements conflict with numba - update.sh and update.bat now accept a tag or branch string, not a URL - update scripts download latest requirements-base before updating. * update.bat.in debugged and working * update pulls from "latest" now * bump version number * fix permissions on create_installer.sh * give Linux user option of installing ROCm or CUDA * rc2.2.5 (install.sh) relative path fixes (#2155) * (installer) fix bug in resolution of relative paths in linux install script point installer at 2.2.5-rc1 selecting ~/Data/myapps/ as location would create a ./~/Data/myapps instead of expanding the ~/ to the value of ${HOME} also, squash the trailing slash in path, if it was entered by the user * (installer) add option to automatically start the app after install also: when exiting, print the command to get back into the app * remove extraneous whitespace * model_cache applies rootdir to config path * bring installers up to date with 2.2.5-rc2 * bump rc version * create_installer now adds version number * rebuild frontend * bump rc# * add locales to frontend dist package - bump to patchlevel 6 * bump patchlevel * use invoke-ai version of GFPGAN - This version is very slightly modified to allow weights files to be pre-downloaded by the configure script. * fix formatting error during startup * bump patch level * workaround #2 for GFPGAN facexlib() weights downloading * bump patch * ready for merge and release * remove extraneous comment * set PYTORCH_ENABLE_MPS_FALLBACK directly in invoke.py Co-authored-by: Eugene Brodsky <ebr@users.noreply.github.com> |
||
Lincoln Stein
|
4fd97ceddd
|
remove redundant code line (#2068)
* remove redundant code line install.bat was copying the requirements file into the install folder twice, causing an error message on the second try. This fixes the issue. * add further improvements to installer - Windows version will unzip to have requirements.txt already in the right location, to prevent problems when users try to run the .bat script from within a mounted read-only zip file manager. - Do not assume that "pip" is on the path in either the .bat or shell versions of the update script. |
||
Lincoln Stein
|
0439b51a26
|
Simple Installer for Unified Directory Structure, Initial Implementation (#1819)
* partially working simple installer * works on linux * fix linux requirements files * read root environment variable in right place * fix cat invokeai.init in test workflows * fix classical cp error in test-invoke-pip.yml * respect --root argument now * untested bat installers added * windows install.bat now working fix logic to find frontend files * rename simple_install to "installer" 1. simple_install => 'installer' 2. source and binary install directories are removed * enable update scripts to update requirements - Also pin requirements to known working commits. - This may be a breaking change; exercise with caution - No functional testing performed yet! * update docs and installation requirements NOTE: This may be a breaking commit! Due to the way the installer works, I have to push to a public branch in order to do full end-to-end testing. - Updated installation docs, removing binary and source installers and substituting the "simple" unified installer. - Pin requirements for the "http:" downloads to known working commits. - Removed as much as possible the invoke-ai forks of others' repos. * fix directory path for installer * correct requirement/environment errors * exclude zip files in .gitignore * possible fix for dockerbuild * ready for torture testing - final Windows bat file tweaks - copy environments-and-requirements to the runtime directory so that the `update.sh` script can run. This is not ideal, since we lose control over the requirements. Better for the update script to pull the proper updated requirements script from the repository. * allow update.sh/update.bat to install arbitrary InvokeAI versions - Can pass the zip file path to any InvokeAI release, branch, commit or tag, and the installer will try to install it. - Updated documentation - Added Linux Python install hints. * use binary installer's :err_exit function * user diffusers 0.10.0 * added logic for CPPFLAGS on mac * improve windows install documentation - added information on a couple of gotchas I experienced during windows installation, including DLL loading errors experienced when Visual Studio C++ Redistributable was not present. * tagged to pull from 2.2.4-rc1 - also fix error of shell window closing immediately if suitable python not found Co-authored-by: mauwii <Mauwii@outlook.de> |