Commit f528ff54 authored by novelailab's avatar novelailab

fix

parent 76f08949
...@@ -78,11 +78,9 @@ def generate(request: GenerationRequest): ...@@ -78,11 +78,9 @@ def generate(request: GenerationRequest):
image = simplejpeg.encode_jpeg(images[x], quality=95) image = simplejpeg.encode_jpeg(images[x], quality=95)
image = image.tobytes() image = image.tobytes()
#get base64 of image #get base64 of image
image = str(base64.b64encode(image)) image = base64.b64encode(image).decode("ascii")
#remove b' from base64
image = image[2:-1]
image[x] = image image[x] = image
process_time = time.perf_counter() - t process_time = time.perf_counter() - t
logger.info(f"Request took {process_time:0.3f} seconds") logger.info(f"Request took {process_time:0.3f} seconds")
return GenerationOutput(generation=images) return GenerationOutput(generation=images)
......
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