Spaces:
Runtime error
Runtime error
patrickvonplaten
commited on
Commit
•
c695cf8
1
Parent(s):
a728fab
Update app.py
Browse files
app.py
CHANGED
@@ -9,7 +9,7 @@ import random
|
|
9 |
|
10 |
|
11 |
start_time = time.time()
|
12 |
-
current_steps =
|
13 |
|
14 |
pipe = DiffusionPipeline.from_pretrained("timbrooks/instruct-pix2pix", torch_dtype=torch.float16, safety_checker=None)
|
15 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
@@ -168,9 +168,6 @@ with gr.Blocks(css="style.css") as demo:
|
|
168 |
)
|
169 |
|
170 |
with gr.Row():
|
171 |
-
guidance = gr.Slider(
|
172 |
-
label="Guidance scale", value=7.5, maximum=15
|
173 |
-
)
|
174 |
steps = gr.Slider(
|
175 |
label="Steps",
|
176 |
value=current_steps,
|
@@ -195,17 +192,20 @@ with gr.Blocks(css="style.css") as demo:
|
|
195 |
image = gr.Image(
|
196 |
label="Image", height=256, tool="editor", type="pil"
|
197 |
)
|
|
|
|
|
|
|
198 |
image_guidance_scale = gr.Slider(
|
199 |
label="Image Guidance Scale",
|
200 |
-
minimum=1,
|
201 |
-
maximum=
|
202 |
-
step=0.
|
203 |
-
value=1,
|
204 |
)
|
205 |
|
206 |
inputs = [
|
207 |
prompt,
|
208 |
-
|
209 |
steps,
|
210 |
n_images,
|
211 |
width,
|
|
|
9 |
|
10 |
|
11 |
start_time = time.time()
|
12 |
+
current_steps = 15
|
13 |
|
14 |
pipe = DiffusionPipeline.from_pretrained("timbrooks/instruct-pix2pix", torch_dtype=torch.float16, safety_checker=None)
|
15 |
pipe.scheduler = EulerAncestralDiscreteScheduler.from_config(pipe.scheduler.config)
|
|
|
168 |
)
|
169 |
|
170 |
with gr.Row():
|
|
|
|
|
|
|
171 |
steps = gr.Slider(
|
172 |
label="Steps",
|
173 |
value=current_steps,
|
|
|
192 |
image = gr.Image(
|
193 |
label="Image", height=256, tool="editor", type="pil"
|
194 |
)
|
195 |
+
text_guidance_scale = gr.Slider(
|
196 |
+
label="Text Guidance Scale", minimum=1.0, value=5.5, maximum=15, step=0.1
|
197 |
+
)
|
198 |
image_guidance_scale = gr.Slider(
|
199 |
label="Image Guidance Scale",
|
200 |
+
minimum=1.0,
|
201 |
+
maximum=15,
|
202 |
+
step=0.1,
|
203 |
+
value=1.5,
|
204 |
)
|
205 |
|
206 |
inputs = [
|
207 |
prompt,
|
208 |
+
text_guidance_scale,
|
209 |
steps,
|
210 |
n_images,
|
211 |
width,
|