mirror of
https://github.com/kohya-ss/sd-scripts.git
synced 2026-04-09 06:45:09 +00:00
Update resize_lora.py
This commit is contained in:
@@ -285,9 +285,7 @@ def resize_lora_model(lora_sd, new_rank, save_dtype, device, dynamic_method, dyn
|
|||||||
def resize(args):
|
def resize(args):
|
||||||
if args.save_to is None or not (args.save_to.endswith('.ckpt') or args.save_to.endswith('.safetensors')):
|
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.")
|
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):
|
def str_to_dtype(p):
|
||||||
if p == 'float':
|
if p == 'float':
|
||||||
|
|||||||
Reference in New Issue
Block a user