InvokeAI/invokeai/app/services
psychedelicious 084cf26ed6 refactor: remove all session events
There's no longer any need for session-scoped events now that we have the session queue. Session started/completed/canceled map 1-to-1 to queue item status events, but queue item status events also have an event for failed state.

We can simplify queue and processor handling substantially by removing session events and instead using queue item events.

- Remove the session-scoped events entirely.
- Remove all event handling from session queue. The processor still needs to respond to some events from the queue: `QueueClearedEvent`, `BatchEnqueuedEvent` and `QueueItemStatusChangedEvent`.
- Pass an `is_canceled` callback to the invocation context instead of the cancel event
- Update processor logic to ensure the local instance of the current queue item is synced with the instance in the database. This prevents race conditions and ensures lifecycle callback do not get stale callbacks.
- Update docstrings and comments
- Add `complete_queue_item` method to session queue service as an explicit way to mark a queue item as successfully completed. Previously, the queue listened for session complete events to do this.

Closes #6442
2024-05-27 09:06:02 +10: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 refactor(events): use pydantic schemas for events 2024-05-27 09:06:02 +10:00
config [util] Add generic torch device class (#6174) 2024-04-15 13:12:49 +00:00
download feat(events): use builder pattern for download events 2024-05-27 09:06:02 +10:00
events refactor: remove all session events 2024-05-27 09:06:02 +10:00
image_files feat(app): simplified create image API 2024-05-18 09:04:37 +10:00
image_records fix(app): pass image metadata as stringified json 2024-05-18 09:04:37 +10:00
images fix(app): type annotations in images service 2024-05-18 09:04:37 +10: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 fix(mm): port changes into new model_install_common file 2024-05-27 09:06:02 +10:00
model_load fix(mm): emit correct event when model load complete 2024-05-27 09:06:02 +10:00
model_manager [util] Add generic torch device class (#6174) 2024-04-15 13:12:49 +00: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 tidy(app): remove unused class 2024-04-23 17:12:14 +10:00
session_processor refactor: remove all session events 2024-05-27 09:06:02 +10:00
session_queue refactor: remove all session events 2024-05-27 09:06:02 +10:00
shared refactor: remove all session events 2024-05-27 09:06:02 +10: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