diff options
Diffstat (limited to 'training/strategy')
-rw-r--r-- | training/strategy/lora.py | 2 | ||||
-rw-r--r-- | training/strategy/ti.py | 2 |
2 files changed, 2 insertions, 2 deletions
diff --git a/training/strategy/lora.py b/training/strategy/lora.py index bc10e58..4dd1100 100644 --- a/training/strategy/lora.py +++ b/training/strategy/lora.py | |||
@@ -91,7 +91,7 @@ def lora_strategy_callbacks( | |||
91 | print(f"Saving checkpoint for step {step}...") | 91 | print(f"Saving checkpoint for step {step}...") |
92 | 92 | ||
93 | unet_ = accelerator.unwrap_model(unet) | 93 | unet_ = accelerator.unwrap_model(unet) |
94 | unet_.save_attn_procs(checkpoint_output_dir.joinpath(f"{step}_{postfix}")) | 94 | unet_.save_attn_procs(checkpoint_output_dir / f"{step}_{postfix}") |
95 | del unet_ | 95 | del unet_ |
96 | 96 | ||
97 | @torch.no_grad() | 97 | @torch.no_grad() |
diff --git a/training/strategy/ti.py b/training/strategy/ti.py index da2b81c..0de3cb0 100644 --- a/training/strategy/ti.py +++ b/training/strategy/ti.py | |||
@@ -138,7 +138,7 @@ def textual_inversion_strategy_callbacks( | |||
138 | for (token, ids) in zip(placeholder_tokens, placeholder_token_ids): | 138 | for (token, ids) in zip(placeholder_tokens, placeholder_token_ids): |
139 | text_encoder.text_model.embeddings.save_embed( | 139 | text_encoder.text_model.embeddings.save_embed( |
140 | ids, | 140 | ids, |
141 | checkpoint_output_dir.joinpath(f"{slugify(token)}_{step}_{postfix}.bin") | 141 | checkpoint_output_dir / f"{slugify(token)}_{step}_{postfix}.bin" |
142 | ) | 142 | ) |
143 | 143 | ||
144 | @torch.no_grad() | 144 | @torch.no_grad() |