modify weight path
This commit is contained in:
@@ -56,13 +56,10 @@ class RealESRGANer():
|
||||
assert len(model_path) == len(dni_weight), 'model_path and dni_weight should have the save length.'
|
||||
loadnet = self.dni(model_path[0], model_path[1], dni_weight)
|
||||
else:
|
||||
# if the model_path starts with https, it will first download models to the folder: realesrgan/weights
|
||||
# if the model_path starts with https, it will first download models to the folder: weights
|
||||
if model_path.startswith('https://'):
|
||||
model_path = load_file_from_url(
|
||||
url=model_path,
|
||||
model_dir=os.path.join(ROOT_DIR, 'realesrgan/weights'),
|
||||
progress=True,
|
||||
file_name=None)
|
||||
url=model_path, model_dir=os.path.join(ROOT_DIR, 'weights'), progress=True, file_name=None)
|
||||
loadnet = torch.load(model_path, map_location=torch.device('cpu'))
|
||||
|
||||
# prefer to use params_ema
|
||||
|
||||
@@ -1,3 +0,0 @@
|
||||
# Weights
|
||||
|
||||
Put the downloaded weights to this folder.
|
||||
Reference in New Issue
Block a user