Updated Comfy

This commit is contained in:
jarvis2324 2023-08-09 19:38:01 +05:30
parent 746ae43360
commit f91733b911

View File

@ -101,13 +101,13 @@ def run_prompt(job):
new_working_directory = "../"
os.chdir(new_working_directory)
image = Image.open('./lama-with-refiner/output/')
image = Image.open('./lama-with-refiner/output/image_mask.png')
im_file = io.BytesIO()
image.save(im_file, format="JPEG")
im_bytes = im_file.getvalue() # im_bytes: image in binary format.
im_b64 = base64.b64encode(im_bytes)
im_b64 = str(im_b64)
data['images'].append(im_b64)
data['lama'].append(im_b64)