Spaces:
Sleeping
Sleeping
Update app.py
Browse files
app.py
CHANGED
|
@@ -164,16 +164,19 @@ ensure_model_weights("3b")
|
|
| 164 |
subprocess.run(shlex.split("pip install apex-0.1-cp310-cp310-linux_x86_64.whl"))
|
| 165 |
print(f"✅ setup completed Apex")
|
| 166 |
|
| 167 |
-
# download
|
| 168 |
-
|
| 169 |
-
|
| 170 |
-
|
| 171 |
-
|
| 172 |
-
|
| 173 |
-
|
| 174 |
-
|
| 175 |
-
|
| 176 |
-
|
|
|
|
|
|
|
|
|
|
| 177 |
|
| 178 |
def configure_sequence_parallel(sp_size):
|
| 179 |
if sp_size > 1:
|
|
|
|
| 164 |
subprocess.run(shlex.split("pip install apex-0.1-cp310-cp310-linux_x86_64.whl"))
|
| 165 |
print(f"✅ setup completed Apex")
|
| 166 |
|
| 167 |
+
# download example videos (optional – app still works if network fails)
|
| 168 |
+
_example_videos = {
|
| 169 |
+
'01.mp4': 'https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/23_1_lq.mp4',
|
| 170 |
+
'02.mp4': 'https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/28_1_lq.mp4',
|
| 171 |
+
'03.mp4': 'https://huggingface.co/datasets/Iceclear/SeedVR_VideoDemos/resolve/main/seedvr_videos_crf23/aigc1k/2_1_lq.mp4',
|
| 172 |
+
}
|
| 173 |
+
for _fname, _url in _example_videos.items():
|
| 174 |
+
if not os.path.exists(_fname):
|
| 175 |
+
try:
|
| 176 |
+
torch.hub.download_url_to_file(_url, _fname)
|
| 177 |
+
print(f"✅ Downloaded example video: {_fname}")
|
| 178 |
+
except Exception as _e:
|
| 179 |
+
print(f"⚠️ Could not download example video {_fname}: {_e} (skipping)")
|
| 180 |
|
| 181 |
def configure_sequence_parallel(sp_size):
|
| 182 |
if sp_size > 1:
|