radames commited on
Commit
39e5a08
1 Parent(s): 6e01822

limite to 1 sample

Browse files
stablediffusion/scripts/gradio/depth2img.py CHANGED
@@ -131,6 +131,7 @@ def pad_image(input_image):
131
 
132
 
133
  def predict(input_image, prompt, steps, num_samples, scale, seed, eta, strength):
 
134
  init_image = input_image.convert("RGB")
135
  image = pad_image(init_image) # resize to integer multiple of 32
136
  image = image.resize((512, 512))
@@ -166,7 +167,7 @@ with block:
166
  run_button = gr.Button(label="Run")
167
  with gr.Accordion("Advanced options", open=False):
168
  num_samples = gr.Slider(
169
- label="Images", minimum=1, maximum=4, value=1, step=1)
170
  ddim_steps = gr.Slider(label="Steps", minimum=1,
171
  maximum=50, value=50, step=1)
172
  scale = gr.Slider(
 
131
 
132
 
133
  def predict(input_image, prompt, steps, num_samples, scale, seed, eta, strength):
134
+ num_samples = 1
135
  init_image = input_image.convert("RGB")
136
  image = pad_image(init_image) # resize to integer multiple of 32
137
  image = image.resize((512, 512))
 
167
  run_button = gr.Button(label="Run")
168
  with gr.Accordion("Advanced options", open=False):
169
  num_samples = gr.Slider(
170
+ label="Images", minimum=1, maximum=1, value=1, step=1)
171
  ddim_steps = gr.Slider(label="Steps", minimum=1,
172
  maximum=50, value=50, step=1)
173
  scale = gr.Slider(