diff options
author | AUTOMATIC1111 <16777216c@gmail.com> | 2022-11-05 14:23:22 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-11-05 14:23:22 +0000 |
commit | 2e604233fda0cf169366f32ef6ce70f2f1c702ec (patch) | |
tree | 58fa12baf4b9fd552430e5fc1b9d27831e33af35 | |
parent | a546e2a8c95bee75d53b31fbd7f33a7a17c2cf16 (diff) | |
parent | a170e3d22231e145f42bb878a76ae5f76fdca230 (diff) | |
download | stable-diffusion-webui-gfx803-2e604233fda0cf169366f32ef6ce70f2f1c702ec.tar.gz stable-diffusion-webui-gfx803-2e604233fda0cf169366f32ef6ce70f2f1c702ec.tar.bz2 stable-diffusion-webui-gfx803-2e604233fda0cf169366f32ef6ce70f2f1c702ec.zip |
Merge pull request #4329 from Blucknote/patch-1
Python 3.8 typing compatibility
-rw-r--r-- | modules/api/models.py | 8 |
1 files changed, 4 insertions, 4 deletions
diff --git a/modules/api/models.py b/modules/api/models.py index a44c5ddd..f89da1ff 100644 --- a/modules/api/models.py +++ b/modules/api/models.py @@ -5,7 +5,7 @@ from typing_extensions import Literal from inflection import underscore from modules.processing import StableDiffusionProcessingTxt2Img, StableDiffusionProcessingImg2Img from modules.shared import sd_upscalers, opts, parser -from typing import List +from typing import Dict, List API_NOT_ALLOWED = [ "self", @@ -193,8 +193,8 @@ FlagsModel = create_model("Flags", **flags) class SamplerItem(BaseModel): name: str = Field(title="Name") - aliases: list[str] = Field(title="Aliases") - options: dict[str, str] = Field(title="Options") + aliases: List[str] = Field(title="Aliases") + options: Dict[str, str] = Field(title="Options") class UpscalerItem(BaseModel): name: str = Field(title="Name") @@ -230,4 +230,4 @@ class PromptStyleItem(BaseModel): class ArtistItem(BaseModel): name: str = Field(title="Name") score: float = Field(title="Score") - category: str = Field(title="Category")
\ No newline at end of file + category: str = Field(title="Category") |