From 12b9aca96a36dd77a6b2b99bbc1743d87a7ce733 Mon Sep 17 00:00:00 2001 From: Volpeon Date: Sat, 24 Jun 2023 21:00:29 +0200 Subject: Update --- training/strategy/dreambooth.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) (limited to 'training/strategy') diff --git a/training/strategy/dreambooth.py b/training/strategy/dreambooth.py index bd853e2..3d1abf7 100644 --- a/training/strategy/dreambooth.py +++ b/training/strategy/dreambooth.py @@ -98,7 +98,6 @@ def dreambooth_strategy_callbacks( if cycle < train_text_encoder_cycles: text_encoder.train() - tokenizer.train() yield @@ -155,6 +154,8 @@ def dreambooth_strategy_callbacks( unet_ = accelerator.unwrap_model(unet, keep_fp32_wrapper=False) text_encoder_ = accelerator.unwrap_model(text_encoder, keep_fp32_wrapper=False) + text_encoder_.text_model.embeddings.persist(False) + with ema_context(): pipeline = VlpnStableDiffusion( text_encoder=text_encoder_, -- cgit v1.2.3-54-g00ecf