mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-06 13:47:06 +00:00
Merge pull request #8 from kohya-ss/dev
Fix text encoder training is not stopped #4. closes #4
This commit is contained in:
@@ -1011,6 +1011,7 @@ def train(args):
|
||||
if stop_text_encoder_training:
|
||||
print(f"stop text encoder training at step {global_step}")
|
||||
text_encoder.train(False)
|
||||
text_encoder.requires_grad_(False)
|
||||
|
||||
with accelerator.accumulate(unet):
|
||||
with torch.no_grad():
|
||||
|
||||
Reference in New Issue
Block a user