Spaces:
Runtime error
Runtime error
Styled header on space
Browse files- header_patch.py +12 -12
header_patch.py
CHANGED
@@ -1,27 +1,27 @@
|
|
1 |
with gr.Box(visible=os.environ.get("SPACE_ID")):
|
2 |
if os.environ.get("SPACE_ID") and str(os.environ.get("IS_SHARED_UI", "") or "") not in ("", "0"):
|
3 |
gr.HTML(f"""
|
4 |
-
<div class="gr-prose" style="max-width: 80
|
5 |
-
<p
|
6 |
-
<p
|
7 |
-
<p
|
8 |
</div>
|
9 |
""")
|
10 |
elif os.environ.get("SPACE_ID"):
|
11 |
import torch
|
12 |
if not torch.cuda.is_available():
|
13 |
gr.HTML(f"""
|
14 |
-
<div class="gr-prose" style="max-width: 80
|
15 |
-
<p
|
16 |
-
<p
|
17 |
-
<p
|
18 |
</div>
|
19 |
""")
|
20 |
else:
|
21 |
gr.HTML(f"""
|
22 |
-
<div class="gr-prose" style="max-width: 80
|
23 |
-
<p
|
24 |
-
<p
|
25 |
-
<p
|
26 |
</div>
|
27 |
""")
|
|
|
1 |
with gr.Box(visible=os.environ.get("SPACE_ID")):
|
2 |
if os.environ.get("SPACE_ID") and str(os.environ.get("IS_SHARED_UI", "") or "") not in ("", "0"):
|
3 |
gr.HTML(f"""
|
4 |
+
<div class="gr-prose" style="max-width: 80%; font-size: 12px; line-height: 20px; font-family: monospace;">
|
5 |
+
<p>β² Automatic1111's Stable Diffusion WebUI + Mikubill's ControlNet WebUI extension | Running on Hugging Face | Loaded checkpoint: <a href="https://civitai.com/models/10752/the-allys-mix-iii-revolutions" style="target=" _blank"="">theAllysMixIII_v10</a></p>
|
6 |
+
<p>β² Docker build from <a href="https://github.com/kalaspuff/stable-diffusion-webui-docker" style="target=" _blank"="">π GitHub β kalaspuff/stable-diffusion-webui-docker</a> / <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-docker" style="target=" _blank"="">π€ Hugging Face β carloscar/stable-diffusion-webui-docker</a></p>
|
7 |
+
<p>β² Duplicate this Space to run it privately without a queue + load additional checkpoints, VAE, LoRA models, etc. <a style="display:inline-block; position: absolute;" target="_blank" href="https://huggingface.co/spaces/{os.environ["SPACE_ID"]}?duplicate=true"><img style="margin: 0; height: 16px; position: relative; top: 2px;" src="https://img.shields.io/badge/%F0%9F%A4%97%20Hugging%20Face-Duplicate%20Space-blue" alt="Duplicate Space"></a></p>
|
8 |
</div>
|
9 |
""")
|
10 |
elif os.environ.get("SPACE_ID"):
|
11 |
import torch
|
12 |
if not torch.cuda.is_available():
|
13 |
gr.HTML(f"""
|
14 |
+
<div class="gr-prose" style="max-width: 80%; font-size: 12px; line-height: 20px; font-family: monospace;">
|
15 |
+
<p>β² Docker setup: <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-docker" style="target=" _blank"="">π€ Hugging Face β carloscar/stable-diffusion-webui-docker</a> | <a href="https://github.com/kalaspuff/stable-diffusion-webui-docker" style="target=" _blank"="">π GitHub β kalaspuff/stable-diffusion-webui-docker</a></p>
|
16 |
+
<p>β² Load additional checkpoints, VAE, LoRA models, etc. Read more on the README at the GitHub link above.</p>
|
17 |
+
<p>β² This Space is currently running on CPU, which may yield very slow results - you can upgrade for a GPU <a href="https://huggingface.co/spaces/{os.environ["SPACE_ID"]}/settings" style="text-decoration: underline" target="_blank">in the Settings tab</a></p>
|
18 |
</div>
|
19 |
""")
|
20 |
else:
|
21 |
gr.HTML(f"""
|
22 |
+
<div class="gr-prose" style="max-width: 80%; font-size: 12px; line-height: 20px; font-family: monospace;">
|
23 |
+
<p>β² Docker setup: <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-docker" style="target=" _blank"="">π€ Hugging Face β carloscar/stable-diffusion-webui-docker</a> | <a href="https://github.com/kalaspuff/stable-diffusion-webui-docker" style="target=" _blank"="">π GitHub β kalaspuff/stable-diffusion-webui-docker</a></p>
|
24 |
+
<p>β² Load additional checkpoints, VAE, LoRA models, etc. Read more on the README at the GitHub link above.</p>
|
25 |
+
<p>β² This Space has GPU enabled - remember to remove the GPU from the space <a href="https://huggingface.co/spaces/{os.environ["SPACE_ID"]}/settings" style="text-decoration: underline" target="_blank">in the Settings tab</a> when you're done.</p>
|
26 |
</div>
|
27 |
""")
|