Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -99,6 +99,7 @@ def create_run_command(args):
|
|
99 |
|
100 |
return cmd
|
101 |
|
|
|
102 |
def run_process(cmd):
|
103 |
"""Run command and return output"""
|
104 |
print(f"Running command: {' '.join(cmd)}")
|
@@ -126,7 +127,7 @@ def run_process(cmd):
|
|
126 |
|
127 |
return "\n".join(output)
|
128 |
|
129 |
-
|
130 |
def process_motion_transfer(source, prompt, mt_repaint_option, mt_repaint_image):
|
131 |
"""Process video motion transfer task"""
|
132 |
try:
|
@@ -173,6 +174,7 @@ def process_motion_transfer(source, prompt, mt_repaint_option, mt_repaint_image)
|
|
173 |
print(f"Processing failed: {str(e)}\n{traceback.format_exc()}")
|
174 |
return None
|
175 |
|
|
|
176 |
def process_camera_control(source, prompt, camera_motion, tracking_method):
|
177 |
"""Process camera control task"""
|
178 |
try:
|
@@ -213,6 +215,7 @@ def process_camera_control(source, prompt, camera_motion, tracking_method):
|
|
213 |
print(f"Processing failed: {str(e)}\n{traceback.format_exc()}")
|
214 |
return None
|
215 |
|
|
|
216 |
def process_object_manipulation(source, prompt, object_motion, object_mask, tracking_method):
|
217 |
"""Process object manipulation task"""
|
218 |
try:
|
@@ -251,6 +254,7 @@ def process_object_manipulation(source, prompt, object_motion, object_mask, trac
|
|
251 |
print(f"Processing failed: {str(e)}\n{traceback.format_exc()}")
|
252 |
return None
|
253 |
|
|
|
254 |
def process_mesh_animation(source, prompt, tracking_video, ma_repaint_option, ma_repaint_image):
|
255 |
"""Process mesh animation task"""
|
256 |
try:
|
|
|
99 |
|
100 |
return cmd
|
101 |
|
102 |
+
@spaces.GPU(duration=300)
|
103 |
def run_process(cmd):
|
104 |
"""Run command and return output"""
|
105 |
print(f"Running command: {' '.join(cmd)}")
|
|
|
127 |
|
128 |
return "\n".join(output)
|
129 |
|
130 |
+
@spaces.GPU(duration=300)
|
131 |
def process_motion_transfer(source, prompt, mt_repaint_option, mt_repaint_image):
|
132 |
"""Process video motion transfer task"""
|
133 |
try:
|
|
|
174 |
print(f"Processing failed: {str(e)}\n{traceback.format_exc()}")
|
175 |
return None
|
176 |
|
177 |
+
@spaces.GPU(duration=300)
|
178 |
def process_camera_control(source, prompt, camera_motion, tracking_method):
|
179 |
"""Process camera control task"""
|
180 |
try:
|
|
|
215 |
print(f"Processing failed: {str(e)}\n{traceback.format_exc()}")
|
216 |
return None
|
217 |
|
218 |
+
@spaces.GPU(duration=300)
|
219 |
def process_object_manipulation(source, prompt, object_motion, object_mask, tracking_method):
|
220 |
"""Process object manipulation task"""
|
221 |
try:
|
|
|
254 |
print(f"Processing failed: {str(e)}\n{traceback.format_exc()}")
|
255 |
return None
|
256 |
|
257 |
+
@spaces.GPU(duration=300)
|
258 |
def process_mesh_animation(source, prompt, tracking_video, ma_repaint_option, ma_repaint_image):
|
259 |
"""Process mesh animation task"""
|
260 |
try:
|