Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

refresh dev #2900

Merged
merged 8 commits into from
Feb 23, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
12 changes: 9 additions & 3 deletions TODO.md
Original file line number Diff line number Diff line change
Expand Up @@ -4,17 +4,23 @@ Main ToDo list can be found at [GitHub projects](https://github.com/users/vladma

## Candidates for next release

- stable cascade
- init latents, variations, tiling
- lora sliders: <https://github.com/vladmandic/automatic/issues/2868>
- defork
- stable cascade: <https://github.com/vladmandic/automatic/wiki/Stable-Cascade>
- ipadapter masking: <https://github.com/huggingface/diffusers/pull/6847>
- init latents: variations, tiling, img2img
- x-adapter: <https://github.com/showlab/X-Adapter>
- diffusers public callbacks
- image2video: pia and vgen pipelines
- video2video
- async lowvram: <https://github.com/AUTOMATIC1111/stable-diffusion-webui/pull/14855>
- remove builtin: controlnet
- remove builtin: image-browser
- remove training: ti
- remove training: hypernetwork

## Control missing features

- second pass: <https://github.com/vladmandic/automatic/issues/2783>
- control api
- masking api
- preprocess api
File renamed without changes
2 changes: 1 addition & 1 deletion installer.py
Original file line number Diff line number Diff line change
Expand Up @@ -1039,7 +1039,7 @@ def extensions_preload(parser):
preload_extensions(ext_dir, parser)
t1 = time.time()
preload_time[ext_dir] = round(t1 - t0, 2)
log.info(f'Extension preload: {preload_time}')
log.debug(f'Extension preload: {preload_time}')
except Exception:
log.error('Error running extension preloading')
if args.profile:
Expand Down
2 changes: 1 addition & 1 deletion modules/api/middleware.py
Original file line number Diff line number Diff line change
Expand Up @@ -18,7 +18,6 @@


def setup_middleware(app: FastAPI, cmd_opts):
log.info('Initializing middleware')
ssl._create_default_https_context = ssl._create_unverified_context # pylint: disable=protected-access
uvicorn_logger=logging.getLogger("uvicorn.error")
uvicorn_logger.disabled = True
Expand Down Expand Up @@ -91,3 +90,4 @@ async def general_exception_handler(req: Request, e: Exception):
return handle_exception(req, e)

app.build_middleware_stack() # rebuild middleware stack on-the-fly
log.debug(f'FastAPI middleware: {[m.__class__.__name__ for m in app.user_middleware]}')
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
10 changes: 8 additions & 2 deletions modules/sd_models.py
Original file line number Diff line number Diff line change
Expand Up @@ -864,8 +864,14 @@ def load_diffuser(checkpoint_info=None, already_loaded_state_dict=None, timer=No
if debug_load:
errors.display(e, 'Load')
return
elif 'ONNX' in model_type: # forced pipeline
sd_model = pipeline.from_pretrained(checkpoint_info.path)
elif model_type is not None and pipeline is not None and 'ONNX' in model_type: # forced pipeline
try:
sd_model = pipeline.from_pretrained(checkpoint_info.path)
except Exception as e:
shared.log.error(f'ONNX Failed loading {op}: {checkpoint_info.path} {e}')
if debug_load:
errors.display(e, 'Load')
return
else:
err1, err2, err3 = None, None, None
# diffusers_load_config['use_safetensors'] = True
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_extra_networks.py
Original file line number Diff line number Diff line change
Expand Up @@ -585,6 +585,8 @@ def ui_tab_change(page):
executor.submit(page.create_items, ui.tabname)
for page in get_pages():
page.create_page(ui.tabname, skip_indexing)
if len(page.items) == 0:
continue
with gr.Tab(page.title, id=page.title.lower().replace(" ", "_"), elem_classes="extra-networks-tab") as tab:
page_html = gr.HTML(page.html, elem_id=f'{tabname}{page.name}_extra_page', elem_classes="extra-networks-page")
ui.pages.append(page_html)
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
2 changes: 1 addition & 1 deletion webui.py
Original file line number Diff line number Diff line change
Expand Up @@ -105,7 +105,7 @@ def initialize():
t_timer, t_total = modules.scripts.load_scripts()
timer.startup.record("extensions")
timer.startup.records["extensions"] = t_total # scripts can reset the time
log.info(f'Extensions init time: {t_timer.summary()}')
log.debug(f'Extensions init time: {t_timer.summary()}')

modelloader.load_upscalers()
timer.startup.record("upscalers")
Expand Down
Loading