Skip to content

Commit 4c8920c

Browse files
committed
disable mixed-precision in the final inference.
1 parent a53cc41 commit 4c8920c

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

examples/instruct_pix2pix/train_instruct_pix2pix.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -974,7 +974,7 @@ def collate_fn(examples):
974974
edited_images = []
975975
# pipeline.torch_dtype = weight_dtype
976976
# pipeline.unet = pipeline.unet.to(weight_dtype)
977-
with torch.autocast(str(accelerator.device), enabled=accelerator.mixed_precision == "fp16"):
977+
with torch.autocast(str(accelerator.device)):
978978
for _ in range(args.num_validation_images):
979979
# print(f"Pipeline device: {pipeline.device}")
980980
# print(

0 commit comments

Comments
 (0)