modify weight path

This commit is contained in:
Xintao
2022-09-19 01:43:22 +08:00
parent 89aa45c72d
commit 0ac8d66d39
8 changed files with 23 additions and 28 deletions

View File

@@ -190,7 +190,7 @@ def inference_video(args, video_save_path, device=None, total_workers=1, worker_
# ---------------------- determine model paths ---------------------- #
model_path = os.path.join('experiments/pretrained_models', args.model_name + '.pth')
if not os.path.isfile(model_path):
model_path = os.path.join('realesrgan/weights', args.model_name + '.pth')
model_path = os.path.join('weights', args.model_name + '.pth')
if not os.path.isfile(model_path):
raise ValueError(f'Model {args.model_name} does not exist.')