Update endpoints to use gradio's own utils functions

This commit is contained in:
Bruno Seoane
2022-10-23 15:13:37 -03:00
parent e3f0e34cd6
commit e0ca4dfbc1
2 changed files with 36 additions and 39 deletions

View File

@@ -4,8 +4,8 @@ from modules.shared import sd_upscalers
class TextToImageResponse(BaseModel):
images: list[str] = Field(default=None, title="Image", description="The generated image in base64 format.")
parameters: Json
info: Json
parameters: str
info: str
class ExtrasBaseRequest(BaseModel):
resize_mode: Literal[0, 1] = Field(default=0, title="Resize Mode", description="Sets the resize mode: 0 to upscale by upscaling_resize amount, 1 to upscale up to upscaling_resize_h x upscaling_resize_w.")