InvokeAI/invokeai/app
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
..
api feat: add batch docstrings 2023-08-21 19:51:16 +10:00
assets/images tweaks in response to psychedelicious review of PR 2023-07-26 15:27:04 +10:00
cli Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
invocations chore: black 2023-08-21 19:17:15 +10:00
models feat(nodes): refactor parameter/primitive nodes 2023-08-16 09:54:38 +10:00
services feat(batches): defer ges creation until execution 2023-08-21 22:22:19 +10:00
util Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
api_app.py Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
cli_app.py Merge branch 'main' into feat/batch-graphs 2023-08-18 15:40:34 -04:00