"references/vscode:/vscode.git/clone" did not exist on "2c127da8b5e2e8f44b50994c6cb931bcca267cfe"
Unverified Commit 98d46a3f authored by Anatoly Belikov's avatar Anatoly Belikov Committed by GitHub
Browse files

delete vae and text encoders after use in SDXL training script (#6693)



delete vae and text encoders after use
Co-authored-by: default avatarSayak Paul <spsayakpaul@gmail.com>
parent 4330a747
......@@ -911,6 +911,7 @@ def main(args):
)
precomputed_dataset = precomputed_dataset.with_transform(preprocess_train)
del compute_vae_encodings_fn, compute_embeddings_fn, text_encoder_one, text_encoder_two
del text_encoders, tokenizers, vae
gc.collect()
torch.cuda.empty_cache()
......
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