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

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

update
This commit is contained in:
Dhruv Nair
2024-07-02 11:07:34 +05:30
committed by GitHub
parent c104482b9c
commit 610a71d7d4

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()