yonishafir commited on
Commit
0e896d4
1 Parent(s): 9f07a8f

Update app.py

Browse files
Files changed (1) hide show
  1. app.py +5 -5
app.py CHANGED
@@ -121,7 +121,7 @@ def predict(dict, prompt="", negative_prompt = default_negative_prompt, guidance
121
 
122
 
123
  init_image = dict["image"].convert("RGB")#.resize((1024, 1024))
124
- mask = dict["mask"].convert("L")#.resize((1024, 1024))
125
 
126
  width, height = get_size(init_image)
127
 
@@ -169,9 +169,9 @@ def predict(dict, prompt="", negative_prompt = default_negative_prompt, guidance
169
  mask_image=mask_tensor,
170
  guidance_scale=guidance_scale,
171
  num_inference_steps=int(steps),
172
- strength=strength,
173
  generator=generator,
174
- controlnet_conditioning_sale=1.0, )
175
 
176
  # gen_img = pipe(negative_prompt=default_negative_prompt, prompt=prompt,
177
  # controlnet_conditioning_sale=1.0,
@@ -245,8 +245,8 @@ with image_blocks as demo:
245
 
246
  with gr.Accordion(label="Advanced Settings", open=False):
247
  with gr.Row(equal_height=True):
248
- guidance_scale = gr.Number(value=5, minimum=1.0, maximum=10.0, step=0.5, label="guidance_scale")
249
- steps = gr.Number(value=30, minimum=20, maximum=50, step=1, label="steps")
250
  strength = gr.Number(value=1, minimum=0.01, maximum=1.0, step=0.01, label="strength")
251
  negative_prompt = gr.Textbox(label="negative_prompt", value=default_negative_prompt, placeholder=default_negative_prompt, info="what you don't want to see in the image")
252
 
 
121
 
122
 
123
  init_image = dict["image"].convert("RGB")#.resize((1024, 1024))
124
+ mask = dict["mask"].convert("L") #.resize((1024, 1024))
125
 
126
  width, height = get_size(init_image)
127
 
 
169
  mask_image=mask_tensor,
170
  guidance_scale=guidance_scale,
171
  num_inference_steps=int(steps),
172
+ # strength=strength,
173
  generator=generator,
174
+ controlnet_conditioning_sale=1.0)
175
 
176
  # gen_img = pipe(negative_prompt=default_negative_prompt, prompt=prompt,
177
  # controlnet_conditioning_sale=1.0,
 
245
 
246
  with gr.Accordion(label="Advanced Settings", open=False):
247
  with gr.Row(equal_height=True):
248
+ guidance_scale = gr.Number(value=1.2, minimum=1.0, maximum=2, step=0.1, label="guidance_scale")
249
+ steps = gr.Number(value=12, minimum=8, maximum=30, step=1, label="steps")
250
  strength = gr.Number(value=1, minimum=0.01, maximum=1.0, step=0.01, label="strength")
251
  negative_prompt = gr.Textbox(label="negative_prompt", value=default_negative_prompt, placeholder=default_negative_prompt, info="what you don't want to see in the image")
252