Last active
February 2, 2023 14:21
-
-
Save AdamOswald/9d3ea3cc94fe6a7839e70cde132b6549 to your computer and use it in GitHub Desktop.
finetuned-diffusion-gradio.ipynb
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| { | |
| "nbformat": 4, | |
| "nbformat_minor": 0, | |
| "metadata": { | |
| "colab": { | |
| "provenance": [], | |
| "name": "finetuned-diffusion-gradio.ipynb", | |
| "private_outputs": true, | |
| "include_colab_link": true | |
| }, | |
| "kernelspec": { | |
| "name": "python3", | |
| "display_name": "Python 3" | |
| }, | |
| "language_info": { | |
| "name": "python" | |
| }, | |
| "gpuClass": "standard", | |
| "accelerator": "GPU" | |
| }, | |
| "cells": [ | |
| { | |
| "cell_type": "markdown", | |
| "metadata": { | |
| "id": "view-in-github", | |
| "colab_type": "text" | |
| }, | |
| "source": [ | |
| "<a href=\"https://colab.research.google.com/gist/AdamOswald/9d3ea3cc94fe6a7839e70cde132b6549/copy-of-fine-tuned-diffusion-gradio.ipynb\" target=\"_parent\"><img src=\"https://colab.research.google.com/assets/colab-badge.svg\" alt=\"Open In Colab\"/></a>" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "source": [ | |
| "**Finetuned Diffusion demo 🪄🖼️** \n", | |
| "\n", | |
| "With this app you can run multiple fine-tuned Stable Diffusion models, trained on different styles: [Arcane](https://huggingface.co/nitrosocke/Arcane-Diffusion), [Archer](https://huggingface.co/nitrosocke/archer-diffusion), [Elden Ring](https://huggingface.co/nitrosocke/elden-ring-diffusion), [Spider-Verse](https://huggingface.co/nitrosocke/spider-verse-diffusion), [Modern Disney](https://huggingface.co/nitrosocke/modern-disney-diffusion), [Classic Disney](https://huggingface.co/nitrosocke/classic-anim-diffusion), [Waifu](https://huggingface.co/hakurei/waifu-diffusion), [Pokémon](https://huggingface.co/lambdalabs/sd-pokemon-diffusers), [Pony Diffusion](https://huggingface.co/AstraliteHeart/pony-diffusion), [Robo Diffusion](https://huggingface.co/nousr/robo-diffusion), [Cyberpunk Anime](https://huggingface.co/DGSpitzer/Cyberpunk-Anime-Diffusion), [Tron Legacy](https://huggingface.co/dallinmackay/Tron-Legacy-diffusion) + any other custom Diffusers 🧨 SD model hosted on HuggingFace 🤗." | |
| ], | |
| "metadata": { | |
| "id": "oBB6SkL2REFn" | |
| } | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "source": [ | |
| "### 1. Install dependencies" | |
| ], | |
| "metadata": { | |
| "id": "2o-2jPqITvtD" | |
| } | |
| }, | |
| { | |
| "cell_type": "code", | |
| "execution_count": null, | |
| "metadata": { | |
| "id": "8WYSV-73rslm" | |
| }, | |
| "outputs": [], | |
| "source": [ | |
| "!git clone https://huggingface.co/spaces/AdamOswald1/finetuned_diffusionl\n", | |
| "%cd finetuned_diffusionl/\n", | |
| "!pip install -r requirements.txt\n", | |
| "!pip install gradio==3.15.0\n", | |
| "\n", | |
| "!pip uninstall -y xformers\n", | |
| "!pip install -q https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.15/xformers-0.0.15.dev0+1515f77.d20221130-cp38-cp38-linux_x86_64.whl" | |
| ] | |
| }, | |
| { | |
| "cell_type": "markdown", | |
| "source": [ | |
| "### 2. Run\n", | |
| "\n", | |
| "Expand this cell and run it. After it finishes loading, **open the generated gradio public link** (e.g. https://xxxx.gradio.app) in the output.\n", | |
| "\n", | |
| "When running in a colab, models need to be downloaded the first time you use them, so give it some time." | |
| ], | |
| "metadata": { | |
| "id": "g51-cBLlTsO4" | |
| } | |
| }, | |
| { | |
| "cell_type": "code", | |
| "source": [ | |
| "!python app.py" | |
| ], | |
| "metadata": { | |
| "id": "dMhWUqKdNzn3" | |
| }, | |
| "execution_count": null, | |
| "outputs": [] | |
| } | |
| ] | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment