Spaces:
Running
on
Zero
Running
on
Zero
isort
Browse files
app.py
CHANGED
@@ -1,28 +1,31 @@
|
|
1 |
-
import spaces
|
2 |
import datetime
|
|
|
|
|
3 |
import uuid
|
4 |
-
from PIL import Image
|
5 |
-
import numpy as np
|
6 |
-
import cv2
|
7 |
-
from scipy.interpolate import interp1d, PchipInterpolator
|
8 |
-
from packaging import version
|
9 |
|
|
|
|
|
|
|
|
|
10 |
import torch
|
11 |
import torchvision
|
12 |
-
import
|
13 |
# from moviepy.editor import *
|
14 |
from diffusers.utils.import_utils import is_xformers_available
|
15 |
-
from
|
|
|
|
|
16 |
|
17 |
-
import os
|
18 |
-
import sys
|
19 |
sys.path.insert(0, os.getcwd())
|
20 |
-
|
21 |
-
|
22 |
-
from pipelines.pipeline_stable_video_diffusion_interp_control import StableVideoDiffusionInterpControlPipeline
|
23 |
from gradio_demo.utils_drag import *
|
|
|
|
|
|
|
|
|
|
|
24 |
|
25 |
-
import warnings
|
26 |
print("gr file", gr.__file__)
|
27 |
|
28 |
from huggingface_hub import hf_hub_download, snapshot_download
|
@@ -416,8 +419,9 @@ class Drag:
|
|
416 |
sift_track_update = True
|
417 |
controlnet_cond_scale = 0.5
|
418 |
|
|
|
|
|
419 |
from models_diffusers.sift_match import sift_match
|
420 |
-
from models_diffusers.sift_match import interpolate_trajectory as sift_interpolate_trajectory
|
421 |
|
422 |
output_file_sift = os.path.join(args.output_dir, "sift.png")
|
423 |
|
|
|
|
|
1 |
import datetime
|
2 |
+
import os
|
3 |
+
import sys
|
4 |
import uuid
|
|
|
|
|
|
|
|
|
|
|
5 |
|
6 |
+
import cv2
|
7 |
+
import gradio as gr
|
8 |
+
import numpy as np
|
9 |
+
import spaces
|
10 |
import torch
|
11 |
import torchvision
|
12 |
+
from diffusers.utils import export_to_gif, export_to_video, load_image
|
13 |
# from moviepy.editor import *
|
14 |
from diffusers.utils.import_utils import is_xformers_available
|
15 |
+
from packaging import version
|
16 |
+
from PIL import Image
|
17 |
+
from scipy.interpolate import PchipInterpolator, interp1d
|
18 |
|
|
|
|
|
19 |
sys.path.insert(0, os.getcwd())
|
20 |
+
import warnings
|
21 |
+
|
|
|
22 |
from gradio_demo.utils_drag import *
|
23 |
+
from models_diffusers.controlnet_svd import ControlNetSVDModel
|
24 |
+
from models_diffusers.unet_spatio_temporal_condition import \
|
25 |
+
UNetSpatioTemporalConditionModel
|
26 |
+
from pipelines.pipeline_stable_video_diffusion_interp_control import \
|
27 |
+
StableVideoDiffusionInterpControlPipeline
|
28 |
|
|
|
29 |
print("gr file", gr.__file__)
|
30 |
|
31 |
from huggingface_hub import hf_hub_download, snapshot_download
|
|
|
419 |
sift_track_update = True
|
420 |
controlnet_cond_scale = 0.5
|
421 |
|
422 |
+
from models_diffusers.sift_match import \
|
423 |
+
interpolate_trajectory as sift_interpolate_trajectory
|
424 |
from models_diffusers.sift_match import sift_match
|
|
|
425 |
|
426 |
output_file_sift = os.path.join(args.output_dir, "sift.png")
|
427 |
|