Update resize_lora.py

This commit is contained in:
jvkap
2023-09-11 11:41:33 -03:00
committed by GitHub
parent e33c007cd0
commit a0e05fa291

View File

@@ -285,9 +285,7 @@ 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.")
if args.model is None or not (args.model.endswith('.ckpt') or args.model.endswith('.safetensors')):
raise Exception("The --model argument must be specified and must be a .ckpt or .safetensors file.")
def str_to_dtype(p):
if p == 'float':