KingNish commited on
Commit
b69d164
1 Parent(s): 63c18d9

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +4 -6
app.py CHANGED
@@ -123,7 +123,7 @@ def generate(
123
  negative_prompt = None # type: ignore
124
  prompt, negative_prompt = apply_style(style, prompt, negative_prompt)
125
 
126
- images = pipe(
127
  prompt=prompt,
128
  negative_prompt=negative_prompt,
129
  width=width,
@@ -131,14 +131,12 @@ def generate(
131
  guidance_scale=0,
132
  num_inference_steps=inference_steps,
133
  generator=generator,
134
- num_images_per_prompt=NUM_IMAGES_PER_PROMPT,
135
  use_resolution_binning=use_resolution_binning,
136
- output_type="pil",
137
- ).images
138
 
139
  image_paths = [save_image(img) for img in images]
140
  print(image_paths)
141
- return image_paths, seed
142
 
143
 
144
  examples = [
@@ -172,7 +170,7 @@ with gr.Blocks(css=css) as demo:
172
  container=False,
173
  )
174
  run_button = gr.Button("Run", scale=0)
175
- result = gr.Gallery(label="Result", columns=1, show_label=False)
176
 
177
  with gr.Accordion("Advanced options", open=False):
178
  with gr.Group():
 
123
  negative_prompt = None # type: ignore
124
  prompt, negative_prompt = apply_style(style, prompt, negative_prompt)
125
 
126
+ image = pipe(
127
  prompt=prompt,
128
  negative_prompt=negative_prompt,
129
  width=width,
 
131
  guidance_scale=0,
132
  num_inference_steps=inference_steps,
133
  generator=generator,
 
134
  use_resolution_binning=use_resolution_binning,
135
+ ).images[0]
 
136
 
137
  image_paths = [save_image(img) for img in images]
138
  print(image_paths)
139
+ return images, seed
140
 
141
 
142
  examples = [
 
170
  container=False,
171
  )
172
  run_button = gr.Button("Run", scale=0)
173
+ result = gr.Image(label="Result")
174
 
175
  with gr.Accordion("Advanced options", open=False):
176
  with gr.Group():