update
Browse files- download_checkpoints.sh +2 -0
- videomama_wrapper.py +9 -0
download_checkpoints.sh
CHANGED
|
@@ -47,7 +47,9 @@ if [ -d "checkpoints/videomama_unet" ]; then
|
|
| 47 |
else
|
| 48 |
git clone https://huggingface.co/SammyLim/VideoMama checkpoints/videomama
|
| 49 |
fi
|
|
|
|
| 50 |
|
|
|
|
| 51 |
git clone https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt checkpoints/stable-video-diffusion-img2vid-xt
|
| 52 |
|
| 53 |
echo ""
|
|
|
|
| 47 |
else
|
| 48 |
git clone https://huggingface.co/SammyLim/VideoMama checkpoints/videomama
|
| 49 |
fi
|
| 50 |
+
echo "videomama checkpoint setup complete."
|
| 51 |
|
| 52 |
+
echo "Checking Stable Video Diffusion Img2Vid XT checkpoint..."
|
| 53 |
git clone https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt checkpoints/stable-video-diffusion-img2vid-xt
|
| 54 |
|
| 55 |
echo ""
|
videomama_wrapper.py
CHANGED
|
@@ -3,6 +3,15 @@ VideoMaMa Inference Wrapper
|
|
| 3 |
Handles video matting with mask conditioning
|
| 4 |
"""
|
| 5 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 6 |
import os
|
| 7 |
import torch
|
| 8 |
import numpy as np
|
|
|
|
| 3 |
Handles video matting with mask conditioning
|
| 4 |
"""
|
| 5 |
|
| 6 |
+
import os
|
| 7 |
+
import torch
|
| 8 |
+
|
| 9 |
+
# CRITICAL: Redirect cache to temporary storage
|
| 10 |
+
os.environ['TORCH_HOME'] = '/tmp/torch_cache'
|
| 11 |
+
os.environ['HUB_DIR'] = '/tmp/torch_hub'
|
| 12 |
+
os.environ['TMPDIR'] = '/tmp'
|
| 13 |
+
torch.hub.set_dir('/tmp/torch_hub')
|
| 14 |
+
|
| 15 |
import os
|
| 16 |
import torch
|
| 17 |
import numpy as np
|