From a0b63ee7f4a8c793c0d200c86ef07677aa4cbf2e Mon Sep 17 00:00:00 2001 From: Volpeon Date: Thu, 13 Apr 2023 07:14:24 +0200 Subject: Update --- training/strategy/lora.py | 6 ++---- 1 file changed, 2 insertions(+), 4 deletions(-) (limited to 'training/strategy/lora.py') diff --git a/training/strategy/lora.py b/training/strategy/lora.py index 73ec8f2..1517ee8 100644 --- a/training/strategy/lora.py +++ b/training/strategy/lora.py @@ -140,8 +140,7 @@ def lora_strategy_callbacks( with open(checkpoint_output_dir / "lora_config.json", "w") as f: json.dump(lora_config, f) - del unet_ - del text_encoder_ + del unet_, text_encoder_ if torch.cuda.is_available(): torch.cuda.empty_cache() @@ -153,8 +152,7 @@ def lora_strategy_callbacks( save_samples_(step=step, unet=unet_, text_encoder=text_encoder_) - del unet_ - del text_encoder_ + del unet_, text_encoder_ if torch.cuda.is_available(): torch.cuda.empty_cache() -- cgit v1.2.3-54-g00ecf