mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
awkward workaround for double-Annotated in model_record route
This commit is contained in:
@ -22,6 +22,7 @@ Validation errors will raise an InvalidModelConfigException error.
|
||||
from enum import Enum
|
||||
from typing import Literal, Optional, Type, Union
|
||||
|
||||
from fastapi import Body
|
||||
from pydantic import BaseModel, ConfigDict, Field, TypeAdapter
|
||||
from typing_extensions import Annotated
|
||||
|
||||
@ -268,7 +269,7 @@ AnyModelConfig = Annotated[
|
||||
CLIPVisionDiffusersConfig,
|
||||
T2IConfig,
|
||||
],
|
||||
Field(discriminator="type"),
|
||||
Body(discriminator="type"),
|
||||
]
|
||||
|
||||
AnyModelConfigValidator = TypeAdapter(AnyModelConfig)
|
||||
|
Reference in New Issue
Block a user