diff options
Diffstat (limited to 'training/strategy/ti.py')
-rw-r--r-- | training/strategy/ti.py | 2 |
1 files changed, 1 insertions, 1 deletions
diff --git a/training/strategy/ti.py b/training/strategy/ti.py index f00045f..08af89d 100644 --- a/training/strategy/ti.py +++ b/training/strategy/ti.py | |||
@@ -142,7 +142,7 @@ def textual_inversion_strategy_callbacks( | |||
142 | checkpoint_output_dir / f"{slugify(token)}_{step}_{postfix}.bin" | 142 | checkpoint_output_dir / f"{slugify(token)}_{step}_{postfix}.bin" |
143 | ) | 143 | ) |
144 | 144 | ||
145 | @on_eval() | 145 | @torch.no_grad() |
146 | def on_sample(step): | 146 | def on_sample(step): |
147 | unet_ = accelerator.unwrap_model(unet, keep_fp32_wrapper=True) | 147 | unet_ = accelerator.unwrap_model(unet, keep_fp32_wrapper=True) |
148 | text_encoder_ = accelerator.unwrap_model(text_encoder, keep_fp32_wrapper=True) | 148 | text_encoder_ = accelerator.unwrap_model(text_encoder, keep_fp32_wrapper=True) |