Spaces:
Running
on
Zero
Running
on
Zero
Update app_t2v.py
Browse files- app_t2v.py +2 -3
app_t2v.py
CHANGED
@@ -29,10 +29,9 @@ pipe.to(device)
|
|
29 |
_ = pipe(prompt="warmup", negative_prompt=DEFAULT_NEGATIVE_PROMPT, height=512, width=768, num_frames=8, num_inference_steps=2).frames[0]
|
30 |
|
31 |
# GPU duration estimator
|
32 |
-
def get_duration(prompt, negative_prompt, height, width, num_frames, guidance_scale, guidance_scale_2, num_steps, seed, randomize_seed):
|
33 |
-
return int(num_steps * 15)
|
34 |
|
35 |
-
|
|
|
36 |
def generate_video(prompt, negative_prompt, height, width, num_frames, guidance_scale, guidance_scale_2, num_steps, seed, randomize_seed):
|
37 |
current_seed = random.randint(0, MAX_SEED) if randomize_seed else int(seed)
|
38 |
generator = torch.Generator(device=device).manual_seed(current_seed)
|
|
|
29 |
_ = pipe(prompt="warmup", negative_prompt=DEFAULT_NEGATIVE_PROMPT, height=512, width=768, num_frames=8, num_inference_steps=2).frames[0]
|
30 |
|
31 |
# GPU duration estimator
|
|
|
|
|
32 |
|
33 |
+
|
34 |
+
@spaces.GPU(duration=200)
|
35 |
def generate_video(prompt, negative_prompt, height, width, num_frames, guidance_scale, guidance_scale_2, num_steps, seed, randomize_seed):
|
36 |
current_seed = random.randint(0, MAX_SEED) if randomize_seed else int(seed)
|
37 |
generator = torch.Generator(device=device).manual_seed(current_seed)
|