Commit 0ebb8623 authored by novelailab's avatar novelailab

encoder already outputs bytes

parent d1076c79
...@@ -76,7 +76,6 @@ def generate(request: GenerationRequest): ...@@ -76,7 +76,6 @@ def generate(request: GenerationRequest):
images = model.sample(request) images = model.sample(request)
for x in range(len(images)): for x in range(len(images)):
image = simplejpeg.encode_jpeg(images[x], quality=95) image = simplejpeg.encode_jpeg(images[x], quality=95)
image = image.tobytes()
#get base64 of image #get base64 of image
image = base64.b64encode(image).decode("ascii") image = base64.b64encode(image).decode("ascii")
image[x] = image image[x] = image
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment