InvokeAI/invokeai/app
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
..
api feat(nodes): use TemporaryDirectory to handle ephemeral storage in ObjectSerializerDisk 2024-02-29 13:16:36 -05:00
assets/images tweaks in response to psychedelicious review of PR 2023-07-26 15:27:04 +10:00
invocations Revert "feat(nodes): use LATENT_SCALE_FACTOR const in tensor output builders" 2024-02-29 13:16:36 -05:00
services feat(nodes): use TemporaryDirectory to handle ephemeral storage in ObjectSerializerDisk 2024-02-29 13:16:36 -05:00
shared tidy(nodes): move all field things to fields.py 2024-02-29 13:16:35 -05:00
util feat(nodes): update all invocations to use new invocation context 2024-02-29 13:16:35 -05:00
api_app.py tidy(nodes): move all field things to fields.py 2024-02-29 13:16:35 -05:00