Spaces:
Running
on
Zero
Running
on
Zero
Update app.py
Browse files
app.py
CHANGED
@@ -177,7 +177,7 @@ def inference(source_images,
|
|
177 |
|
178 |
return video
|
179 |
|
180 |
-
@spaces.GPU(duration=
|
181 |
def process_video(video_file, image_file, positive_prompt, negative_prompt, guidance, random_seed, choice, progress=gr.Progress(track_tqdm=True))->str:
|
182 |
if choice==33:
|
183 |
video_shard=1
|
@@ -284,19 +284,3 @@ with gr.Blocks() as demo:
|
|
284 |
)
|
285 |
|
286 |
demo.queue().launch()
|
287 |
-
"""
|
288 |
-
import gradio as gr
|
289 |
-
import spaces
|
290 |
-
import torch
|
291 |
-
|
292 |
-
zero = torch.Tensor([0]).cuda()
|
293 |
-
print(zero.device) # <-- 'cpu' 🤔
|
294 |
-
|
295 |
-
@spaces.GPU
|
296 |
-
def greet(n):
|
297 |
-
print(zero.device) # <-- 'cuda:0' 🤗
|
298 |
-
return f"Hello {zero + n} Tensor"
|
299 |
-
|
300 |
-
demo = gr.Interface(fn=greet, inputs=gr.Number(), outputs=gr.Text())
|
301 |
-
demo.launch()
|
302 |
-
"""
|
|
|
177 |
|
178 |
return video
|
179 |
|
180 |
+
@spaces.GPU(duration=300)
|
181 |
def process_video(video_file, image_file, positive_prompt, negative_prompt, guidance, random_seed, choice, progress=gr.Progress(track_tqdm=True))->str:
|
182 |
if choice==33:
|
183 |
video_shard=1
|
|
|
284 |
)
|
285 |
|
286 |
demo.queue().launch()
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|