PhyscalX commited on
Commit
63bb8e0
1 Parent(s): 7bce0f5

Faster default configs

Browse files
Files changed (1) hide show
  1. app.py +3 -5
app.py CHANGED
@@ -20,7 +20,6 @@ import os
20
  import gradio as gr
21
  import numpy as np
22
  import PIL.Image
23
- import spaces
24
  import torch
25
 
26
  from diffnext.pipelines import NOVAPipeline
@@ -56,7 +55,6 @@ def crop_image(image, target_h, target_w):
56
  return np.array(image.resize((target_w, target_h), PIL.Image.Resampling.BILINEAR))
57
 
58
 
59
- @spaces.GPU(duration=180)
60
  def generate_video(
61
  prompt,
62
  negative_prompt,
@@ -139,13 +137,13 @@ if __name__ == "__main__":
139
  )
140
  image_prompt = gr.Image(label="Image Prompt (Optional) ", type="pil")
141
  # fmt: off
142
- adv_opt = gr.Accordion("Advanced Options", open=False).__enter__()
143
  seed = gr.Slider(label="Seed", maximum=2147483647, step=1, value=0)
144
  randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
145
  guidance_scale = gr.Slider(label="Guidance scale", minimum=1, maximum=10.0, step=0.1, value=7.0)
146
  with gr.Row():
147
- num_inference_steps = gr.Slider(label="Inference steps", minimum=1, maximum=128, step=1, value=128) # noqa
148
- num_diffusion_steps = gr.Slider(label="Diffusion steps", minimum=1, maximum=100, step=1, value=100) # noqa
149
  adv_opt.__exit__()
150
  generate = gr.Button("Generate Video", variant="primary", size="lg")
151
  input_col.__exit__()
 
20
  import gradio as gr
21
  import numpy as np
22
  import PIL.Image
 
23
  import torch
24
 
25
  from diffnext.pipelines import NOVAPipeline
 
55
  return np.array(image.resize((target_w, target_h), PIL.Image.Resampling.BILINEAR))
56
 
57
 
 
58
  def generate_video(
59
  prompt,
60
  negative_prompt,
 
137
  )
138
  image_prompt = gr.Image(label="Image Prompt (Optional) ", type="pil")
139
  # fmt: off
140
+ adv_opt = gr.Accordion("Advanced Options", open=True).__enter__()
141
  seed = gr.Slider(label="Seed", maximum=2147483647, step=1, value=0)
142
  randomize_seed = gr.Checkbox(label="Randomize seed", value=True)
143
  guidance_scale = gr.Slider(label="Guidance scale", minimum=1, maximum=10.0, step=0.1, value=7.0)
144
  with gr.Row():
145
+ num_inference_steps = gr.Slider(label="Inference steps", minimum=1, maximum=128, step=1, value=64) # noqa
146
+ num_diffusion_steps = gr.Slider(label="Diffusion steps", minimum=1, maximum=100, step=1, value=50) # noqa
147
  adv_opt.__exit__()
148
  generate = gr.Button("Generate Video", variant="primary", size="lg")
149
  input_col.__exit__()