Unverified Commit 619b9658 authored by lsb's avatar lsb Committed by GitHub
Browse files

Avoid compiling a progress bar. (#10098)

* Avoid creating a progress bar when it is disabled.

This is useful when exporting a pipeline, and allows a compiler to avoid trying to compile away tqdm.

* Prevent the PyTorch compiler from compiling progress bars.

* Update pipeline_utils.py
parent b58f67f2
......@@ -1552,6 +1552,7 @@ class DiffusionPipeline(ConfigMixin, PushToHubMixin):
"""
return numpy_to_pil(images)
@torch.compiler.disable
def progress_bar(self, iterable=None, total=None):
if not hasattr(self, "_progress_bar_config"):
self._progress_bar_config = {}
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment