meowingamogus69/stable-diffusion-webui-controlnet-docker
4
1 with gr.Box(visible=os.environ.get("SPACE_ID")):2 is_shared_ui = str(os.environ.get("IS_SHARED_UI", "") or "").strip().lower() not in ("", "0", "false", "none", "no")3 if is_shared_ui:4 import torch5 if not torch.cuda.is_available():6 gr.HTML(f"""7 <div class="gr-prose" style="max-width: 80%; font-size: 12px; line-height: 20px; font-family: monospace;">8 <p>▲ Automatic1111's Stable Diffusion WebUI + Mikubill's ControlNet WebUI extension | Running on Hugging Face | Loaded checkpoint: <a href="https://civitai.com/models/8124/a-to-zovya-rpg-artists-tools-15-and-21" style="target=" _blank"="">AtoZovyaRPGArtistTools15_sd15V1</a></p>9 <p>▲ Docker build from <a href="https://github.com/kalaspuff/stable-diffusion-webui-controlnet-docker" style="target=" _blank"="">🐙 GitHub ➔ kalaspuff/stable-diffusion-webui-controlnet-docker</a> / <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-controlnet-docker" style="target=" _blank"="">🤗 Hugging Face ➔ carloscar/stable-diffusion-webui-controlnet-docker</a></p>10 <p>▲ This Space is currently running on CPU, which may yield very slow results - you can upgrade for a GPU after duplicating the space.</p>11 <p>▲ Duplicate this Space to run it privately without a queue, use a GPU for faster generation times, load custom checkpoints, 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>12 </div>13 """)14 else:15 gr.HTML(f"""16 <div class="gr-prose" style="max-width: 80%; font-size: 12px; line-height: 20px; font-family: monospace;">17 <p>▲ Automatic1111's Stable Diffusion WebUI + Mikubill's ControlNet WebUI extension | Running on Hugging Face | Loaded checkpoint: <a href="https://civitai.com/models/8124/a-to-zovya-rpg-artists-tools-15-and-21" style="target=" _blank"="">AtoZovyaRPGArtistTools15_sd15V1</a></p>18 <p>▲ Docker build from <a href="https://github.com/kalaspuff/stable-diffusion-webui-controlnet-docker" style="target=" _blank"="">🐙 GitHub ➔ kalaspuff/stable-diffusion-webui-controlnet-docker</a> / <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-controlnet-docker" style="target=" _blank"="">🤗 Hugging Face ➔ carloscar/stable-diffusion-webui-controlnet-docker</a></p>19 <p>▲ Duplicate this Space to run it privately without a queue, use extensions, load custom checkpoints, 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>20 </div>21 """)22 elif os.environ.get("SPACE_ID"):23 import torch24 if not torch.cuda.is_available():25 gr.HTML(f"""26 <div class="gr-prose" style="max-width: 80%; font-size: 12px; line-height: 20px; font-family: monospace;">27 <p>▲ Docker build from <a href="https://github.com/kalaspuff/stable-diffusion-webui-controlnet-docker" style="target=" _blank"="">🐙 GitHub ➔ kalaspuff/stable-diffusion-webui-controlnet-docker</a> / <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-controlnet-docker" style="target=" _blank"="">🤗 Hugging Face ➔ carloscar/stable-diffusion-webui-controlnet-docker</a></p>28 <p>▲ Load additional checkpoints, VAE, LoRA models, etc. Read more on the README at the GitHub link above.</p>29 <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>30 </div>31 """)32 else:33 gr.HTML(f"""34 <div class="gr-prose" style="max-width: 80%; font-size: 12px; line-height: 20px; font-family: monospace;">35 <p>▲ Docker build from <a href="https://github.com/kalaspuff/stable-diffusion-webui-controlnet-docker" style="target=" _blank"="">🐙 GitHub ➔ kalaspuff/stable-diffusion-webui-controlnet-docker</a> / <a href="https://huggingface.co/spaces/carloscar/stable-diffusion-webui-controlnet-docker" style="target=" _blank"="">🤗 Hugging Face ➔ carloscar/stable-diffusion-webui-controlnet-docker</a></p>36 <p>▲ Load additional checkpoints, VAE, LoRA models, etc. Read more on the README at the GitHub link above.</p>37 <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>38 </div>39 """)40 