Skip to content

Commit 963ee05

Browse files
satani99sayakpaul
andauthored
Update train_dreambooth_lora_sd3.py (#8600)
* Update train_dreambooth_lora_sd3.py * Update train_dreambooth_lora_sd3.py * Update train_dreambooth_sd3.py --------- Co-authored-by: Sayak Paul <[email protected]>
1 parent 668e34c commit 963ee05

File tree

2 files changed

+0
-2
lines changed

2 files changed

+0
-2
lines changed

examples/dreambooth/train_dreambooth_lora_sd3.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1344,7 +1344,6 @@ def compute_text_embeddings(prompt, text_encoders, tokenizers):
13441344
if not train_dataset.custom_instance_prompts:
13451345
del tokenizers, text_encoders
13461346
# Explicitly delete the objects as well, otherwise only the lists are deleted and the original references remain, preventing garbage collection
1347-
del tokenizer_one, tokenizer_two, tokenizer_three
13481347
del text_encoder_one, text_encoder_two, text_encoder_three
13491348
gc.collect()
13501349
if torch.cuda.is_available():

examples/dreambooth/train_dreambooth_sd3.py

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1372,7 +1372,6 @@ def compute_text_embeddings(prompt, text_encoders, tokenizers):
13721372
if not args.train_text_encoder and not train_dataset.custom_instance_prompts:
13731373
del tokenizers, text_encoders
13741374
# Explicitly delete the objects as well, otherwise only the lists are deleted and the original references remain, preventing garbage collection
1375-
del tokenizer_one, tokenizer_two, tokenizer_three
13761375
del text_encoder_one, text_encoder_two, text_encoder_three
13771376
gc.collect()
13781377
if torch.cuda.is_available():

0 commit comments

Comments
 (0)