InvokeAI/invokeai/app/services
psychedelicious 88ae19a768 feat(batches): defer ges creation until execution
This improves the overall responsiveness of the system substantially, but does make each iteration *slightly* slower, distributing the up-front cost across the batch.

Two main changes:

1. Create BatchSessions immediately, but do not create a whole graph execution state until the batch is executed.
BatchSessions are created with a `session_id` that does not exist in sessions database.
The default state is changed to `"uninitialized"` to better represent this.

Results: Time to create 5000 batches reduced from over 30s to 2.5s

2. Use `executemany()` to retrieve lists of created sessions.
Results: time to create 5000 batches reduced from 2.5s to under 0.5s

Other changes:

- set BatchSession state to `"in_progress"` just before `invoke()` is called
- rename a few methods to accomodate the new behaviour
- remove unused `BatchProcessStorage.get_created_sessions()` method
2023-08-21 22:22:19 +10:00
..
models chore: black 2023-08-16 12:07:34 +10:00
__init__.py all files migrated; tweaks needed 2023-03-03 00:02:15 -05:00
batch_manager_storage.py feat(batches): defer ges creation until execution 2023-08-21 22:22:19 +10:00
batch_manager.py feat(batches): defer ges creation until execution 2023-08-21 22:22:19 +10:00
board_image_record_storage.py Switch sqlite clients to only use one connection 2023-08-15 21:46:24 -04:00
board_images.py Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
board_record_storage.py Merge branch 'main' into feat/batch-graphs 2023-08-18 15:40:34 -04:00
boards.py Apply black 2023-07-27 10:54:01 -04:00
config.py Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
default_graphs.py feat(nodes): refactor parameter/primitive nodes 2023-08-16 09:54:38 +10:00
events.py Fix total_steps in generation event, order field added 2023-08-09 03:34:25 +03:00
graph.py Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
image_file_storage.py Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
image_record_storage.py Merge branch 'main' into feat/batch-graphs 2023-08-18 15:40:34 -04:00
images.py Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
invocation_queue.py Apply black 2023-07-27 10:54:01 -04:00
invocation_services.py Merge branch 'main' into feat/batch-graphs 2023-08-18 15:40:34 -04:00
invocation_stats.py Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
invoker.py Create batch manager 2023-07-31 15:45:35 -04:00
item_storage.py Apply black 2023-07-27 10:54:01 -04:00
latent_storage.py Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
model_manager_service.py report RAM and RAM cache statistics 2023-08-15 21:00:30 -04:00
processor.py fix bad merge 2023-08-16 08:53:07 -04:00
resource_name.py feat(nodes): add nameservice 2023-05-28 20:19:56 -04:00
sqlite.py Testing out Spencer's batch data structure 2023-08-16 15:21:11 -04:00
urls.py feat: add multi-select to gallery 2023-08-03 11:46:59 +10:00