InvokeAI/invokeai/app/services/image_files
psychedelicious 922716d2ab feat(ui): store graph in image metadata
The previous super-minimal implementation had a major issue - the saved workflow didn't take into account batched field values. When generating with multiple iterations or dynamic prompts, the same workflow with the first prompt, seed, etc was stored in each image.

As a result, when the batch results in multiple queue items, only one of the images has the correct workflow - the others are mismatched.

To work around this, we can store the _graph_ in the image metadata (alongside the workflow, if generated via workflow editor). When loading a workflow from an image, we can choose to load the workflow or the graph, preferring the workflow.

Internally, we need to update images router image-saving services. The changes are minimal.

To avoid pydantic errors deserializing the graph, when we extract it from the image, we will leave it as stringified JSON and let the frontend's more sophisticated and flexible parsing handle it. The worklow is also changed to just return stringified JSON, so the API is consistent.
2024-05-18 09:04:37 +10:00
..
__init__.py feat: refactor services folder/module structure 2023-10-12 12:15:06 -04:00
image_files_base.py feat(ui): store graph in image metadata 2024-05-18 09:04:37 +10:00
image_files_common.py feat: refactor services folder/module structure 2023-10-12 12:15:06 -04:00
image_files_disk.py feat(ui): store graph in image metadata 2024-05-18 09:04:37 +10:00