theme fallback

This commit is contained in:
Vladimir Mandic
2024-04-12 07:28:42 -04:00
parent 4309442b7f
commit b14d8b8980
2 changed files with 7 additions and 1 deletions
+1 -1
View File
@@ -4,7 +4,7 @@
- PixArt-Σ requires `diffusers-0.28.0.dev0`
## Update for 2024-04-11
## Update for 2024-04-12
- **Features**:
- **Gallery**: list, preview, search through all your images and videos!
+6
View File
@@ -61,6 +61,12 @@ def list_themes():
modules.shared.log.debug(f'UI themes available: type={modules.shared.opts.theme_type} themes={len(builtin)}')
elif modules.shared.opts.theme_type == 'Modern':
ext = next((e for e in modules.extensions.extensions if e.name == 'sdnext-ui-ux'), None)
if ext is None:
modules.shared.log.error('UI themes: ModernUI not found')
builtin = list_builtin_themes()
themes = sorted(builtin)
modules.shared.opts.theme_type = 'Standard'
return themes
folder = os.path.join(ext.path, 'themes')
themes = []
if os.path.exists(folder):