From 55886a01168bcd921145ab19f4635bf987acc472 Mon Sep 17 00:00:00 2001 From: Kohya S Date: Sun, 24 Sep 2023 11:25:54 +0900 Subject: [PATCH] add .pt and .pth for available extension --- networks/resize_lora.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/networks/resize_lora.py b/networks/resize_lora.py index 41585f79..0bc26399 100644 --- a/networks/resize_lora.py +++ b/networks/resize_lora.py @@ -283,8 +283,8 @@ 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.save_to is None or not (args.save_to.endswith('.ckpt') or args.save_to.endswith('.pt') or args.save_to.endswith('.pth') or args.save_to.endswith('.safetensors')): + raise Exception("The --save_to argument must be specified and must be a .ckpt , .pt, .pth or .safetensors file.") def str_to_dtype(p):