Skip to content

Commit

Permalink
minor fixes
Browse files Browse the repository at this point in the history
  • Loading branch information
vladmandic committed Feb 23, 2024
1 parent 1b976f6 commit 1bbcf2e
Show file tree
Hide file tree
Showing 5 changed files with 12 additions and 2 deletions.
2 changes: 2 additions & 0 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,8 @@ Main ToDo list can be found at [GitHub projects](https://github.com/users/vladma
- remove training: ti
- remove training: hypernetwork
- extra network hide page with no entries
- ipadapter masking: <https://github.com/huggingface/diffusers/pull/6847>
- theme/cozynest: <https://github.com/Nevysha/Cozy-Nest>

## Control missing features

Expand Down
2 changes: 1 addition & 1 deletion modules/face/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ def ui(self, _is_img2img):
id_strength = gr.Slider(label='Strength', minimum=0.0, maximum=2.0, step=0.01, value=1.0)
id_conditioning = gr.Slider(label='Control', minimum=0.0, maximum=2.0, step=0.01, value=0.5)
with gr.Row(visible=True):
id_cache = gr.Checkbox(label='Cache model', value=True)
id_cache = gr.Checkbox(label='Cache model', value=False)
with gr.Group(visible=False) as cfg_photomaker:
with gr.Row():
gr.HTML('<a href="https://photo-maker.github.io/" target="_blank">&nbsp Tenecent ARC Lab PhotoMaker</a><br>')
Expand Down
2 changes: 2 additions & 0 deletions modules/shared.py
Original file line number Diff line number Diff line change
Expand Up @@ -295,6 +295,8 @@ def temp_disable_extensions():
disable_themes.append('sdnext-ui-ux')
if theme_name.lower() != 'lobe':
disable_themes.append('sd-webui-lobe-theme')
if theme_name.lower() != 'cozy-nest':
disable_themes.append('Cozy-Nest')
for ext in disable_themes:
if ext not in opts.disabled_extensions:
disabled.append(ext)
Expand Down
6 changes: 5 additions & 1 deletion modules/theme.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,7 +49,11 @@ def list_themes():
if f.endswith('.css'):
engines.append(f'modern/{os.path.splitext(f)[0]}')
if 'sd-webui-lobe-theme' in extensions:
modules.shared.log.info('Theme: installed="lobe"')
engines.append('lobe')
if 'Cozy-Nest' in extensions:
modules.shared.log.info('Theme: installed="cozy-nest"')
engines.append('cozy-nest')
gradio = ["gradio/default", "gradio/base", "gradio/glass", "gradio/monochrome", "gradio/soft"]
huggingface = refresh_themes(no_update=True)
huggingface = {x['id'] for x in huggingface if x['status'] == 'RUNNING' and 'test' not in x['id'].lower()}
Expand All @@ -75,7 +79,7 @@ def reload_gradio_theme(theme_name=None):
gradio_theme = gr.themes.Base(**default_font_params)
modules.shared.log.info(f'UI theme: name="{theme_name}" style={modules.shared.opts.theme_style} base={base}')
return True
elif theme_name.lower() in ['lobe']:
elif theme_name.lower() in ['lobe', 'cozy-nest']:
gradio_theme = gr.themes.Base(**default_font_params)
modules.shared.log.info(f'UI theme: name="{theme_name}" style={modules.shared.opts.theme_style} base={base}')
elif theme_name.lower() == 'modern' or theme_name.lower().startswith('modern/'):
Expand Down
2 changes: 2 additions & 0 deletions modules/ui_javascript.py
Original file line number Diff line number Diff line change
Expand Up @@ -58,6 +58,8 @@ def stylesheet(fn):
head += stylesheet(cssfile)

theme_name = modules.shared.cmd_opts.theme or modules.shared.opts.gradio_theme or ''
if theme_name == 'default':
theme_name = 'black-teal'
if theme_name.startswith('modern/'):
theme_name = theme_name[7:]
theme_folder = next((e.path for e in modules.extensions.extensions if e.name == 'sdnext-ui-ux'), None)
Expand Down

0 comments on commit 1bbcf2e

Please sign in to comment.