fix gallery extended chars in fn

This commit is contained in:
Vladimir Mandic
2024-05-29 08:54:29 -04:00
parent 0fb1cf4d1f
commit 07b9c553b6
+2 -1
View File
@@ -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}']