diff --git a/modules/shared.py b/modules/shared.py index 567b1bb7de8..d30dc884757 100644 --- a/modules/shared.py +++ b/modules/shared.py @@ -550,7 +550,7 @@ def list_samplers(): options_templates.update(options_section(('ui', "User interface"), { "localization": OptionInfo("None", "Localization", gr.Dropdown, lambda: {"choices": ["None"] + list(localization.localizations.keys())}, refresh=lambda: localization.list_localizations(cmd_opts.localizations_dir)).needs_reload_ui(), "gradio_theme": OptionInfo("Default", "Gradio theme", ui_components.DropdownEditable, lambda: {"choices": ["Default"] + gradio_hf_hub_themes}).info("you can also manually enter any of themes from the gallery.").needs_reload_ui(), - "re_download_theme": OptionInfo(False, "Re-download the selected Gradio theme"), + "gradio_themes_cache": OptionInfo(True, "Cache gradio themes locally").info("Disable to update the selected Gradio theme"), "return_grid": OptionInfo(True, "Show grid in results for web"), "do_not_show_images": OptionInfo(False, "Do not show any images in results for web"), "send_seed": OptionInfo(True, "Send seed when sending prompt or image to other interface"), @@ -865,7 +865,7 @@ def reload_gradio_theme(theme_name=None): else: try: theme_cache_path = os.path.join(script_path, 'tmp', 'gradio_themes', f'{theme_name.replace("/", "_")}.json') - if not opts.re_download_theme and os.path.exists(theme_cache_path): + if opts.gradio_themes_cache and os.path.exists(theme_cache_path): gradio_theme = gr.themes.ThemeClass.load(theme_cache_path) else: gradio_theme = gr.themes.ThemeClass.from_hub(theme_name)