Jiaming Han commited on
Commit
86b170a
·
1 Parent(s): 87f9ab9
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -39,7 +39,7 @@ config.encoder_path = hf_hub_download("csuhan/TA-Tok", "ta_tok.pth")
39
  config.decoder_path = hf_hub_download("peizesun/llamagen_t2i", "vq_ds16_t2i.pt")
40
  inference = TextToImageInference(config)
41
 
42
- @spaces.GPU(duration=240)
43
  def generate_image(prompt, resolution, top_p, top_k, cfg_scale):
44
  image = inference.generate_image(prompt, resolution, top_p, top_k, cfg_scale)
45
  return image
@@ -47,7 +47,7 @@ def generate_image(prompt, resolution, top_p, top_k, cfg_scale):
47
  def clear_inputs_t2i():
48
  return "", None
49
 
50
- @spaces.GPU(duration=240)
51
  def understand_image(image, prompt):
52
  return generate_text(inference, image, prompt)
53
 
 
39
  config.decoder_path = hf_hub_download("peizesun/llamagen_t2i", "vq_ds16_t2i.pt")
40
  inference = TextToImageInference(config)
41
 
42
+ @spaces.GPU(duration=120)
43
  def generate_image(prompt, resolution, top_p, top_k, cfg_scale):
44
  image = inference.generate_image(prompt, resolution, top_p, top_k, cfg_scale)
45
  return image
 
47
  def clear_inputs_t2i():
48
  return "", None
49
 
50
+ @spaces.GPU(duration=120)
51
  def understand_image(image, prompt):
52
  return generate_text(inference, image, prompt)
53