Vijish commited on
Commit
ccf455b
Β·
verified Β·
1 Parent(s): 453f9fe

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -1
app.py CHANGED
@@ -375,7 +375,11 @@ def generate_images_with_progress(prompt, negative_prompt, batch_count, use_cont
375
  clear_memory() # Clear memory after each image, even in single image mode
376
 
377
  clear_memory()
378
- return images
 
 
 
 
379
 
380
  # Function to extract PNG metadata
381
  def extract_png_info(image_path):
 
375
  clear_memory() # Clear memory after each image, even in single image mode
376
 
377
  clear_memory()
378
+
379
+ # Ensure all images are in PIL format
380
+ pil_images = [img if isinstance(img, Image.Image) else Image.fromarray(np.array(img)) for img in images]
381
+
382
+ return pil_images
383
 
384
  # Function to extract PNG metadata
385
  def extract_png_info(image_path):