Skip to content

Commit

Permalink
fix(api): disable progress in diffusers pipelines
Browse files Browse the repository at this point in the history
  • Loading branch information
ssube committed Feb 18, 2023
1 parent 8dd55cc commit b2de114
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
3 changes: 3 additions & 0 deletions api/onnx_web/chain/upscale_stable_diffusion.py
Original file line number Diff line number Diff line change
Expand Up @@ -49,6 +49,9 @@ def load_stable_diffusion(
provider=device.provider,
)

if not server.show_progress:
pipe.set_progress_bar_config(disable=True)

server.cache.set("diffusion", cache_key, pipe)
run_gc([device])

Expand Down
3 changes: 3 additions & 0 deletions api/onnx_web/diffusion/load.py
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,9 @@ def load_pipeline(
scheduler=scheduler,
)

if not server.show_progress:
pipe.set_progress_bar_config(disable=True)

if device is not None and hasattr(pipe, "to"):
pipe = pipe.to(device.torch_str())

Expand Down

0 comments on commit b2de114

Please sign in to comment.