stzhao commited on
Commit
dc6071b
·
verified ·
1 Parent(s): a66df57

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +2 -2
app.py CHANGED
@@ -29,7 +29,7 @@ def load_models():
29
  torch_dtype=torch.bfloat16
30
  )
31
  device = "cuda" if torch.cuda.is_available() else "cpu"
32
- pipe.to(device, torch_dtype)
33
 
34
  return model, tokenizer, pipe
35
 
@@ -90,7 +90,7 @@ def generate_image(enhanced_caption, seed, num_inference_steps, guidance_scale):
90
 
91
  return image
92
 
93
- @spaces.GPU(duration=100)
94
  def run_pipeline(image_caption, text_caption, seed, num_inference_steps, guidance_scale):
95
  """Run the complete pipeline from captions to final image"""
96
  combined_caption, enhanced_caption = generate_enhanced_caption(image_caption, text_caption)
 
29
  torch_dtype=torch.bfloat16
30
  )
31
  device = "cuda" if torch.cuda.is_available() else "cpu"
32
+ # pipe.to(device, torch_dtype)
33
 
34
  return model, tokenizer, pipe
35
 
 
90
 
91
  return image
92
 
93
+ # @spaces.GPU(duration=100)
94
  def run_pipeline(image_caption, text_caption, seed, num_inference_steps, guidance_scale):
95
  """Run the complete pipeline from captions to final image"""
96
  combined_caption, enhanced_caption = generate_enhanced_caption(image_caption, text_caption)