Skip to content

Commit

Permalink
Merge pull request #4329 from Blucknote/patch-1
Browse files Browse the repository at this point in the history
Python 3.8 typing compatibility
  • Loading branch information
AUTOMATIC1111 committed Nov 5, 2022
2 parents a546e2a + a170e3d commit 2e60423
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions modules/api/models.py
Expand Up @@ -5,7 +5,7 @@
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",
Expand Down Expand Up @@ -193,8 +193,8 @@ class ProgressResponse(BaseModel):

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")
Expand Down Expand Up @@ -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")
category: str = Field(title="Category")

0 comments on commit 2e60423

Please sign in to comment.