Remove unused field and class
This commit is contained in:
parent
1e625624ba
commit
90f02c7522
|
@ -104,7 +104,7 @@ class Api:
|
|||
with self.queue_lock:
|
||||
result = run_extras(extras_mode=0, image_folder="", input_dir="", output_dir="", **reqDict)
|
||||
|
||||
return ExtrasSingleImageResponse(image=encode_pil_to_base64(result[0][0]), html_info_x=result[1], html_info=result[2])
|
||||
return ExtrasSingleImageResponse(image=encode_pil_to_base64(result[0][0]), html_info=result[1])
|
||||
|
||||
def extras_batch_images_api(self, req: ExtrasBatchImagesRequest):
|
||||
reqDict = setUpscalers(req)
|
||||
|
@ -115,7 +115,7 @@ class Api:
|
|||
with self.queue_lock:
|
||||
result = run_extras(extras_mode=1, image="", input_dir="", output_dir="", **reqDict)
|
||||
|
||||
return ExtrasBatchImagesResponse(images=list(map(encode_pil_to_base64, result[0])), html_info_x=result[1], html_info=result[2])
|
||||
return ExtrasBatchImagesResponse(images=list(map(encode_pil_to_base64, result[0])), html_info=result[1])
|
||||
|
||||
def extras_folder_processing_api(self, req:ExtrasFoldersRequest):
|
||||
reqDict = setUpscalers(req)
|
||||
|
@ -123,7 +123,7 @@ class Api:
|
|||
with self.queue_lock:
|
||||
result = run_extras(extras_mode=2, image=None, image_folder=None, **reqDict)
|
||||
|
||||
return ExtrasBatchImagesResponse(images=list(map(encode_pil_to_base64, result[0])), html_info_x=result[1], html_info=result[2])
|
||||
return ExtrasBatchImagesResponse(images=list(map(encode_pil_to_base64, result[0])), html_info=result[1])
|
||||
|
||||
def pnginfoapi(self):
|
||||
raise NotImplementedError
|
||||
|
|
|
@ -130,8 +130,7 @@ class ExtrasBaseRequest(BaseModel):
|
|||
extras_upscaler_2_visibility: float = Field(default=0, title="Secondary upscaler visibility", ge=0, le=1, allow_inf_nan=False, description="Sets the visibility of secondary upscaler, values should be between 0 and 1.")
|
||||
|
||||
class ExtraBaseResponse(BaseModel):
|
||||
html_info_x: str
|
||||
html_info: str
|
||||
html_info: str = Field(title="HTML info", description="A series of HTML tags containing the process info.")
|
||||
|
||||
class ExtrasSingleImageRequest(ExtrasBaseRequest):
|
||||
image: str = Field(default="", title="Image", description="Image to work on, must be a Base64 string containing the image's data.")
|
||||
|
@ -139,9 +138,6 @@ class ExtrasSingleImageRequest(ExtrasBaseRequest):
|
|||
class ExtrasSingleImageResponse(ExtraBaseResponse):
|
||||
image: str = Field(default=None, title="Image", description="The generated image in base64 format.")
|
||||
|
||||
class SerializableImage(BaseModel):
|
||||
path: str = Field(title="Path", description="The image's path ()")
|
||||
|
||||
class ImageItem(BaseModel):
|
||||
data: str = Field(title="image data")
|
||||
name: str = Field(title="filename")
|
||||
|
|
Loading…
Reference in New Issue
Block a user