Spaces:
Running
on
Zero
Running
on
Zero
Update video_to_video/video_to_video_model.py
Browse files
video_to_video/video_to_video_model.py
CHANGED
@@ -17,10 +17,10 @@ from diffusers import AutoencoderKLTemporalDecoder
|
|
17 |
import requests
|
18 |
|
19 |
def download_model(url, model_path):
|
20 |
-
if not os.path.exists(os.path.join(model_path, '
|
21 |
print(f"Model not found at {model_path}, downloading...")
|
22 |
response = requests.get(url, stream=True)
|
23 |
-
with open(os.path.join(model_path, '
|
24 |
for chunk in response.iter_content(chunk_size=1024):
|
25 |
if chunk:
|
26 |
f.write(chunk)
|
@@ -54,7 +54,7 @@ class VideoToVideo_sr():
|
|
54 |
download_model(model_url, cfg.model_path)
|
55 |
|
56 |
# 拼接完整路径
|
57 |
-
model_file_path = os.path.join(
|
58 |
print('model_file_path:', model_file_path)
|
59 |
|
60 |
# 加载模型
|
|
|
17 |
import requests
|
18 |
|
19 |
def download_model(url, model_path):
|
20 |
+
if not os.path.exists(os.path.join(model_path, 'heavy_deg.pt')):
|
21 |
print(f"Model not found at {model_path}, downloading...")
|
22 |
response = requests.get(url, stream=True)
|
23 |
+
with open(os.path.join(model_path, 'heavy_deg.pt'), 'wb') as f:
|
24 |
for chunk in response.iter_content(chunk_size=1024):
|
25 |
if chunk:
|
26 |
f.write(chunk)
|
|
|
54 |
download_model(model_url, cfg.model_path)
|
55 |
|
56 |
# 拼接完整路径
|
57 |
+
model_file_path = os.path.join('pretrained_weight', 'I2VGen-XL-based', 'heavy_deg.pt')
|
58 |
print('model_file_path:', model_file_path)
|
59 |
|
60 |
# 加载模型
|