{ "cells": [ { "cell_type": "markdown", "source": [ "# 1. Setup the web ui" ], "metadata": { "id": "bsiZpfkU7S77" } }, { "cell_type": "code", "execution_count": null, "metadata": { "id": "sBbcB4vwj_jm" }, "outputs": [], "source": [ "!pip install --upgrade fastapi==0.90.0\n", "!git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui\n", "!git clone https://github.com/yfszzx/stable-diffusion-webui-images-browser /content/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser\n", "\n", "# Model(s) setup\n", "# Below are model code for Anything V4.5, we always could change it to our desired model (how-to: https://youtu.be/vj-QrS_mWQI or https://youtu.be/MwyfwPFezvY)\n", "!curl -Lo anythingv4.5.ckpt https://huggingface.co/andite/anything-v4.0/resolve/main/anything-v4.5-pruned.ckpt\n", "!curl -Lo anythingv4.5.vae.pt https://huggingface.co/andite/anything-v4.0/resolve/main/anything-v4.0.vae.pt\n", "!mv \"/content/anythingv4.5.ckpt\" \"/content/stable-diffusion-webui/models/Stable-diffusion\"\n", "!mv \"/content/anythingv4.5.vae.pt\" \"/content/stable-diffusion-webui/models/Stable-diffusion\"\n", "\n", "# Additional embeddings\n", "!curl -Lo bad-artist.pt https://huggingface.co/nick-x-hacker/bad-artist/resolve/main/bad-artist.pt\n", "!curl -Lo bad-artist-anime.pt https://huggingface.co/nick-x-hacker/bad-artist/resolve/main/bad-artist-anime.pt\n", "!mv \"/content/bad-artist.pt\" \"/content/stable-diffusion-webui/embeddings\"\n", "!mv \"/content/bad-artist-anime.pt\" \"/content/stable-diffusion-webui/embeddings\"\n", "\n", "%cd /content/stable-diffusion-webui\n", "!git checkout 91c8d0d\n", "!COMMANDLINE_ARGS=\"--share --disable-safe-unpickle --enable-insecure-extension-access\" REQS_FILE=\"requirements.txt\" python launch.py" ] }, { "cell_type": "markdown", "source": [ "# 2. After the gradio link show up, stop the first cell & clear the code output👆" ], "metadata": { "id": "JUtPlg328avv" } }, { "cell_type": "markdown", "source": [ "# 3. Load the LoRA & launch the web ui" ], "metadata": { "id": "qxhOCPrg7WXm" } }, { "cell_type": "code", "source": [ "!curl -Lo toriyama_akira_3.safetensors https://huggingface.co/nolanaatama/atslora/resolve/main/atslora.safetensors\n", "!mv \"/content/stable-diffusion-webui/toriyama_akira_3.safetensors\" \"/content/stable-diffusion-webui/models/Lora\"\n", "!COMMANDLINE_ARGS=\"--share --disable-safe-unpickle --no-half-vae --xformers --reinstall-xformers --enable-insecure-extension-access\" REQS_FILE=\"requirements.txt\" python launch.py" ], "metadata": { "id": "pZVeLcbD70Lf" }, "execution_count": null, "outputs": [] }, { "cell_type": "markdown", "metadata": { "id": "fhwIXzcgfkoR" }, "source": [ "# 📚 GitHub for more: [_@nolanaatama_](https://github.com/nolanaatama)\n", "# 📦 Repo: [Github](https://github.com/nolanaatama/sd-1click-colab)" ] } ], "metadata": { "accelerator": "GPU", "colab": { "provenance": [] }, "gpuClass": "standard", "kernelspec": { "display_name": "Python 3", "name": "python3" }, "language_info": { "name": "python" } }, "nbformat": 4, "nbformat_minor": 0 }