salomonsky commited on
Commit
0ba8ebf
·
verified ·
1 Parent(s): 72cf865

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +1 -3
app.py CHANGED
@@ -21,13 +21,11 @@ step_loaded = None
21
  base_loaded = "Realistic"
22
  motion_loaded = None
23
 
24
- # Set device to CPU
25
  device = "cpu"
26
  dtype = torch.float32
27
  pipe = AnimateDiffPipeline.from_pretrained(bases[base_loaded], torch_dtype=dtype).to(device)
28
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
29
 
30
- @spaces.CPU(duration=30, queue=False)
31
  def generate_image(prompt, base="Realistic", motion="", step=8, duration=5, progress=gr.Progress()):
32
  global step_loaded
33
  global base_loaded
@@ -120,4 +118,4 @@ with gr.Blocks() as demo:
120
  outputs=[video]
121
  )
122
 
123
- demo.queue().launch()
 
21
  base_loaded = "Realistic"
22
  motion_loaded = None
23
 
 
24
  device = "cpu"
25
  dtype = torch.float32
26
  pipe = AnimateDiffPipeline.from_pretrained(bases[base_loaded], torch_dtype=dtype).to(device)
27
  pipe.scheduler = EulerDiscreteScheduler.from_config(pipe.scheduler.config, timestep_spacing="trailing", beta_schedule="linear")
28
 
 
29
  def generate_image(prompt, base="Realistic", motion="", step=8, duration=5, progress=gr.Progress()):
30
  global step_loaded
31
  global base_loaded
 
118
  outputs=[video]
119
  )
120
 
121
+ demo.queue().launch()