Skip to content

Commit 94ee4c1

Browse files
lsbsayakpaul
authored andcommitted
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
1 parent 70557b9 commit 94ee4c1

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/diffusers/pipelines/pipeline_utils.py

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1552,6 +1552,7 @@ def numpy_to_pil(images):
15521552
"""
15531553
return numpy_to_pil(images)
15541554

1555+
@torch.compiler.disable
15551556
def progress_bar(self, iterable=None, total=None):
15561557
if not hasattr(self, "_progress_bar_config"):
15571558
self._progress_bar_config = {}

0 commit comments

Comments
 (0)