Spaces:
Runtime error
Runtime error
Update scripts/gradio/i2v_test_application.py
Browse files
scripts/gradio/i2v_test_application.py
CHANGED
@@ -12,6 +12,7 @@ from einops import rearrange
|
|
12 |
from cldm.model import load_state_dict
|
13 |
import cv2
|
14 |
|
|
|
15 |
|
16 |
def extract_frames(video_path):
|
17 |
# 動画ファイルを読み込む
|
@@ -77,6 +78,7 @@ class Image2Video():
|
|
77 |
self.model_list = model_list
|
78 |
self.save_fps = 8
|
79 |
|
|
|
80 |
def get_image(self, image, prompt, steps=50, cfg_scale=7.5, eta=1.0, fs=3, seed=123, image2=None, frame_guides=None,control_scale=0.6):
|
81 |
control_frames = extract_frames(frame_guides)
|
82 |
seed_everything(seed)
|
|
|
12 |
from cldm.model import load_state_dict
|
13 |
import cv2
|
14 |
|
15 |
+
import spaces
|
16 |
|
17 |
def extract_frames(video_path):
|
18 |
# 動画ファイルを読み込む
|
|
|
78 |
self.model_list = model_list
|
79 |
self.save_fps = 8
|
80 |
|
81 |
+
@spaces.GPU(duration=100)
|
82 |
def get_image(self, image, prompt, steps=50, cfg_scale=7.5, eta=1.0, fs=3, seed=123, image2=None, frame_guides=None,control_scale=0.6):
|
83 |
control_frames = extract_frames(frame_guides)
|
84 |
seed_everything(seed)
|