Skip to content

Commit 610a71d

Browse files
authored
Fix indent in dreambooth lora advanced SD 15 script (#8753)
update
1 parent c104482 commit 610a71d

File tree

1 file changed

+4
-5
lines changed

1 file changed

+4
-5
lines changed

examples/advanced_diffusion_training/train_dreambooth_lora_sd15_advanced.py

Lines changed: 4 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1856,10 +1856,10 @@ def compute_text_embeddings(prompt, text_encoders, tokenizers):
18561856
generator = torch.Generator(device=accelerator.device).manual_seed(args.seed) if args.seed else None
18571857
pipeline_args = {"prompt": args.validation_prompt}
18581858

1859-
if torch.backends.mps.is_available():
1860-
autocast_ctx = nullcontext()
1861-
else:
1862-
autocast_ctx = torch.autocast(accelerator.device.type)
1859+
if torch.backends.mps.is_available():
1860+
autocast_ctx = nullcontext()
1861+
else:
1862+
autocast_ctx = torch.autocast(accelerator.device.type)
18631863

18641864
with autocast_ctx:
18651865
images = [
@@ -1880,7 +1880,6 @@ def compute_text_embeddings(prompt, text_encoders, tokenizers):
18801880
]
18811881
}
18821882
)
1883-
18841883
del pipeline
18851884
torch.cuda.empty_cache()
18861885

0 commit comments

Comments
 (0)