yozozaya commited on
Commit
b425e4e
·
1 Parent(s): c869e23

remove img to bytes

Browse files
Files changed (1) hide show
  1. app.py +7 -7
app.py CHANGED
@@ -16,8 +16,8 @@ from gradio import routes
16
  from typing import List, Type
17
 
18
  import base64
19
- import cv2
20
- import numpy as np
21
 
22
 
23
  def image_to_base64(image_bytes: bytes) -> str:
@@ -295,14 +295,14 @@ def run_lora_light(prompt, negative, lora_scale, selected_index, sdxl_loras, pro
295
  gc.collect()
296
  # return image
297
  # return image, gr.update(visible=True)
298
- success, encoded_image = cv2.imencode('.png', image)
299
- image_bytes = encoded_image.tobytes()
300
 
301
  print("✅ Returning image_bytes >>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>")
302
- print("image_bytes: ", image_bytes)
303
 
304
- image_base64 = image_to_base64(image_bytes)
305
- return image_base64
306
 
307
 
308
  # def swap_gallery(order, sdxl_loras):
 
16
  from typing import List, Type
17
 
18
  import base64
19
+ # import cv2
20
+ # import numpy as np
21
 
22
 
23
  def image_to_base64(image_bytes: bytes) -> str:
 
295
  gc.collect()
296
  # return image
297
  # return image, gr.update(visible=True)
298
+ # success, encoded_image = cv2.imencode('.png', image)
299
+ # image_bytes = encoded_image.tobytes()
300
 
301
  print("✅ Returning image_bytes >>>>>>>>>>>>> >>>>>>>>>>>>>>>>>>>")
302
+ print("image: ", image)
303
 
304
+ # image_base64 = image_to_base64(image_bytes)
305
+ return image
306
 
307
 
308
  # def swap_gallery(order, sdxl_loras):