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
+16 -7
View File
@@ -1,17 +1,26 @@
# Change Log for SD.Next
## Pending
- Diffusers==0.30.0
- https://github.com/huggingface/diffusers/issues/8579
- https://github.com/huggingface/diffusers/issues/8546
- https://github.com/huggingface/diffusers/pull/8566
- https://github.com/huggingface/diffusers/pull/8506
## Update for 2024-06-15
- sd3 enable taesd preview and non-full quality mode
- sd3 simplified loading of model in single-file safetensors format
- css tweaks for standardui
- force apply vae config on model load
fix unsaturated outputs
- restructure api examples: `cli/api-*`
- support for `torch-directml` **0.2.2**, thanks @lshqqytiger!
- **sd3** enable taesd preview and non-full quality mode
- **sd3** simplified loading of model in single-file safetensors format
- fix unsaturated outputs, force apply vae config on model load
- fix control second pass resize
- fix api face-hires
- fix hunyuandit set attention processor
- fix **hunyuandit** set attention processor
- fix civitai download without name
- css tweaks for standardui
- restructure api examples: `cli/api-*`
- handle theme fallback when invalid theme is specified
## Update for 2024-06-13
+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:
+3 -1
View File
@@ -91,7 +91,6 @@ def reload_gradio_theme():
'font_mono':['IBM Plex Mono', 'ui-monospace', 'Consolas', 'monospace']
}
gradio_theme = gr.themes.Base(**default_font_params)
available_themes = list_themes()
if theme_name not in available_themes:
modules.shared.log.error(f'UI theme invalid: type={modules.shared.opts.theme_type} theme="{theme_name}" available={available_themes}')
@@ -99,6 +98,9 @@ def reload_gradio_theme():
theme_name = 'black-teal'
elif modules.shared.opts.theme_type == 'Modern':
theme_name = 'Default'
else:
modules.shared.opts.theme_type = 'Standard'
theme_name = 'black-teal'
modules.shared.opts.data['gradio_theme'] = theme_name