Skip to content

Commit 8da9db0

Browse files
committed
use load_file_from_url with named parameters
1 parent e7f0625 commit 8da9db0

File tree

4 files changed

+4
-4
lines changed

4 files changed

+4
-4
lines changed

scripts/deforum_helpers/frame_interpolation.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -206,7 +206,7 @@ def check_and_download_film_model(model_name, model_dest_folder):
206206
try:
207207
os.makedirs(model_dest_folder, exist_ok=True)
208208
# download film model from url
209-
load_file_from_url(download_url, model_dest_folder)
209+
load_file_from_url(url=download_url, model_dir=model_dest_folder)
210210
# verify checksum
211211
if checksum(model_dest_path) != film_model_hash:
212212
raise Exception(f"Error while downloading {model_name}. Please download from: {download_url}, and put in: {model_dest_folder}")

scripts/deforum_helpers/src/rife/rife_new_gen/RIFE_HDv3.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -107,6 +107,6 @@ def download_rife_model(path, deforum_models_path):
107107
except:
108108
print("Try to fallback to basicsr with older modules")
109109
from basicsr.utils.download_util import load_file_from_url
110-
load_file_from_url(options[path][1], deforum_models_path)
110+
load_file_from_url(url=options[path][1], model_dir=deforum_models_path)
111111
if checksum(target_path) != options[path][0]:
112112
raise Exception(f"Error while downloading {target_file}. Please download from here: {options[path][1]} and place in: " + deforum_models_path)

scripts/deforum_helpers/upscaling.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@ def check_and_download_realesrgan_ncnn(models_folder, current_user_os):
119119
try:
120120
os.makedirs(realesrgan_ncnn_folder, exist_ok=True)
121121
# download exec and model files from url
122-
load_file_from_url(download_url, realesrgan_ncnn_folder)
122+
load_file_from_url(url=download_url, model_dir=realesrgan_ncnn_folder)
123123
# check downloaded zip's hash
124124
with open(realesrgan_zip_path, 'rb') as f:
125125
file_hash = checksum(realesrgan_zip_path)

scripts/deforum_helpers/video_audio_utilities.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -401,7 +401,7 @@ def check_and_download_gifski(models_folder, current_user_os):
401401
file_path = os.path.join(models_folder, file_name)
402402

403403
if not os.path.exists(file_path):
404-
load_file_from_url(download_url, models_folder)
404+
load_file_from_url(url=download_url, model_dir=models_folder)
405405
if current_user_os in ['Linux','Mac']:
406406
os.chmod(file_path, 0o755)
407407
if current_user_os == 'Mac':

0 commit comments

Comments
 (0)