1
0
mirror of https://github.com/huggingface/diffusers.git synced 2026-01-27 17:22:53 +03:00

Log loss for debugging

This commit is contained in:
Clarence Chen
2023-03-12 15:04:00 -07:00
parent 1a0c13c1c6
commit 76ea9c856f

View File

@@ -1028,6 +1028,7 @@ class StableDiffusionPix2PixZeroPipeline(DiffusionPipeline):
# call the callback, if provided
if i == len(timesteps) - 1 or ((i + 1) > num_warmup_steps and (i + 1) % self.scheduler.order == 0):
progress_bar.set_postfix({"loss": loss.loss.detach().item()})
progress_bar.update()
# 11. Post-process the latents.