optional dark/light theme

This commit is contained in:
Vladimir Mandic
2023-04-16 08:59:47 -04:00
parent c42a00c327
commit a49ecc09ac
3 changed files with 7 additions and 1 deletions
+4
View File
@@ -37,6 +37,8 @@ If you are looking an amazing simple-to-use Stable Diffusion tool, I'd suggest [
- Majority of settings configurable via UI without the need for command line flags
e.g, cross-optimization methods, system folders, etc.
### UI
### Optimizations
- Optimized for `Torch` 2.0
@@ -63,6 +65,8 @@ Hand-picked list of extensions that are deeply integrated into core workflows:
### User Interface
- Includes support for **Gradio themes**
*Settings* -> *User interface* -> *UI theme*
- Includes updated **UI**: reskinned and reorganized
Black and orange dark theme with fixed width options panels and larger previews
+1 -1
View File
@@ -8,7 +8,7 @@ parser.add_argument("-f", action='store_true', help=argparse.SUPPRESS) # allows
parser.add_argument("--ui-settings-file", type=str, help=argparse.SUPPRESS, default=os.path.join(data_path, 'config.json'))
parser.add_argument("--ui-config-file", type=str, help=argparse.SUPPRESS, default=os.path.join(data_path, 'ui-config.json'))
parser.add_argument("--config", type=str, default=sd_default_config, help=argparse.SUPPRESS)
parser.add_argument("--theme", type=str, help=argparse.SUPPRESS, default='dark')
parser.add_argument("--theme", type=str, help=argparse.SUPPRESS, default=None)
parser.add_argument("--no-half", action='store_true', help="Do not switch the model to 16-bit floats")
parser.add_argument("--no-half-vae", action='store_true', help="Do not switch the VAE model to 16-bit floats")
+2
View File
@@ -1698,6 +1698,8 @@ def javascript_html():
inline = ''
if cmd_opts.theme is not None:
inline += f"set_theme('{cmd_opts.theme}');"
elif opts.gradio_theme == 'black-orange':
inline += f"set_theme('dark');"
for script in modules.scripts.list_scripts("javascript", ".js"):
head += f'<script type="text/javascript" src="{webpath(script.path)}"></script>\n'