Shitao commited on
Commit
eb7f8ad
1 Parent(s): 6209fe3

add duration

Browse files
Files changed (1) hide show
  1. app.py +4 -4
app.py CHANGED
@@ -9,7 +9,7 @@ pipe = OmniGenPipeline.from_pretrained(
9
  "shitao/tmp-preview"
10
  )
11
 
12
- @spaces.GPU
13
  # 示例处理函数:生成图像
14
  def generate_image(text, img1, img2, img3, height, width, guidance_scale, inference_steps, seed):
15
  input_images = [img1, img2, img3]
@@ -54,7 +54,7 @@ def get_example():
54
  1024,
55
  1024,
56
  3.0,
57
- 20,
58
  42,
59
  ],
60
  [
@@ -65,7 +65,7 @@ def get_example():
65
  1024,
66
  1024,
67
  3.0,
68
- 20,
69
  42,
70
  ],
71
  ]
@@ -105,7 +105,7 @@ with gr.Blocks() as demo:
105
  )
106
 
107
  num_inference_steps = gr.Slider(
108
- label="Inference Steps", minimum=1, maximum=50, value=50, step=1
109
  )
110
 
111
  seed_input = gr.Slider(
 
9
  "shitao/tmp-preview"
10
  )
11
 
12
+ @spaces.GPU(duratio=120)
13
  # 示例处理函数:生成图像
14
  def generate_image(text, img1, img2, img3, height, width, guidance_scale, inference_steps, seed):
15
  input_images = [img1, img2, img3]
 
54
  1024,
55
  1024,
56
  3.0,
57
+ 50,
58
  42,
59
  ],
60
  [
 
65
  1024,
66
  1024,
67
  3.0,
68
+ 50,
69
  42,
70
  ],
71
  ]
 
105
  )
106
 
107
  num_inference_steps = gr.Slider(
108
+ label="Inference Steps", minimum=1, maximum=100, value=50, step=1
109
  )
110
 
111
  seed_input = gr.Slider(