add compatibility for int LR (D-Adaptation etc.) #1620

This commit is contained in:
Kohya S
2024-09-20 22:22:24 +09:00
parent 24f8975fb7
commit 583d4a436c

View File

@@ -472,7 +472,7 @@ class NetworkTrainer:
text_encoder_lr = args.text_encoder_lr
else:
# toml backward compatibility
if args.text_encoder_lr is None or isinstance(args.text_encoder_lr, float):
if args.text_encoder_lr is None or isinstance(args.text_encoder_lr, float) or isinstance(args.text_encoder_lr, int):
text_encoder_lr = args.text_encoder_lr
else:
text_encoder_lr = None if len(args.text_encoder_lr) == 0 else args.text_encoder_lr[0]