Spaces:
Running
on
L4
Running
on
L4
Merge branch 'main' of https://huggingface.co/spaces/vfontech/Multi-Input-Res-Diffusion-VFI
Browse files- app.py +4 -5
- requirements.txt +0 -2
app.py
CHANGED
@@ -26,7 +26,7 @@ def to_numpy(img_tensor):
|
|
26 |
img_np = np.clip(img_np, 0, 1)
|
27 |
return (img_np * 255).astype(np.uint8)
|
28 |
|
29 |
-
def interpolate(img0_pil, img2_pil, tau, num_samples):
|
30 |
img0 = transform(img0_pil.convert("RGB")).unsqueeze(0).to(device)
|
31 |
img2 = transform(img2_pil.convert("RGB")).unsqueeze(0).to(device)
|
32 |
|
@@ -70,10 +70,9 @@ demo = gr.Interface(
|
|
70 |
"- If `Number of Samples` > 1, ignores Tau and generates a sequence of interpolated images."
|
71 |
),
|
72 |
examples=[
|
73 |
-
["_data/example_images/frame1.png", "_data/example_images/frame3.png", 0.5],
|
74 |
-
]
|
75 |
)
|
76 |
|
77 |
if __name__ == "__main__":
|
78 |
-
demo.
|
79 |
-
demo.launch(max_threads=1)
|
|
|
26 |
img_np = np.clip(img_np, 0, 1)
|
27 |
return (img_np * 255).astype(np.uint8)
|
28 |
|
29 |
+
def interpolate(img0_pil, img2_pil, tau=0.5, num_samples=1):
|
30 |
img0 = transform(img0_pil.convert("RGB")).unsqueeze(0).to(device)
|
31 |
img2 = transform(img2_pil.convert("RGB")).unsqueeze(0).to(device)
|
32 |
|
|
|
70 |
"- If `Number of Samples` > 1, ignores Tau and generates a sequence of interpolated images."
|
71 |
),
|
72 |
examples=[
|
73 |
+
["_data/example_images/frame1.png", "_data/example_images/frame3.png", 0.5, 1],
|
74 |
+
]
|
75 |
)
|
76 |
|
77 |
if __name__ == "__main__":
|
78 |
+
demo.launch()
|
|
requirements.txt
CHANGED
@@ -1,7 +1,6 @@
|
|
1 |
# Main dependencies
|
2 |
torch>=2.6.0
|
3 |
torchvision>=0.21.0
|
4 |
-
lightning>=2.2.4
|
5 |
numpy>=1.26.4
|
6 |
matplotlib>=3.8.0
|
7 |
pyyaml>=6.0.0
|
@@ -26,7 +25,6 @@ cupy-cuda12x>=12.0.0 # For CUDA 12.4
|
|
26 |
|
27 |
# Utilities and tools
|
28 |
scipy>=1.7.0
|
29 |
-
tensorboard>=2.8.0
|
30 |
|
31 |
# Project-Specific Dependencies
|
32 |
# RAFT (Flow Estimation)
|
|
|
1 |
# Main dependencies
|
2 |
torch>=2.6.0
|
3 |
torchvision>=0.21.0
|
|
|
4 |
numpy>=1.26.4
|
5 |
matplotlib>=3.8.0
|
6 |
pyyaml>=6.0.0
|
|
|
25 |
|
26 |
# Utilities and tools
|
27 |
scipy>=1.7.0
|
|
|
28 |
|
29 |
# Project-Specific Dependencies
|
30 |
# RAFT (Flow Estimation)
|