Skip to content

Commit 422fd36

Browse files
committed
style
1 parent 0932a4e commit 422fd36

File tree

2 files changed

+10
-6
lines changed

2 files changed

+10
-6
lines changed

src/diffusers/pipelines/pag/pipeline_pag_sana.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -919,9 +919,11 @@ def __call__(
919919
try:
920920
image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]
921921
except torch.cuda.OutOfMemoryError as e:
922-
warnings.warn(f"{e}. \n"
923-
f"Try to use VAE tiling for large images. For example: \n"
924-
f"pipe.vae.enable_tiling(tile_sample_min_width=512, tile_sample_min_height=512)")
922+
warnings.warn(
923+
f"{e}. \n"
924+
f"Try to use VAE tiling for large images. For example: \n"
925+
f"pipe.vae.enable_tiling(tile_sample_min_width=512, tile_sample_min_height=512)"
926+
)
925927
if use_resolution_binning:
926928
image = self.image_processor.resize_and_crop_tensor(image, orig_width, orig_height)
927929

src/diffusers/pipelines/sana/pipeline_sana.py

Lines changed: 5 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -957,9 +957,11 @@ def __call__(
957957
try:
958958
image = self.vae.decode(latents / self.vae.config.scaling_factor, return_dict=False)[0]
959959
except torch.cuda.OutOfMemoryError as e:
960-
warnings.warn(f"{e}. \n"
961-
f"Try to use VAE tiling for large images. For example: \n"
962-
f"pipe.vae.enable_tiling(tile_sample_min_width=512, tile_sample_min_height=512)")
960+
warnings.warn(
961+
f"{e}. \n"
962+
f"Try to use VAE tiling for large images. For example: \n"
963+
f"pipe.vae.enable_tiling(tile_sample_min_width=512, tile_sample_min_height=512)"
964+
)
963965
if use_resolution_binning:
964966
image = self.image_processor.resize_and_crop_tensor(image, orig_width, orig_height)
965967

0 commit comments

Comments
 (0)