Yinhong Liu commited on
Commit
4dbbaff
·
1 Parent(s): 1f08a00
Files changed (1) hide show
  1. app.py +9 -11
app.py CHANGED
@@ -58,7 +58,6 @@ def infer(
58
  randomize_seed,
59
  width,
60
  height,
61
- guidance_scale,
62
  num_inference_steps,
63
  model_choice,
64
  progress=gr.Progress(track_tqdm=True),
@@ -73,7 +72,7 @@ def infer(
73
  image = pipe(
74
  prompt=prompt,
75
  negative_prompt=negative_prompt,
76
- guidance_scale=guidance_scale,
77
  num_inference_steps=num_inference_steps,
78
  width=width,
79
  height=height,
@@ -155,18 +154,18 @@ with gr.Blocks(css=css) as demo:
155
  )
156
 
157
  with gr.Row():
158
- guidance_scale = gr.Slider(
159
- label="Guidance scale",
160
- minimum=0.0,
161
- maximum=10.0,
162
- step=0.1,
163
- value=0.0, # Replace with defaults that work for your model
164
- )
165
 
166
  num_inference_steps = gr.Slider(
167
  label="Number of inference steps",
168
  minimum=1,
169
- maximum=50,
170
  step=1,
171
  value=2, # Replace with defaults that work for your model
172
  )
@@ -182,7 +181,6 @@ with gr.Blocks(css=css) as demo:
182
  randomize_seed,
183
  width,
184
  height,
185
- guidance_scale,
186
  num_inference_steps,
187
  model_choice,
188
  ],
 
58
  randomize_seed,
59
  width,
60
  height,
 
61
  num_inference_steps,
62
  model_choice,
63
  progress=gr.Progress(track_tqdm=True),
 
72
  image = pipe(
73
  prompt=prompt,
74
  negative_prompt=negative_prompt,
75
+ guidance_scale=1,
76
  num_inference_steps=num_inference_steps,
77
  width=width,
78
  height=height,
 
154
  )
155
 
156
  with gr.Row():
157
+ # guidance_scale = gr.Slider(
158
+ # label="Guidance scale",
159
+ # minimum=0.0,
160
+ # maximum=10.0,
161
+ # step=0.1,
162
+ # value=0.0, # Replace with defaults that work for your model
163
+ # )
164
 
165
  num_inference_steps = gr.Slider(
166
  label="Number of inference steps",
167
  minimum=1,
168
+ maximum=4,
169
  step=1,
170
  value=2, # Replace with defaults that work for your model
171
  )
 
181
  randomize_seed,
182
  width,
183
  height,
 
184
  num_inference_steps,
185
  model_choice,
186
  ],