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

@@ -88,13 +88,13 @@ def main():
if args.model_path is not None:
model_path = args.model_path
else:
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):
ROOT_DIR = os.path.dirname(os.path.abspath(__file__))
for url in file_url:
# model_path will be updated
model_path = load_file_from_url(
url=url, model_dir=os.path.join(ROOT_DIR, 'realesrgan/weights'), progress=True, file_name=None)
url=url, model_dir=os.path.join(ROOT_DIR, 'weights'), progress=True, file_name=None)
# use dni to control the denoise strength
dni_weight = None