Spaces:
Runtime error
Runtime error
Update app.py
Browse files
app.py
CHANGED
@@ -230,23 +230,30 @@ def generate(
|
|
230 |
|
231 |
|
232 |
def prompt_and_generate_button(prefix, pipeline_name: PIPELINE_NAMES, **kwargs):
|
233 |
-
prompt = st.text_area(
|
234 |
-
"Prompt",
|
235 |
-
value=DEFAULT_PROMPT,
|
236 |
-
key=f"{prefix}-prompt",
|
237 |
-
)
|
238 |
-
negative_prompt = st.text_area(
|
239 |
-
"Negative prompt",
|
240 |
-
value="(disfigured), bad quality, ((bad art)), ((deformed)), ((extra limbs)), (((duplicate))), ((morbid)), (((ugly)), blurry, ((bad anatomy)), (((bad proportions))), cloned face, body out of frame, out of frame, bad anatomy, gross proportions, (malformed limbs), ((missing arms)), ((missing legs)), (((extra arms))), (((extra legs))), (fused fingers), (too many fingers), (((long neck))), Deformed, blurry",
|
241 |
-
key=f"{prefix}-negative-prompt",
|
242 |
-
)
|
243 |
col1, col2 = st.columns(2)
|
244 |
with col1:
|
245 |
-
|
|
|
|
|
|
|
|
|
246 |
with col2:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
247 |
guidance_scale = st.slider(
|
248 |
"Guidance scale", min_value=0.0, max_value=20.0, value=7.5, step=0.5, key=f"{prefix}-guidance-scale"
|
249 |
)
|
|
|
|
|
|
|
250 |
# Add a select box for the schedulers
|
251 |
scheduler_name = st.selectbox(
|
252 |
"Choose a Scheduler",
|
|
|
230 |
|
231 |
|
232 |
def prompt_and_generate_button(prefix, pipeline_name: PIPELINE_NAMES, **kwargs):
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
233 |
col1, col2 = st.columns(2)
|
234 |
with col1:
|
235 |
+
prompt = st.text_area(
|
236 |
+
"Prompt",
|
237 |
+
value=DEFAULT_PROMPT,
|
238 |
+
key=f"{prefix}-prompt",
|
239 |
+
)
|
240 |
with col2:
|
241 |
+
negative_prompt = st.text_area(
|
242 |
+
"Negative prompt",
|
243 |
+
value="...",
|
244 |
+
key=f"{prefix}-negative-prompt",
|
245 |
+
)
|
246 |
+
|
247 |
+
col3, col4, col5 = st.columns(3)
|
248 |
+
with col3:
|
249 |
+
steps = st.slider("Number of inference steps", min_value=11, max_value=69, value=14, key=f"{prefix}-inference-steps")
|
250 |
+
with col4:
|
251 |
guidance_scale = st.slider(
|
252 |
"Guidance scale", min_value=0.0, max_value=20.0, value=7.5, step=0.5, key=f"{prefix}-guidance-scale"
|
253 |
)
|
254 |
+
with col5:
|
255 |
+
num_images = st.slider("Number of images to generate", min_value=1, max_value=2, value=1, key=f"{prefix}-num-images")
|
256 |
+
|
257 |
# Add a select box for the schedulers
|
258 |
scheduler_name = st.selectbox(
|
259 |
"Choose a Scheduler",
|