Commit Graph

10603 Commits

Author SHA1 Message Date
psychedelicious
58fd8bb8a5 docs: update 050_INSTALLING_MODELS.md
Fix a couple missing links, add blurb about how to use scan folder to replicate autoimport.
2024-03-28 12:35:41 +11:00
psychedelicious
ec1bafdef5 docs: update INSTALL_DEVELOPMENT.md
- Add blurb about `scan_models_on_startup`
- Add blurb about editable install
2024-03-28 12:35:41 +11:00
psychedelicious
c545262e3b revert: unrelated docstring change 2024-03-28 12:35:41 +11:00
psychedelicious
48e1a0c217 fix(ui): remove sync models functionality
The backend functionality was removed in the previous couple commits. Removing the frontend endpoints and components.
2024-03-28 12:35:41 +11:00
psychedelicious
ce2923533a chore(ui): typegen 2024-03-28 12:35:41 +11:00
psychedelicious
49a647ad00 docs: remove most references to autoimport
There's still a few references in `WEB.md` but this doc is very outdated and needs to be totally redone. It's hard to just remove the references without redoing a lot more.

Will need to follow up revising this doc.
2024-03-28 12:35:41 +11:00
psychedelicious
73c326680a feat(mm): remove autoimport; revise startup model scanning
These two changes are interrelated.

## Autoimport

The autoimport feature can be easily replicated using the scan folder tab in the model manager. Removing the implicit autoimport reduces surface area and unifies all model installation into the UI.

This functionality is removed, and the `autoimport_dir` config setting is removed.

## Startup model dir scanning

We scanned the invoke-managed models dir on startup and took certain actions:

- Register orphaned model files
- Remove model records from the db when the model path doesn't exist

### Orphaned model files

We should never have orphaned model files during normal use - we manage the models directory, and we only delete files when the user requests it.

During testing or development, when a fresh DB or memory DB is used, we could end up with orphaned models that should be registered.

Instead of always scanning for orphaned models and registering them, we now only do the scan if the new `scan_models_on_startup` config flag is set.

The description for this setting indicates it is intended for use for testing only.

### Remove records for missing model files

This functionality could unexpectedly wipe models from the db.

For example, if your models dir was on external media, and that media was inaccessible during startup, the scan would see all your models as missing and delete them from the db.

The "proactive" scan is removed. Instead, we will scan for missing models and log a warning if we find a model whose path doesn't exist. No possibility for data loss.
2024-03-28 12:35:41 +11:00
psychedelicious
2f6cce48af docs(mm): update ModelSearch 2024-03-28 12:35:41 +11:00
psychedelicious
3cf196dbb0 tidy(api): remove commented routes 2024-03-28 12:35:41 +11:00
psychedelicious
c113a822d0 chore(ui): knip 2024-03-28 12:24:32 +11:00
psychedelicious
77038a8ef6 build(ui): harden knip config, support @knipignore jsdoc tag 2024-03-28 12:24:32 +11:00
psychedelicious
6e5b4b595a tidy(ui): remove unused files, exports 2024-03-28 12:24:32 +11:00
psychedelicious
33900d2419 fix(ui): ts issue from react-virtuoso 2024-03-28 12:24:32 +11:00
psychedelicious
9179a2f96b chore(ui): bump deps 2024-03-28 12:24:32 +11:00
psychedelicious
f6fec34311 chore(ui): upgrade storybook to v8 2024-03-28 12:24:32 +11:00
psychedelicious
627a98770f feat(ui): optimize size when using CA image size
When using a Control Adapter image's dimensions as the main output dimensions, fit the dimensions to the model's optimal dimensions.
2024-03-28 08:47:07 +11:00
Mark E. Shoulson
0bb0e226dc Flip default ordering of workflow library; #5477 2024-03-28 07:36:03 +11:00
Ryan Dick
86d536755d Check for cuDNN version compatibility issues on startup. Prior to this check, the app would silently run with ~50% performance degradation caused by a cuDNN version mismatch. 2024-03-28 07:32:06 +11:00
psychedelicious
e46c22e41a docs: add HF token blurb to FAQ 2024-03-27 18:59:55 +05:30
psychedelicious
237ac58dae docs: merge INSTALL_TROUBLESHOOTING into FAQ
These two docs had overlap and were kinda the same thing.
2024-03-27 18:59:55 +05:30
psychedelicious
3655a47200 feat(ui): remove references to HF token handling 2024-03-27 18:59:55 +05:30
psychedelicious
7167699015 chore(ui): typegen 2024-03-27 18:59:55 +05:30
psychedelicious
b8ac524712 feat(mm): remove hf token handling
I had added this because I mistakenly believed the HF token was required to download HF models.

