Merge pull request #815 from jvkap/patch-1

Update resize_lora.py
This commit is contained in:
Kohya S
2023-09-24 11:02:12 +09:00
committed by GitHub

View File

@@ -283,7 +283,10 @@ def resize_lora_model(lora_sd, new_rank, save_dtype, device, dynamic_method, dyn
def resize(args):
if args.save_to is None or not (args.save_to.endswith('.ckpt') or args.save_to.endswith('.safetensors')):
raise Exception("The --save_to argument must be specified and must be a .ckpt or .safetensors file.")
def str_to_dtype(p):
if p == 'float':
return torch.float