Yjiggfghhjnjj commited on
Commit
b121fd2
1 Parent(s): 94ec08a

bug fix[+]

Browse files
Files changed (1) hide show
  1. app.py +13 -3
app.py CHANGED
@@ -58,6 +58,7 @@ def generate(
58
  negative_prompt: str = "",
59
  use_negative_prompt: bool = False,
60
  num_inference_steps: int = 30,
 
61
  seed: int = 0,
62
  width: int = 1024,
63
  height: int = 1024,
@@ -79,7 +80,7 @@ def generate(
79
  height=height,
80
  guidance_scale=guidance_scale,
81
  num_inference_steps=num_inference_steps,
82
- num_images_per_prompt=1,
83
  cross_attention_kwargs={"scale": 0.65},
84
  output_type="pil",
85
  ).images
@@ -135,11 +136,19 @@ with gr.Blocks(css=css, theme="pseudolab/huggingface-korea-theme") as demo:
135
  with gr.Row():
136
  num_inference_steps = gr.Slider(
137
  label="steps",
138
- minimum=8,
139
  maximum=35,
140
- step=0.1,
141
  value=25,
142
  )
 
 
 
 
 
 
 
 
143
  seed = gr.Slider(
144
  label="Seed",
145
  minimum=0,
@@ -203,6 +212,7 @@ with gr.Blocks(css=css, theme="pseudolab/huggingface-korea-theme") as demo:
203
  negative_prompt,
204
  use_negative_prompt,
205
  num_inference_steps,
 
206
  seed,
207
  width,
208
  height,
 
58
  negative_prompt: str = "",
59
  use_negative_prompt: bool = False,
60
  num_inference_steps: int = 30,
61
+ num_images_per_prompt: int = 2
62
  seed: int = 0,
63
  width: int = 1024,
64
  height: int = 1024,
 
80
  height=height,
81
  guidance_scale=guidance_scale,
82
  num_inference_steps=num_inference_steps,
83
+ num_images_per_prompt=num_images_per_prompt,
84
  cross_attention_kwargs={"scale": 0.65},
85
  output_type="pil",
86
  ).images
 
136
  with gr.Row():
137
  num_inference_steps = gr.Slider(
138
  label="steps",
139
+ minimum=10,
140
  maximum=35,
141
+ step=8,
142
  value=25,
143
  )
144
+ with gr.Row():
145
+ num_images_per_prompt = gr.Slider(
146
+ label="images",
147
+ minimum=1,
148
+ maximum=5,
149
+ step=8,
150
+ value=2,
151
+ )
152
  seed = gr.Slider(
153
  label="Seed",
154
  minimum=0,
 
212
  negative_prompt,
213
  use_negative_prompt,
214
  num_inference_steps,
215
+ num_images_per_prompt,
216
  seed,
217
  width,
218
  height,