handle fallback theme

This commit is contained in:
Vladimir Mandic
2024-06-16 08:00:35 -04:00
parent 67d46760d6
commit 26cff4557c
3 changed files with 22 additions and 10 deletions
+3 -2
View File
@@ -330,8 +330,9 @@ def temp_disable_extensions():
modules.shared.opts.data['theme_type'] = 'None'
modules.shared.opts.data['gradio_theme'] = theme_name
else:
modules.shared.opts.data['theme_type'] = 'None'
modules.shared.opts.data['gradio_theme'] = theme_name
modules.shared.log.error(f'UI theme invalid: theme="{theme_name}" available={["standard/*", "modern/*", "none/*"]} fallback="standard/black-teal"')
modules.shared.opts.data['theme_type'] = 'Standard'
modules.shared.opts.data['gradio_theme'] = 'black-teal'
for ext in disable_themes:
if ext.lower() not in opts.disabled_extensions: