cocoat commited on
Commit
9c73c19
·
verified ·
1 Parent(s): 1289988

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +3 -1
app.py CHANGED
@@ -302,7 +302,9 @@ def infer(prompt, neg, seed, rand, w, h, cfg, steps, scheduler_type,
302
  gallery_items = [(item[2], item[1].replace("|-|", "\n")) for item in history]
303
 
304
  processed_img, processed_gallery_items = process_image(img, gallery_items)
305
-
 
 
306
  latest_caption_table = make_html_table(caption_text)
307
  return processed_img, processed_gallery_items, latest_caption_table
308
 
 
302
  gallery_items = [(item[2], item[1].replace("|-|", "\n")) for item in history]
303
 
304
  processed_img, processed_gallery_items = process_image(img, gallery_items)
305
+ if processed_img is None or processed_gallery_items is None:
306
+ print("Image processing failed, skipping history update.")
307
+ return None, history_gallery, history_tables
308
  latest_caption_table = make_html_table(caption_text)
309
  return processed_img, processed_gallery_items, latest_caption_table
310