Spaces:
Build error
Build error
Update app.py
Browse files
app.py
CHANGED
|
@@ -34,14 +34,14 @@ qrcode_generator = qrcode.QRCode(
|
|
| 34 |
)
|
| 35 |
|
| 36 |
controlnet = ControlNetModel.from_pretrained(
|
| 37 |
-
"monster-labs/control_v1p_sd15_qrcode_monster",
|
| 38 |
-
|
| 39 |
torch_dtype=torch.float16
|
| 40 |
).to("cuda")
|
| 41 |
|
| 42 |
pipe = StableDiffusionControlNetImg2ImgPipeline.from_pretrained(
|
| 43 |
-
|
| 44 |
-
"benjamin-paine/stable-diffusion-v1-5",
|
| 45 |
controlnet = controlnet,
|
| 46 |
torch_dtype = torch.float16,
|
| 47 |
safety_checker = None,
|
|
@@ -433,65 +433,5 @@ with gr.Blocks(theme=gr.themes.Monochrome()) as blocks:
|
|
| 433 |
concurrency_limit=20
|
| 434 |
)
|
| 435 |
|
| 436 |
-
gr.Examples(
|
| 437 |
-
examples=[
|
| 438 |
-
[
|
| 439 |
-
"https://huggingface.co/",
|
| 440 |
-
"A sky view of a colorful lakes and rivers flowing through the desert",
|
| 441 |
-
"ugly, disfigured, low quality, blurry, nsfw",
|
| 442 |
-
7.5,
|
| 443 |
-
1.3,
|
| 444 |
-
0.9,
|
| 445 |
-
5392011833,
|
| 446 |
-
None,
|
| 447 |
-
None,
|
| 448 |
-
True,
|
| 449 |
-
"DPM++ Karras SDE",
|
| 450 |
-
],
|
| 451 |
-
[
|
| 452 |
-
"https://huggingface.co/",
|
| 453 |
-
"Bright sunshine coming through the cracks of a wet, cave wall of big rocks",
|
| 454 |
-
"ugly, disfigured, low quality, blurry, nsfw",
|
| 455 |
-
7.5,
|
| 456 |
-
1.11,
|
| 457 |
-
0.9,
|
| 458 |
-
2523992465,
|
| 459 |
-
None,
|
| 460 |
-
None,
|
| 461 |
-
True,
|
| 462 |
-
"DPM++ Karras SDE",
|
| 463 |
-
],
|
| 464 |
-
[
|
| 465 |
-
"https://huggingface.co/",
|
| 466 |
-
"Sky view of highly aesthetic, ancient greek thermal baths in beautiful nature",
|
| 467 |
-
"ugly, disfigured, low quality, blurry, nsfw",
|
| 468 |
-
7.5,
|
| 469 |
-
1.5,
|
| 470 |
-
0.9,
|
| 471 |
-
2523992465,
|
| 472 |
-
None,
|
| 473 |
-
None,
|
| 474 |
-
True,
|
| 475 |
-
"DPM++ Karras SDE",
|
| 476 |
-
],
|
| 477 |
-
],
|
| 478 |
-
fn=inference,
|
| 479 |
-
inputs=[
|
| 480 |
-
qr_code_content,
|
| 481 |
-
prompt,
|
| 482 |
-
negative_prompt,
|
| 483 |
-
guidance_scale,
|
| 484 |
-
controlnet_conditioning_scale,
|
| 485 |
-
strength,
|
| 486 |
-
seed,
|
| 487 |
-
init_image,
|
| 488 |
-
qr_code_image,
|
| 489 |
-
use_qr_code_as_init_image,
|
| 490 |
-
sampler,
|
| 491 |
-
],
|
| 492 |
-
outputs=[result_image],
|
| 493 |
-
cache_examples=False,
|
| 494 |
-
)
|
| 495 |
-
|
| 496 |
blocks.queue(max_size=20,api_open=False)
|
| 497 |
blocks.launch(share=bool(os.environ.get("SHARE", False)), show_api=True)
|
|
|
|
| 34 |
)
|
| 35 |
|
| 36 |
controlnet = ControlNetModel.from_pretrained(
|
| 37 |
+
#"monster-labs/control_v1p_sd15_qrcode_monster",
|
| 38 |
+
"DionTimmer/controlnet_qrcode-control_v1p_sd15",
|
| 39 |
torch_dtype=torch.float16
|
| 40 |
).to("cuda")
|
| 41 |
|
| 42 |
pipe = StableDiffusionControlNetImg2ImgPipeline.from_pretrained(
|
| 43 |
+
"digiplay/GhostMixV1.2VAE",
|
| 44 |
+
#"benjamin-paine/stable-diffusion-v1-5",
|
| 45 |
controlnet = controlnet,
|
| 46 |
torch_dtype = torch.float16,
|
| 47 |
safety_checker = None,
|
|
|
|
| 433 |
concurrency_limit=20
|
| 434 |
)
|
| 435 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 436 |
blocks.queue(max_size=20,api_open=False)
|
| 437 |
blocks.launch(share=bool(os.environ.get("SHARE", False)), show_api=True)
|