mirror of
https://github.com/huggingface/diffusers.git
synced 2026-01-27 17:22:53 +03:00
delete vae and text encoders after use in SDXL training script (#6693)
delete vae and text encoders after use Co-authored-by: Sayak Paul <spsayakpaul@gmail.com>
This commit is contained in:
@@ -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()
|
||||
|
||||
Reference in New Issue
Block a user