MohamedRashad commited on
Commit
5eedf0a
·
1 Parent(s): 5ba7022

Refactor GPU decorator usage in generate_item_image function

Browse files
Files changed (1) hide show
  1. app.py +1 -1
app.py CHANGED
@@ -52,7 +52,7 @@ Focus on the item itself, ensuring it is fully described, and specify a plain, w
52
 
53
  return object_t2i_prompt
54
 
55
- @spaces.GPU(duration=100)
56
  def generate_item_image(object_t2i_prompt):
57
  image = pipe(prompt=object_t2i_prompt, guidance_scale=3.5, num_inference_steps=28, width=1024, height=1024, generator=torch.Generator("cpu").manual_seed(0), output_type="pil").images[0]
58
  trial_id, processed_image = preprocess_pil_image(image)
 
52
 
53
  return object_t2i_prompt
54
 
55
+ @spaces.GPU
56
  def generate_item_image(object_t2i_prompt):
57
  image = pipe(prompt=object_t2i_prompt, guidance_scale=3.5, num_inference_steps=28, width=1024, height=1024, generator=torch.Generator("cpu").manual_seed(0), output_type="pil").images[0]
58
  trial_id, processed_image = preprocess_pil_image(image)