InvokeAI/invokeai/frontend
psychedelicious e174ce038f feat(ui): refactor metadata handling (again)
Add concepts for metadata handlers. Handlers include parsers, recallers and validators for different metadata types:
- Parsers parse a raw metadata object of any shape to a structured object.
- Recallers load the parsed metadata into state. Recallers are optional, as some metadata types don't need to be loaded into state.
- Validators provide an additional layer of validation before recalling the metadata. This is needed because a metadata object may be valid, but not able to be recalled due to some other requirement, like base model compatibility. Validators are optional.

Sometimes metadata is not a single object but a list of items - like LoRAs. Metadata handlers may implement an optional set of "item" handlers which operate on individual items in the list.

Parsers and validators are async to allow fetching additional data, like a model config. Recallers are synchronous.

The these handlers are composed into a public API, exported as a `handlers` object. Besides the handlers functions, a metadata handler set includes:
- A function to get the label of the metadata type.
- An optional function to render the value of the metadata type.
- An optional function to render the _item_ value of the metadata type.
2024-02-26 14:49:38 -05:00
..
CLI Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
install remove startup dependency on legacy models.yaml file 2024-02-23 07:47:39 +11:00
merge remove startup dependency on legacy models.yaml file 2024-02-23 07:47:39 +11:00
training remove startup dependency on legacy models.yaml file 2024-02-23 07:47:39 +11:00
web feat(ui): refactor metadata handling (again) 2024-02-26 14:49:38 -05:00
__init__.py Run python black 2023-07-28 09:46:44 -04:00
legacy_launch_invokeai.py isort wip 2023-09-12 13:01:58 -04:00