Spaces:
Configuration error
Configuration error
Anonymous
commited on
Commit
·
6081587
1
Parent(s):
f951d02
load in advance
Browse files
app.py
CHANGED
|
@@ -90,7 +90,7 @@ def infer(prompt, output_size, ddim_steps, guidance_scale, cosine_scale, seed, o
|
|
| 90 |
examples = [
|
| 91 |
["A cute and adorable fluffy puppy wearing a witch hat in a Halloween autumn evening forest, falling autumn leaves, brown acorns on the ground, Halloween pumpkins spiderwebs, bats, and a witch’s broom.",],
|
| 92 |
["Brunette pilot girl in a snowstorm, full body, moody lighting, intricate details, depth of field, outdoors, Fujifilm XT3, RAW, 8K UHD, film grain, Unreal Engine 5, ray tracing.",],
|
| 93 |
-
["A
|
| 94 |
]
|
| 95 |
|
| 96 |
css = """
|
|
@@ -104,14 +104,16 @@ def mode_update(options):
|
|
| 104 |
value=50),
|
| 105 |
gr.Slider(minimum=1.0,
|
| 106 |
maximum=20.0,
|
| 107 |
-
value=7.5)
|
|
|
|
| 108 |
else:
|
| 109 |
return [gr.Slider(minimum=2,
|
| 110 |
maximum=6,
|
| 111 |
value=4),
|
| 112 |
gr.Slider(minimum=0.0,
|
| 113 |
maximum=1.0,
|
| 114 |
-
value=0.0)
|
|
|
|
| 115 |
|
| 116 |
with gr.Blocks(css=css) as demo:
|
| 117 |
with gr.Column(elem_id="col-container"):
|
|
@@ -158,10 +160,10 @@ with gr.Blocks(css=css) as demo:
|
|
| 158 |
maximum=10000,
|
| 159 |
step=1,
|
| 160 |
value=111)
|
| 161 |
-
with gr.Row():
|
| 162 |
negative_prompt = gr.Textbox(label='Negative Prompt', value='blurry, ugly, duplicate, poorly drawn, deformed, mosaic')
|
| 163 |
|
| 164 |
-
options.change(mode_update, options, [ddim_steps, guidance_scale])
|
| 165 |
|
| 166 |
submit_btn = gr.Button("Generate", variant='primary')
|
| 167 |
image_result = gr.Image(label="Image Output")
|
|
|
|
| 90 |
examples = [
|
| 91 |
["A cute and adorable fluffy puppy wearing a witch hat in a Halloween autumn evening forest, falling autumn leaves, brown acorns on the ground, Halloween pumpkins spiderwebs, bats, and a witch’s broom.",],
|
| 92 |
["Brunette pilot girl in a snowstorm, full body, moody lighting, intricate details, depth of field, outdoors, Fujifilm XT3, RAW, 8K UHD, film grain, Unreal Engine 5, ray tracing.",],
|
| 93 |
+
["A panda walking and munching bamboo in a bamboo forest.",],
|
| 94 |
]
|
| 95 |
|
| 96 |
css = """
|
|
|
|
| 104 |
value=50),
|
| 105 |
gr.Slider(minimum=1.0,
|
| 106 |
maximum=20.0,
|
| 107 |
+
value=7.5),
|
| 108 |
+
gr.Row(visible=True)]
|
| 109 |
else:
|
| 110 |
return [gr.Slider(minimum=2,
|
| 111 |
maximum=6,
|
| 112 |
value=4),
|
| 113 |
gr.Slider(minimum=0.0,
|
| 114 |
maximum=1.0,
|
| 115 |
+
value=0.0),
|
| 116 |
+
gr.Row(visible=False)]
|
| 117 |
|
| 118 |
with gr.Blocks(css=css) as demo:
|
| 119 |
with gr.Column(elem_id="col-container"):
|
|
|
|
| 160 |
maximum=10000,
|
| 161 |
step=1,
|
| 162 |
value=111)
|
| 163 |
+
with gr.Row() as row_neg:
|
| 164 |
negative_prompt = gr.Textbox(label='Negative Prompt', value='blurry, ugly, duplicate, poorly drawn, deformed, mosaic')
|
| 165 |
|
| 166 |
+
options.change(mode_update, options, [ddim_steps, guidance_scale, row_neg])
|
| 167 |
|
| 168 |
submit_btn = gr.Button("Generate", variant='primary')
|
| 169 |
image_result = gr.Image(label="Image Output")
|