Spaces:
Runtime error
Runtime error
Update scripts/gradio/i2v_test_application.py
Browse files
scripts/gradio/i2v_test_application.py
CHANGED
@@ -41,7 +41,7 @@ class Image2Video():
|
|
41 |
def __init__(self,result_dir='./tmp/',gpu_num=1,resolution='256_256') -> None:
|
42 |
self.resolution = (int(resolution.split('_')[0]), int(resolution.split('_')[1])) #hw
|
43 |
self.download_model()
|
44 |
-
|
45 |
self.result_dir = result_dir
|
46 |
if not os.path.exists(self.result_dir):
|
47 |
os.mkdir(self.result_dir)
|
@@ -59,8 +59,9 @@ class Image2Video():
|
|
59 |
cn_config = OmegaConf.load(cn_config_file)
|
60 |
cn_model_config = cn_config.pop("control_stage_config", OmegaConf.create())
|
61 |
|
62 |
-
|
63 |
model_list = []
|
|
|
64 |
for gpu_id in range(gpu_num):
|
65 |
model = instantiate_from_config(model_config)
|
66 |
cn_model = instantiate_from_config(cn_model_config)
|
@@ -78,6 +79,7 @@ class Image2Video():
|
|
78 |
model_list.append(model)
|
79 |
self.model_list = model_list
|
80 |
self.save_fps = 8
|
|
|
81 |
|
82 |
@spaces.GPU(duration=100)
|
83 |
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):
|
|
|
41 |
def __init__(self,result_dir='./tmp/',gpu_num=1,resolution='256_256') -> None:
|
42 |
self.resolution = (int(resolution.split('_')[0]), int(resolution.split('_')[1])) #hw
|
43 |
self.download_model()
|
44 |
+
print("after download model")
|
45 |
self.result_dir = result_dir
|
46 |
if not os.path.exists(self.result_dir):
|
47 |
os.mkdir(self.result_dir)
|
|
|
59 |
cn_config = OmegaConf.load(cn_config_file)
|
60 |
cn_model_config = cn_config.pop("control_stage_config", OmegaConf.create())
|
61 |
|
62 |
+
print("before init")
|
63 |
model_list = []
|
64 |
+
|
65 |
for gpu_id in range(gpu_num):
|
66 |
model = instantiate_from_config(model_config)
|
67 |
cn_model = instantiate_from_config(cn_model_config)
|
|
|
79 |
model_list.append(model)
|
80 |
self.model_list = model_list
|
81 |
self.save_fps = 8
|
82 |
+
print("init done.")
|
83 |
|
84 |
@spaces.GPU(duration=100)
|
85 |
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):
|