InvokeAI/invokeai/frontend
psychedelicious ce3d37e829 fix(ui): handle fields with single option literal
Closes #5616

Turns out the OpenAPI schema definition for a pydantic field with a `Literal` type annotation is different depending on the number of options.

When there is a single value (e.g. `Literal["foo"]`, this results in a `const` schema object. The schema parser didn't know how to handle this, and displayed a warning in the JS console.

 This situation is now handled. When a `const` schema object is encountered, we interpret that as an `EnumField` with a single option.

 I think this makes sense - if you had a truly constant value, you wouldn't make it a field, so a `const` must mean a dynamically generated enum that ended up with only a single option.
2024-02-05 09:15:09 +11:00
..
CLI Resolving merge conflicts for flake8 2023-08-18 15:52:04 +10:00
install Port the command-line tools to use model_manager2 (#5546) 2024-02-02 17:18:47 +00:00
merge Port the command-line tools to use model_manager2 (#5546) 2024-02-02 17:18:47 +00:00
training Port the command-line tools to use model_manager2 (#5546) 2024-02-02 17:18:47 +00:00
web fix(ui): handle fields with single option literal 2024-02-05 09:15:09 +11: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