Turns out this is not the case, and the vast majority of HF models do not need the API token to download.
2024-03-27 18:59:55 +05:30
psychedelicious
a397fdbd25 chore: ruff 2024-03-27 08:16:27 -04:00
psychedelicious
a291a42abc feat: display torch device on startup
This functionality disappeared at some point.
2024-03-27 08:16:27 -04:00
psychedelicious
4f2892d231 docs: remove handful of deprecated docs 2024-03-27 08:06:34 -04:00
psychedelicious
5c8bbb926a fix(mm): add missing v2-midas-inference.yaml
This is needed for SD2 depth models.

Note: These models don't seem to work.
2024-03-27 07:48:54 -04:00
psychedelicious
21758e7b49 fix(mm): move depth variant config to sd2
Looks like a copy/paste got mixed up.
2024-03-27 07:48:54 -04:00
psychedelicious
eb33303e79 fix(mm): handle depth and inpainting models when converting to diffusers
"Normal" models have 4 in-channels, while "Depth" models have 5 and "Inpaint" models have 9.

We need to explicitly tell diffusers the channel count when converting models.

Closes  #6058
2024-03-27 07:48:54 -04:00
psychedelicious
536bb4f053 chore(ui): lint 2024-03-27 10:52:32 +11:00
psychedelicious
3beb9b764a feat(ui): <GalleryImage /> styling 2024-03-27 10:52:32 +11:00
Rohinish
171f2aa20d fix(ui): image not getting selected 2024-03-27 10:52:32 +11:00
psychedelicious
778922e603 tests: add test_probe_handles_state_dict_with_integer_keys 2024-03-27 09:30:25 +11:00
psychedelicious
243de683d7 fix(mm): handle integer state dict keys in probe
It's possible for a model's state dict to have integer keys, though we do not actually support such models.

As part of probing, we call `key.startswith(...)` on the state dict keys. This raises an `AttributeError` for integer keys.

This logic is in `invokeai/backend/model_manager/probe.py:get_model_type_from_checkpoint`

To fix this, we can cast the keys to strings first. The models w/ integer keys will still fail to be probed, but we'll get a `InvalidModelConfigException` instead of `AttributeError`.

Closes #6044
2024-03-27 09:30:25 +11:00
psychedelicious
9b9b7a7071 docs: add warning about speed to malloc docs 2024-03-27 08:45:54 +11:00
psychedelicious
6ce82a41d5 docs: update docs for malloc change 2024-03-27 08:45:54 +11:00
psychedelicious
f535835612 feat(mm): remove MALLOC_MMAP_THRESHOLD_ from launcher
Closes #6007
2024-03-27 08:45:54 +11:00
psychedelicious
e89a739bc3 docs: fix incorrect links to troubleshooting docs 2024-03-27 08:45:54 +11:00
psychedelicious
dd941f7a62 docs: fix indentation issue in INSTALL_TROUBLESHOOTING.md 2024-03-27 08:45:54 +11:00
psychedelicious
eb15a7516f chore: ruff 2024-03-27 08:34:00 +11:00
psychedelicious
06e51b582f test(mm): test arbitrary error handling during model install 2024-03-27 08:34:00 +11:00
psychedelicious
16dad07294 feat(mm): improved install error log message in terminal 2024-03-27 08:34:00 +11:00
psychedelicious
b2ea749c72 fix(mm): handle any error during installation
Previously we only handled expected error types. If a different error was raised, the install job would end up in an unexpected state where it has failed and isn't doing anything, but its status is still running.

This indirectly prevents the installer threads from exiting - they are waiting for all jobs to be completed, including the failed-but-still-running job.

We need to handle any error here to prevent this.
2024-03-27 08:34:00 +11:00
psychedelicious
3aad6f975b docs: restore mention of WinLongPathsEnabled.reg 2024-03-26 09:18:01 -04:00
psychedelicious
4e93b05736 docs: update all installation docs 2024-03-26 09:18:01 -04:00
psychedelicious
3493b26c55 docs: remove deprecated installatino docs 2024-03-26 09:18:01 -04:00
psychedelicious
fb317d0967 feat(installer): update invoke.bat.in
Forgot to update this when removing references to updating the app in invoke.sh.in
2024-03-26 14:48:29 +11:00
psychedelicious
56af97866e docs(installer): update docstrings for install methods 2024-03-26 14:48:29 +11:00
psychedelicious
44626c9452 tidy(installer): remove no-op --version CLI arg of installer
This wasn't used at all.
2024-03-26 14:48:29 +11:00
psychedelicious
dfc08bd964 feat(installer): add support for installing from wheel
This allows us to easily test the installer without needing the desired version to be published on PyPI:
```sh
python3 installer/lib/main.py --wheel installer/dist/InvokeAI-4.0.0rc6-py3-none-any.whl
```

A warning message and confirmation are displayed when the arg is used.

The rest of the installer is unchanged.
2024-03-26 14:48:29 +11:00