InvokeAI/invokeai/app/services
psychedelicious bcc57dc886 feat(nodes): use TemporaryDirectory to handle ephemeral storage in ObjectSerializerDisk
Replace `delete_on_startup: bool` & associated logic with `ephemeral: bool` and `TemporaryDirectory`.

The temp dir is created inside of `output_dir`. For example, if `output_dir` is `invokeai/outputs/tensors/`, then the temp dir might be `invokeai/outputs/tensors/tmpvj35ht7b/`.

The temp dir is cleaned up when the service is stopped, or when it is GC'd if not properly stopped.

In the event of a catastrophic crash where the temp files are not cleaned up, the user can delete the tempdir themselves.

This situation may not occur in normal use, but if you kill the process, python cannot clean up the temp dir itself. This includes running the app in a debugger and killing the debugger process - something I do relatively often.

Tests updated.
2024-02-29 13:16:36 -05: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
config pref: annotate 2024-02-03 10:18:26 +11:00
download Port the command-line tools to use model_manager2 (#5546) 2024-02-02 17:18:47 +00:00
events feat(nodes): update all invocations to use new invocation context 2024-02-29 13:16:35 -05:00
image_files tidy(nodes): move all field things to fields.py 2024-02-29 13:16:35 -05:00
image_records tidy(nodes): move all field things to fields.py 2024-02-29 13:16:35 -05:00
images tidy(nodes): move all field things to fields.py 2024-02-29 13:16:35 -05:00
invocation_cache feat(nodes): replace latents service with tensors and conditioning services 2024-02-29 13:16:36 -05:00
invocation_processor feat(nodes): update all invocations to use new invocation context 2024-02-29 13:16:35 -05:00
invocation_queue feat: workflow library (#5148) 2023-12-09 09:48:38 +11:00
invocation_stats feat(nodes): do not log stats errors 2024-02-07 11:26:15 +11:00
item_storage revert(nodes): revert making tensors/conditioning use item storage 2024-02-29 13:16:36 -05:00
model_install Port the command-line tools to use model_manager2 (#5546) 2024-02-02 17:18:47 +00:00
model_manager feat(nodes): update all invocations to use new invocation context 2024-02-29 13:16:35 -05:00
model_records Model Manager Refactor: Install remote models and store their tags and other metadata (#5361) 2024-01-14 19:54:53 +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-02-29 13:16:36 -05:00
session_processor feat: workflow library (#5148) 2023-12-09 09:48:38 +11:00
session_queue feat(db): add SQLiteMigrator to perform db migrations 2023-12-11 16:14:25 +11:00
shared fix(nodes): use metadata/board_id if provided by user, overriding WithMetadata/WithBoard-provided values 2024-02-29 13:16:36 -05:00
urls feat: refactor services folder/module structure 2023-10-12 12:15:06 -04:00
workflow_records add project as category to back-end 2024-01-24 10:59:04 +11:00
__init__.py all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
invocation_services.py revert(nodes): revert making tensors/conditioning use item storage 2024-02-29 13:16:36 -05:00
invoker.py feat: workflow library (#5148) 2023-12-09 09:48:38 +11:00