fix(api): disable progress in diffusers pipelines
This commit is contained in:
parent
8dd55cc556
commit
b2de114c8c
|
@ -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])
|
||||||
|
|
||||||
|
|
|
@ -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())
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue