"tests/git@developer.sourcefind.cn:OpenDAS/lmdeploy.git" did not exist on "169d5169fe4f805f39eef4a5b0aa2fe480190afe"
Unverified Commit 963ee05d authored by satani99's avatar satani99 Committed by GitHub
Browse files

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: default avatarSayak Paul <spsayakpaul@gmail.com>
parent 668e34c6
...@@ -1344,7 +1344,6 @@ def main(args): ...@@ -1344,7 +1344,6 @@ def main(args):
if not train_dataset.custom_instance_prompts: if not train_dataset.custom_instance_prompts:
del tokenizers, text_encoders del tokenizers, text_encoders
# Explicitly delete the objects as well, otherwise only the lists are deleted and the original references remain, preventing garbage collection # Explicitly delete the objects as well, otherwise only the lists are deleted and the original references remain, preventing garbage collection
del tokenizer_one, tokenizer_two, tokenizer_three
del text_encoder_one, text_encoder_two, text_encoder_three del text_encoder_one, text_encoder_two, text_encoder_three
gc.collect() gc.collect()
if torch.cuda.is_available(): if torch.cuda.is_available():
......
...@@ -1372,7 +1372,6 @@ def main(args): ...@@ -1372,7 +1372,6 @@ def main(args):
if not args.train_text_encoder and not train_dataset.custom_instance_prompts: if not args.train_text_encoder and not train_dataset.custom_instance_prompts:
del tokenizers, text_encoders del tokenizers, text_encoders
# Explicitly delete the objects as well, otherwise only the lists are deleted and the original references remain, preventing garbage collection # Explicitly delete the objects as well, otherwise only the lists are deleted and the original references remain, preventing garbage collection
del tokenizer_one, tokenizer_two, tokenizer_three
del text_encoder_one, text_encoder_two, text_encoder_three del text_encoder_one, text_encoder_two, text_encoder_three
gc.collect() gc.collect()
if torch.cuda.is_available(): if torch.cuda.is_available():
......
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