InvokeAI/invokeai/app/services
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
..
board_image_records feat(db): add SQLiteMigrator to perform db migrations 2023-12-11 16:14:25 +11:00
board_images feat: refactor services folder/module structure 2023-10-12 12:15:06 -04:00
board_records feat(db): add SQLiteMigrator to perform db migrations 2023-12-11 16:14:25 +11:00
boards feat(api): chore: pydantic & fastapi upgrade 2023-10-17 14:59:25 +11:00
bulk_download feat(bulk_download): update response model, messages 2024-03-01 10:42:33 +11:00
config feat(mm): remove autoimport; revise startup model scanning 2024-03-28 12:35:41 +11:00
download catch ^C at startup time while models are being scanned 2024-03-22 16:35:42 +11:00
events Fix race condition causing hangs during model install unit tests (#5994) 2024-03-19 20:54:49 +00:00
image_files feat(config): fix bad compress_level setting 2024-03-19 09:24:28 +11:00
image_records tidy(nodes): move all field things to fields.py 2024-03-01 10:42:33 +11:00
images tidy(nodes): move all field things to fields.py 2024-03-01 10:42:33 +11:00
invocation_cache fix(nodes): correctly serialize outputs 2024-03-06 08:14:12 -05:00
invocation_stats fix(nodes): fix typing on stats service context manager 2024-03-01 10:42:33 +11:00
item_storage revert(nodes): revert making tensors/conditioning use item storage 2024-03-01 10:42:33 +11:00
model_images docs(mm): update comment about model images 2024-03-08 12:26:35 +11:00
model_install feat(mm): remove autoimport; revise startup model scanning 2024-03-28 12:35:41 +11:00
model_load feat(events): add submodel_type to model load events 2024-03-14 18:29:55 +05:30
model_manager chore: ruff 2024-03-19 09:24:28 +11:00
model_records Fix minor bugs involving model manager handling of model paths (#6024) 2024-03-22 01:14:45 +00:00
names feat: refactor services folder/module structure 2023-10-12 12:15:06 -04:00
object_serializer feat(nodes): use TemporaryDirectory to handle ephemeral storage in ObjectSerializerDisk 2024-03-01 10:42:33 +11:00
session_processor Log a stack trace for invocation errors. 2024-03-04 23:01:56 +11:00
session_queue fix(config): use new get_config across the app, use correct settings 2024-03-19 09:24:28 +11:00
shared prioritize iterate in _get_next_node 2024-03-26 09:18:46 +11:00
urls cleanup 2024-03-06 21:57:41 -05:00
workflow_records chore(nodes): update default workflows for v4 2024-03-22 02:21:33 -07:00
__init__.py all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
invocation_services.py tidy(mm): ModelImages service 2024-03-06 21:57:41 -05:00
invoker.py refactor(nodes): merge processors 2024-03-01 10:42:33 +11:00