Skip to content

Commit e7f0625

Browse files
committed
fix remaning files affected by basicsr deprication
1 parent d3463ae commit e7f0625

File tree

2 files changed

+10
-2
lines changed

2 files changed

+10
-2
lines changed

scripts/deforum_helpers/frame_interpolation.py

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -190,7 +190,11 @@ def prepare_film_inference(deforum_models_path, x_am, sl_enabled, sl_am, keep_im
190190
return interp_vid_path
191191

192192
def check_and_download_film_model(model_name, model_dest_folder):
193-
from basicsr.utils.download_util import load_file_from_url
193+
try:
194+
from modules.modelloader import load_file_from_url
195+
except:
196+
print("Try to fallback to basicsr with older modules")
197+
from basicsr.utils.download_util import load_file_from_url
194198
if model_name == 'film_net_fp16.pt':
195199
model_dest_path = os.path.join(model_dest_folder, model_name)
196200
download_url = 'https://github.com/hithereai/frame-interpolation-pytorch/releases/download/film_net_fp16.pt/film_net_fp16.pt'

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

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -102,7 +102,11 @@ def download_rife_model(path, deforum_models_path):
102102
target_file = f"{path}.pkl"
103103
target_path = os.path.join(deforum_models_path, target_file)
104104
if not os.path.exists(target_path):
105-
from basicsr.utils.download_util import load_file_from_url
105+
try:
106+
from modules.modelloader import load_file_from_url
107+
except:
108+
print("Try to fallback to basicsr with older modules")
109+
from basicsr.utils.download_util import load_file_from_url
106110
load_file_from_url(options[path][1], deforum_models_path)
107111
if checksum(target_path) != options[path][0]:
108112
raise Exception(f"Error while downloading {target_file}. Please download from here: {options[path][1]} and place in: " + deforum_models_path)

0 commit comments

Comments
 (0)