From 842f26654bbe7dfd2f45df1fd2660d3f902af8cc Mon Sep 17 00:00:00 2001 From: Volpeon Date: Fri, 17 Feb 2023 14:53:25 +0100 Subject: Remove xformers, switch to Pytorch Nightly --- training/strategy/dreambooth.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) (limited to 'training/strategy/dreambooth.py') diff --git a/training/strategy/dreambooth.py b/training/strategy/dreambooth.py index 8aaed3a..d697554 100644 --- a/training/strategy/dreambooth.py +++ b/training/strategy/dreambooth.py @@ -144,8 +144,8 @@ def dreambooth_strategy_callbacks( print("Saving model...") - unet_ = accelerator.unwrap_model(unet) - text_encoder_ = accelerator.unwrap_model(text_encoder) + unet_ = accelerator.unwrap_model(unet, False) + text_encoder_ = accelerator.unwrap_model(text_encoder, False) with ema_context(): pipeline = VlpnStableDiffusion( @@ -167,8 +167,8 @@ def dreambooth_strategy_callbacks( @torch.no_grad() def on_sample(step): with ema_context(): - unet_ = accelerator.unwrap_model(unet) - text_encoder_ = accelerator.unwrap_model(text_encoder) + unet_ = accelerator.unwrap_model(unet, False) + text_encoder_ = accelerator.unwrap_model(text_encoder, False) orig_unet_dtype = unet_.dtype orig_text_encoder_dtype = text_encoder_.dtype -- cgit v1.2.3-54-g00ecf