From 07b9c553b6d9a5dc5ecd71a2fa4a4bf578a3cd13 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Wed, 29 May 2024 08:54:29 -0400 Subject: [PATCH] fix gallery extended chars in fn --- modules/ui_gallery.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/modules/ui_gallery.py b/modules/ui_gallery.py index 1170f1371..eead66c8d 100644 --- a/modules/ui_gallery.py +++ b/modules/ui_gallery.py @@ -4,9 +4,10 @@ import gradio as gr from PIL import Image from modules import shared, ui_symbols, ui_common, images, ui_control_helpers from modules.ui_components import ToolButton - +from urllib.parse import unquote def read_media(fn): + fn = unquote(fn).replace('%3A', ':') if not os.path.isfile(fn): shared.log.error(f'Gallery not found: file="{fn}"') return [[], None, '', '', f'Media not found: {fn}']