Spaces:
Runtime error
Runtime error
Commit
·
33f06db
1
Parent(s):
97be820
update
Browse files- app.py +5 -1
- requirements.txt +7 -5
app.py
CHANGED
|
@@ -13,6 +13,7 @@ import gradio as gr
|
|
| 13 |
# from moviepy.editor import *
|
| 14 |
from diffusers.utils.import_utils import is_xformers_available
|
| 15 |
from diffusers.utils import load_image, export_to_video, export_to_gif
|
|
|
|
| 16 |
|
| 17 |
import os
|
| 18 |
import sys
|
|
@@ -25,6 +26,8 @@ from gradio_demo.utils_drag import *
|
|
| 25 |
import warnings
|
| 26 |
print("gr file", gr.__file__)
|
| 27 |
|
|
|
|
|
|
|
| 28 |
from huggingface_hub import hf_hub_download, snapshot_download
|
| 29 |
|
| 30 |
os.makedirs("checkpoints", exist_ok=True)
|
|
@@ -705,7 +708,8 @@ if __name__ == "__main__":
|
|
| 705 |
3. Interpolate the images (according the path) with a click on "Run" button. <br>""")
|
| 706 |
|
| 707 |
# device, args, height, width, model_length
|
| 708 |
-
Framer = Drag("cuda", args, 320, 512, 14)
|
|
|
|
| 709 |
first_frame_path = gr.State()
|
| 710 |
last_frame_path = gr.State()
|
| 711 |
tracking_points = gr.State([])
|
|
|
|
| 13 |
# from moviepy.editor import *
|
| 14 |
from diffusers.utils.import_utils import is_xformers_available
|
| 15 |
from diffusers.utils import load_image, export_to_video, export_to_gif
|
| 16 |
+
import devicetorch
|
| 17 |
|
| 18 |
import os
|
| 19 |
import sys
|
|
|
|
| 26 |
import warnings
|
| 27 |
print("gr file", gr.__file__)
|
| 28 |
|
| 29 |
+
DEVICE = devicetorch.get(torch)
|
| 30 |
+
|
| 31 |
from huggingface_hub import hf_hub_download, snapshot_download
|
| 32 |
|
| 33 |
os.makedirs("checkpoints", exist_ok=True)
|
|
|
|
| 708 |
3. Interpolate the images (according the path) with a click on "Run" button. <br>""")
|
| 709 |
|
| 710 |
# device, args, height, width, model_length
|
| 711 |
+
#Framer = Drag("cuda", args, 320, 512, 14)
|
| 712 |
+
Framer = Drag(DEVICE, args, 320, 512, 14)
|
| 713 |
first_frame_path = gr.State()
|
| 714 |
last_frame_path = gr.State()
|
| 715 |
tracking_points = gr.State([])
|
requirements.txt
CHANGED
|
@@ -1,14 +1,16 @@
|
|
| 1 |
-
torch==2.0.0
|
| 2 |
-
torchvision
|
| 3 |
diffusers==0.24.0
|
| 4 |
transformers==4.27.0
|
| 5 |
-
xformers==0.0.18
|
| 6 |
imageio==2.27.0
|
| 7 |
-
decord==0.6.0
|
| 8 |
einops
|
| 9 |
opencv-python
|
| 10 |
av
|
| 11 |
accelerate==0.27.2
|
| 12 |
scipy
|
| 13 |
colorlog
|
| 14 |
-
numpy==1.24.3
|
|
|
|
|
|
|
|
|
| 1 |
+
#torch==2.0.0
|
| 2 |
+
#torchvision
|
| 3 |
diffusers==0.24.0
|
| 4 |
transformers==4.27.0
|
| 5 |
+
#xformers==0.0.18
|
| 6 |
imageio==2.27.0
|
| 7 |
+
#decord==0.6.0
|
| 8 |
einops
|
| 9 |
opencv-python
|
| 10 |
av
|
| 11 |
accelerate==0.27.2
|
| 12 |
scipy
|
| 13 |
colorlog
|
| 14 |
+
numpy==1.24.3
|
| 15 |
+
devicetorch
|
| 16 |
+
gradio
|