Skip to content

Commit 12afa54

Browse files
committed
smol fix
1 parent cb53d9c commit 12afa54

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

examples/dreambooth/train_dreambooth_lora_hidream.py

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -236,6 +236,7 @@ def log_validation(
236236
}
237237
)
238238

239+
pipeline.to("cpu")
239240
del pipeline
240241
free_memory()
241242

@@ -1007,6 +1008,7 @@ def main(args):
10071008
image_filename = class_images_dir / f"{example['index'][i] + cur_class_images}-{hash_image}.jpg"
10081009
image.save(image_filename)
10091010

1011+
pipeline.to("cpu")
10101012
del pipeline
10111013
free_memory()
10121014

@@ -1738,7 +1740,6 @@ def get_sigmas(timesteps, n_dim=4, dtype=torch.float32):
17381740
is_final_validation=True,
17391741
torch_dtype=weight_dtype,
17401742
)
1741-
pipeline.to("cpu")
17421743
del pipeline
17431744
free_memory()
17441745

0 commit comments

Comments
 (0)