Compare commits

...

1 Commits

Author SHA1 Message Date
Dhruv Nair
3a8aa62c25 update 2024-07-01 09:55:51 +00:00

View File

@@ -1856,10 +1856,10 @@ def main(args):
generator = torch.Generator(device=accelerator.device).manual_seed(args.seed) if args.seed else None
pipeline_args = {"prompt": args.validation_prompt}
if torch.backends.mps.is_available():
autocast_ctx = nullcontext()
else:
autocast_ctx = torch.autocast(accelerator.device.type)
if torch.backends.mps.is_available():
autocast_ctx = nullcontext()
else:
autocast_ctx = torch.autocast(accelerator.device.type)
with autocast_ctx:
images = [
@@ -1880,7 +1880,6 @@ def main(args):
]
}
)
del pipeline
torch.cuda.empty_cache()