|
5 | 5 | from inflection import underscore
|
6 | 6 | from modules.processing import StableDiffusionProcessingTxt2Img, StableDiffusionProcessingImg2Img
|
7 | 7 | from modules.shared import sd_upscalers, opts, parser
|
| 8 | +from typing import List |
8 | 9 |
|
9 | 10 | API_NOT_ALLOWED = [
|
10 | 11 | "self",
|
@@ -108,12 +109,12 @@ def generate_model(self):
|
108 | 109 | ).generate_model()
|
109 | 110 |
|
110 | 111 | class TextToImageResponse(BaseModel):
|
111 |
| - images: list[str] = Field(default=None, title="Image", description="The generated image in base64 format.") |
| 112 | + images: List[str] = Field(default=None, title="Image", description="The generated image in base64 format.") |
112 | 113 | parameters: dict
|
113 | 114 | info: str
|
114 | 115 |
|
115 | 116 | class ImageToImageResponse(BaseModel):
|
116 |
| - images: list[str] = Field(default=None, title="Image", description="The generated image in base64 format.") |
| 117 | + images: List[str] = Field(default=None, title="Image", description="The generated image in base64 format.") |
117 | 118 | parameters: dict
|
118 | 119 | info: str
|
119 | 120 |
|
@@ -146,10 +147,10 @@ class FileData(BaseModel):
|
146 | 147 | name: str = Field(title="File name")
|
147 | 148 |
|
148 | 149 | class ExtrasBatchImagesRequest(ExtrasBaseRequest):
|
149 |
| - imageList: list[FileData] = Field(title="Images", description="List of images to work on. Must be Base64 strings") |
| 150 | + imageList: List[FileData] = Field(title="Images", description="List of images to work on. Must be Base64 strings") |
150 | 151 |
|
151 | 152 | class ExtrasBatchImagesResponse(ExtraBaseResponse):
|
152 |
| - images: list[str] = Field(title="Images", description="The generated images in base64 format.") |
| 153 | + images: List[str] = Field(title="Images", description="The generated images in base64 format.") |
153 | 154 |
|
154 | 155 | class PNGInfoRequest(BaseModel):
|
155 | 156 | image: str = Field(title="Image", description="The base64 encoded PNG image")
|
|
0 commit comments