Unverified Commit 610a71d7 authored by Dhruv Nair's avatar Dhruv Nair Committed by GitHub
Browse files

Fix indent in dreambooth lora advanced SD 15 script (#8753)

update
parent c104482b
...@@ -1856,10 +1856,10 @@ def main(args): ...@@ -1856,10 +1856,10 @@ def main(args):
generator = torch.Generator(device=accelerator.device).manual_seed(args.seed) if args.seed else None generator = torch.Generator(device=accelerator.device).manual_seed(args.seed) if args.seed else None
pipeline_args = {"prompt": args.validation_prompt} pipeline_args = {"prompt": args.validation_prompt}
if torch.backends.mps.is_available(): if torch.backends.mps.is_available():
autocast_ctx = nullcontext() autocast_ctx = nullcontext()
else: else:
autocast_ctx = torch.autocast(accelerator.device.type) autocast_ctx = torch.autocast(accelerator.device.type)
with autocast_ctx: with autocast_ctx:
images = [ images = [
...@@ -1880,7 +1880,6 @@ def main(args): ...@@ -1880,7 +1880,6 @@ def main(args):
] ]
} }
) )
del pipeline del pipeline
torch.cuda.empty_cache() torch.cuda.empty_cache()
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment