Spaces:
Runtime error
Runtime error
pengdaqian
commited on
Commit
•
3842624
1
Parent(s):
37db064
fix
Browse files
app.py
CHANGED
@@ -344,63 +344,51 @@ examples = list(map(lambda x: [
|
|
344 |
], word_list))[:500]
|
345 |
|
346 |
with block:
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
347 |
gr.HTML(
|
348 |
-
"""
|
349 |
-
|
350 |
-
|
351 |
-
|
352 |
-
|
353 |
-
|
354 |
-
|
355 |
-
|
356 |
-
|
357 |
-
|
358 |
-
|
359 |
-
|
360 |
-
|
361 |
-
|
362 |
-
|
363 |
-
|
364 |
-
|
365 |
-
|
366 |
-
|
367 |
-
|
368 |
-
|
369 |
-
|
370 |
-
|
371 |
-
|
372 |
-
|
373 |
-
|
374 |
-
|
375 |
-
|
376 |
-
|
377 |
-
|
378 |
-
<
|
379 |
-
|
380 |
-
|
381 |
-
|
382 |
-
|
383 |
-
|
384 |
-
<rect x="46" y="46" width="23" height="23" fill="black"></rect>
|
385 |
-
<rect x="46" y="115" width="23" height="23" fill="black"></rect>
|
386 |
-
<rect x="46" y="69" width="23" height="23" fill="black"></rect>
|
387 |
-
<rect x="23" y="46" width="23" height="23" fill="#D9D9D9"></rect>
|
388 |
-
<rect x="23" y="115" width="23" height="23" fill="#AEAEAE"></rect>
|
389 |
-
<rect x="23" y="69" width="23" height="23" fill="black"></rect>
|
390 |
-
</svg>
|
391 |
-
<h1 style="font-weight: 900; margin-bottom: 7px;margin-top:5px">
|
392 |
-
Stable Diffusion 2.1 Demo
|
393 |
-
</h1>
|
394 |
-
</div>
|
395 |
-
<p style="margin-bottom: 10px; font-size: 94%; line-height: 23px;">
|
396 |
-
small stable diffusion Demo App. <br />
|
397 |
-
Click <strong>Generate image</strong> Button to generate image. <br />
|
398 |
-
Also Change params to have a try <br />
|
399 |
-
more size may cost more time. <br />
|
400 |
-
It's just a simplified demo, you can use more advanced features optimize image quality <br />
|
401 |
-
</p>
|
402 |
-
</div>
|
403 |
-
"""
|
404 |
)
|
405 |
with gr.Group():
|
406 |
with gr.Box():
|
@@ -484,7 +472,7 @@ with block:
|
|
484 |
btn.click(infer, inputs=[text, negative, width, height, sampler, steps, seed, guidance_scale],
|
485 |
outputs=[gallery], postprocess=False)
|
486 |
|
487 |
-
block.queue(concurrency_count=
|
488 |
max_size=100).launch(
|
489 |
max_threads=150,
|
490 |
# server_port=6006,
|
|
|
344 |
], word_list))[:500]
|
345 |
|
346 |
with block:
|
347 |
+
title = "Stable Diffusion 2.1 Demo"
|
348 |
+
desc = """ small stable diffusion Demo App. <br />
|
349 |
+
Click <strong>Generate image</strong> Button to generate image. <br />
|
350 |
+
Also Change params to have a try <br />
|
351 |
+
more size may cost more time. <br />
|
352 |
+
It's just a simplified demo, you can use more advanced features optimize image quality <br />"""
|
353 |
+
tutorial_link = "https://docs.cworld.ai"
|
354 |
+
|
355 |
gr.HTML(
|
356 |
+
f"""
|
357 |
+
<div style="text-align: center; margin: 0 auto;">
|
358 |
+
<div
|
359 |
+
style="
|
360 |
+
display: inline-flex;
|
361 |
+
align-items: center;
|
362 |
+
gap: 0.8rem;
|
363 |
+
font-size: 1.75rem;
|
364 |
+
"
|
365 |
+
>
|
366 |
+
<svg height="100%" stroke-miterlimit="10" style="fill-rule:nonzero;clip-rule:evenodd;stroke-linecap:round;stroke-linejoin:round;" version="1.1" viewBox="0 0 100 100" width="100%" xml:space="preserve" xmlns="http://www.w3.org/2000/svg" xmlns:xlink="http://www.w3.org/1999/xlink">
|
367 |
+
<defs/>
|
368 |
+
<clipPath id="ArtboardFrame">
|
369 |
+
<rect height="100" width="100" x="0" y="0"/>
|
370 |
+
</clipPath>
|
371 |
+
<g clip-path="url(#ArtboardFrame)" id="SvgjsG2907">
|
372 |
+
<g opacity="1">
|
373 |
+
<g opacity="1">
|
374 |
+
<path d="M49.5597 6.74187C73.4486 6.74187 92.893 26.1863 92.893 50.0752C92.893 73.9641 73.4486 93.4085 49.5597 93.4085C25.6708 93.4085 6.22637 73.9641 6.22637 50.0752C6.22637 26.1863 25.6708 6.74187 49.5597 6.74187M49.5597 0.075206C21.893 0.075206-0.440293 22.4085-0.440293 50.0752C-0.440293 77.7419 21.893 100.075 49.5597 100.075C77.2264 100.075 99.5597 77.7419 99.5597 50.0752C99.5597 22.4085 77.2264 0.075206 49.5597 0.075206L49.5597 0.075206Z" fill="#111111" fill-rule="nonzero" opacity="1" stroke="none"/>
|
375 |
+
<path d="M55.1153 77.853L44.0042 77.853L44.0042 72.2974C44.0042 69.1863 46.4486 66.7419 49.5597 66.7419L49.5597 66.7419C52.6708 66.7419 55.1153 69.1863 55.1153 72.2974L55.1153 77.853Z" fill="#111111" fill-rule="nonzero" opacity="1" stroke="none"/>
|
376 |
+
<path d="M21.7819 33.4085L32.893 33.4085L32.893 33.4085L32.893 55.6308L32.893 55.6308L21.7819 55.6308L21.7819 55.6308L21.7819 33.4085L21.7819 33.4085Z" fill="#111111" fill-rule="nonzero" opacity="1" stroke="none"/>
|
377 |
+
<path d="M66.2264 33.4085L77.3375 33.4085L77.3375 33.4085L77.3375 55.6308L77.3375 55.6308L66.2264 55.6308L66.2264 55.6308L66.2264 33.4085L66.2264 33.4085Z" fill="#111111" fill-rule="nonzero" opacity="1" stroke="none"/>
|
378 |
+
</g>
|
379 |
+
</g>
|
380 |
+
</g>
|
381 |
+
</svg>
|
382 |
+
<h1 style="font-weight: 900; margin-bottom: 7px;margin-top:5px">
|
383 |
+
{title}
|
384 |
+
</h1>
|
385 |
+
</div>
|
386 |
+
<p style="margin-bottom: 10px; font-size: 94%; line-height: 23px;">
|
387 |
+
{desc}
|
388 |
+
There is the <a href="{tutorial_link}"> tutorial </a>
|
389 |
+
</p>
|
390 |
+
</div>
|
391 |
+
"""
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
392 |
)
|
393 |
with gr.Group():
|
394 |
with gr.Box():
|
|
|
472 |
btn.click(infer, inputs=[text, negative, width, height, sampler, steps, seed, guidance_scale],
|
473 |
outputs=[gallery], postprocess=False)
|
474 |
|
475 |
+
block.queue(concurrency_count=5,
|
476 |
max_size=100).launch(
|
477 |
max_threads=150,
|
478 |
# server_port=6006,
|