Upload modutils.py
Browse files- modutils.py +1 -1
modutils.py
CHANGED
@@ -331,7 +331,7 @@ def save_gallery_history(images, files, history_gallery, history_files, progress
|
|
331 |
|
332 |
def save_image_history(image, gallery, files, model_name: str, progress=gr.Progress(track_tqdm=True)):
|
333 |
basename = f"{model_name.split('/')[-1]}_{datetime.now(FILENAME_TIMEZONE).strftime('%Y%m%d_%H%M%S')}"
|
334 |
-
if image is None or not isinstance(image,
|
335 |
if not gallery: gallery = []
|
336 |
if not files: files = []
|
337 |
filename = f"{basename}.png"
|
|
|
331 |
|
332 |
def save_image_history(image, gallery, files, model_name: str, progress=gr.Progress(track_tqdm=True)):
|
333 |
basename = f"{model_name.split('/')[-1]}_{datetime.now(FILENAME_TIMEZONE).strftime('%Y%m%d_%H%M%S')}"
|
334 |
+
if image is None or not isinstance(image, str): return gr.update(), gr.update()
|
335 |
if not gallery: gallery = []
|
336 |
if not files: files = []
|
337 |
filename = f"{basename}.png"
|