Instructions to use airomix/sd with libraries, inference providers, notebooks, and local apps. Follow these links to get started.
- Libraries
- Transformers
How to use airomix/sd with Transformers:
# pip install -U transformers accelerate # Load model directly from transformers import AutoModel model = AutoModel.from_pretrained("airomix/sd", device_map="auto") - Notebooks
- Google Colab
- Kaggle
File size: 1,022 Bytes
8e68b99 | 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 | from pycloudflared import try_cloudflare
from modules.shared import cmd_opts
from gradio import strings
import os
if cmd_opts.cloudflared:
print("cloudflared detected, trying to connect...")
port = cmd_opts.port if cmd_opts.port else 7860
tunnel_url = try_cloudflare(port=port, verbose=False)
os.environ['webui_url'] = tunnel_url.tunnel
colab_url = os.getenv('colab_url')
strings.en["SHARE_LINK_MESSAGE"] = f"Public WebUI Colab URL: {tunnel_url.tunnel}"
strings.en["PUBLIC_SHARE_TRUE"] = f"Public WebUI Colab URL: {tunnel_url.tunnel}"
if cmd_opts.multiple:
print("all detected, cloudflared trying to connect...")
port = cmd_opts.port if cmd_opts.port else 7860
tunnel_url = try_cloudflare(port=port, verbose=False)
os.environ['webui_url'] = tunnel_url.tunnel
colab_url = os.getenv('colab_url')
strings.en["SHARE_LINK_MESSAGE"] = f"Public WebUI Colab URL: {tunnel_url.tunnel}"
strings.en["PUBLIC_SHARE_TRUE"] = f"Public WebUI Colab URL: {tunnel_url.tunnel}"
|