Spaces:
Running
on
Zero
Running
on
Zero
yonishafir
commited on
Commit
•
0e896d4
1
Parent(s):
9f07a8f
Update app.py
Browse files
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=
|
249 |
-
steps = gr.Number(value=
|
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 |
|