mirror of
https://github.com/invoke-ai/InvokeAI
synced 2024-08-30 20:32:17 +00:00
Updated Fields
This commit is contained in:
parent
e282d2ee7a
commit
78578b1faf
@ -34,16 +34,13 @@ class DiffusersModelInfo(ModelInfo):
|
|||||||
repo_id: Optional[str] = Field(description="The repo ID to use for this model")
|
repo_id: Optional[str] = Field(description="The repo ID to use for this model")
|
||||||
path: Optional[str] = Field(description="The path to the model")
|
path: Optional[str] = Field(description="The path to the model")
|
||||||
|
|
||||||
class modelInfo(ModelInfo):
|
|
||||||
info: Annotated[Union[CkptModelInfo,DiffusersModelInfo], Field(discriminator="format")]
|
|
||||||
|
|
||||||
class CreateModelRequest (BaseModel):
|
class CreateModelRequest (BaseModel):
|
||||||
name: str = Field(description="The name of the model")
|
name: str = Field(description="The name of the model")
|
||||||
info: Annotated[Union[(CkptModelInfo,DiffusersModelInfo)], Field(discriminator="format")] = Field(description="The model info")
|
info: Union[CkptModelInfo, DiffusersModelInfo] = Field(..., discriminator="format", description="The model details and configuration")
|
||||||
|
|
||||||
class CreateModelResponse (BaseModel):
|
class CreateModelResponse (BaseModel):
|
||||||
name: str = Field(description="The name of the new model")
|
name: str = Field(description="The name of the new model")
|
||||||
info: modelInfo = Field(description="The model details and configuration")
|
info: Union[CkptModelInfo, DiffusersModelInfo] = Field(..., discriminator="format", description="The model details and configuration")
|
||||||
status: str = Field(description="The status of the API response")
|
status: str = Field(description="The status of the API response")
|
||||||
|
|
||||||
class ModelsList(BaseModel):
|
class ModelsList(BaseModel):
|
||||||
|
Loading…
Reference in New Issue
Block a user