Skip to content

Commit

Permalink
Don't redundantly use tqdm progress if we're printing benchmarks
Browse files Browse the repository at this point in the history
  • Loading branch information
eagarvey-amd committed Jul 12, 2024
1 parent a7de2ba commit 6bc8cb4
Show file tree
Hide file tree
Showing 2 changed files with 3 additions and 2 deletions.
3 changes: 2 additions & 1 deletion models/turbine_models/custom_models/pipeline_base.py
Original file line number Diff line number Diff line change
Expand Up @@ -343,7 +343,8 @@ def __init__(
common_export_args: dict = {},
):
self.map = model_map
self.printer = Printer(verbose, time.time(), True)
self.verbose = verbose
self.printer = Printer(self.verbose, time.time(), True)
if isinstance(device, dict):
assert isinstance(
target, dict
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -565,7 +565,7 @@ def _produce_latents_sdxl(
[guidance_scale],
dtype=self.map["unet"]["np_dtype"],
)
for i, t in tqdm(enumerate(timesteps)):
for i, t in tqdm(enumerate(timesteps), disable=(self.benchmark and self.verbose)):
if self.cpu_scheduling:
latent_model_input, t = self.scheduler.scale_model_input(
latents,
Expand Down

0 comments on commit 6bc8cb4

Please sign in to comment.