clean
This commit is contained in:
parent
db9ab1a46b
commit
b46c64c6e5
2 changed files with 1 additions and 5 deletions
|
@ -42,9 +42,6 @@ class Api:
|
||||||
# convert base64 to PIL image
|
# convert base64 to PIL image
|
||||||
return Image.open(io.BytesIO(imgdata))
|
return Image.open(io.BytesIO(imgdata))
|
||||||
|
|
||||||
def __processed_info_to_json(self, processed):
|
|
||||||
return json.dumps(processed.info)
|
|
||||||
|
|
||||||
def text2imgapi(self, txt2imgreq: StableDiffusionTxt2ImgProcessingAPI):
|
def text2imgapi(self, txt2imgreq: StableDiffusionTxt2ImgProcessingAPI):
|
||||||
sampler_index = sampler_to_index(txt2imgreq.sampler_index)
|
sampler_index = sampler_to_index(txt2imgreq.sampler_index)
|
||||||
|
|
||||||
|
@ -116,7 +113,6 @@ class Api:
|
||||||
b64images.append(base64.b64encode(buffer.getvalue()))
|
b64images.append(base64.b64encode(buffer.getvalue()))
|
||||||
|
|
||||||
if (not img2imgreq.include_init_images):
|
if (not img2imgreq.include_init_images):
|
||||||
# remove img2imgreq.init_images and img2imgreq.mask
|
|
||||||
img2imgreq.init_images = None
|
img2imgreq.init_images = None
|
||||||
img2imgreq.mask = None
|
img2imgreq.mask = None
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ class PydanticModelGenerator:
|
||||||
field=underscore(k),
|
field=underscore(k),
|
||||||
field_alias=k,
|
field_alias=k,
|
||||||
field_type=field_type_generator(k, v),
|
field_type=field_type_generator(k, v),
|
||||||
field_value=v.default,
|
field_value=v.default
|
||||||
)
|
)
|
||||||
for (k,v) in self._class_data.items() if k not in API_NOT_ALLOWED
|
for (k,v) in self._class_data.items() if k not in API_NOT_ALLOWED
|
||||||
]
|
]
|
||||||
|
|
Loading…
Reference in a new issue