Spaces:
Running
Running
Update app.py
Browse files
app.py
CHANGED
@@ -28,7 +28,7 @@ def infer(
|
|
28 |
negative_prompt: str,
|
29 |
width: int,
|
30 |
height: int,
|
31 |
-
num_inference_steps: int,
|
32 |
model_id: Optional[str] = 'CompVis/stable-diffusion-v1-4',
|
33 |
seed: Optional[int] = 42,
|
34 |
guidance_scale: Optional[float] = 7.0,
|
@@ -105,6 +105,15 @@ with gr.Blocks(css=css) as demo:
|
|
105 |
value=7.0,
|
106 |
)
|
107 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
108 |
with gr.Accordion("Optional Settings", open=False):
|
109 |
with gr.Row():
|
110 |
width = gr.Slider(
|
@@ -124,15 +133,6 @@ with gr.Blocks(css=css) as demo:
|
|
124 |
value=1024,
|
125 |
)
|
126 |
|
127 |
-
with gr.Row():
|
128 |
-
num_inference_steps = gr.Slider(
|
129 |
-
label="Number of inference steps",
|
130 |
-
minimum=1,
|
131 |
-
maximum=50,
|
132 |
-
step=1,
|
133 |
-
value=2,
|
134 |
-
)
|
135 |
-
|
136 |
run_button = gr.Button("Run", scale=1, variant="primary")
|
137 |
result = gr.Image(label="Result", show_label=False)
|
138 |
|
|
|
28 |
negative_prompt: str,
|
29 |
width: int,
|
30 |
height: int,
|
31 |
+
num_inference_steps: Optional[int] = 20,
|
32 |
model_id: Optional[str] = 'CompVis/stable-diffusion-v1-4',
|
33 |
seed: Optional[int] = 42,
|
34 |
guidance_scale: Optional[float] = 7.0,
|
|
|
105 |
value=7.0,
|
106 |
)
|
107 |
|
108 |
+
with gr.Row():
|
109 |
+
num_inference_steps = gr.Slider(
|
110 |
+
label="Number of inference steps",
|
111 |
+
minimum=1,
|
112 |
+
maximum=50,
|
113 |
+
step=1,
|
114 |
+
value=20,
|
115 |
+
)
|
116 |
+
|
117 |
with gr.Accordion("Optional Settings", open=False):
|
118 |
with gr.Row():
|
119 |
width = gr.Slider(
|
|
|
133 |
value=1024,
|
134 |
)
|
135 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
136 |
run_button = gr.Button("Run", scale=1, variant="primary")
|
137 |
result = gr.Image(label="Result", show_label=False)
|
138 |
|