rishitdagli commited on
Commit
c8c298e
1 Parent(s): 5be16b4

lazy cache and reduce time

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -23,7 +23,7 @@ model = see2sound.See2Sound(config_path="config.yaml")
23
  model.setup()
24
 
25
 
26
- @spaces.GPU(duration=300)
27
  @torch.no_grad()
28
  def process_image(
29
  image: str, num_audios: int, prompt: Union[str, None], steps: Union[int, None]
@@ -96,7 +96,7 @@ with gr.Blocks(css=css) as demo:
96
  examples=[[f"examples/{i}.png"] for i in range(1, 10)],
97
  inputs=[image],
98
  outputs=[processed_image, generated_audio],
99
- # cache_examples=True,
100
  # fn=process_image,
101
  )
102
 
 
23
  model.setup()
24
 
25
 
26
+ @spaces.GPU(duration=280)
27
  @torch.no_grad()
28
  def process_image(
29
  image: str, num_audios: int, prompt: Union[str, None], steps: Union[int, None]
 
96
  examples=[[f"examples/{i}.png"] for i in range(1, 10)],
97
  inputs=[image],
98
  outputs=[processed_image, generated_audio],
99
+ cache_examples="lazy",
100
  # fn=process_image,
101
  )
102