1
0
Fork 0

fix(api): disable progress in diffusers pipelines

This commit is contained in:
Sean Sube 2023-02-18 09:42:38 -06:00
parent 8dd55cc556
commit b2de114c8c
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
2 changed files with 6 additions and 0 deletions

View File

@ -49,6 +49,9 @@ def load_stable_diffusion(
provider=device.provider, provider=device.provider,
) )
if not server.show_progress:
pipe.set_progress_bar_config(disable=True)
server.cache.set("diffusion", cache_key, pipe) server.cache.set("diffusion", cache_key, pipe)
run_gc([device]) run_gc([device])

View File

@ -148,6 +148,9 @@ def load_pipeline(
scheduler=scheduler, scheduler=scheduler,
) )
if not server.show_progress:
pipe.set_progress_bar_config(disable=True)
if device is not None and hasattr(pipe, "to"): if device is not None and hasattr(pipe, "to"):
pipe = pipe.to(device.torch_str()) pipe = pipe.to(device.torch_str())