File size: 3,449 Bytes
2b85222
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
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
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
{
    "nbformat": 4,
    "nbformat_minor": 0,
    "metadata": {
        "colab": {
            "provenance": [
                {
                    "file_id": "https://gist.github.com/AdamOswald/6030606e4eb31a8aab1ab299bceeb3de#file-copy-of-fine-tuned-diffusion-gradio-ipynb",
                    "timestamp": 1675348702376,
                }
            ],
            "private_outputs": true,
        },
        "kernelspec": {"name": "python3", "display_name": "Python 3"},
        "language_info": {"name": "python"},
        "gpuClass": "standard",
        "accelerator": "GPU",
    },
    "cells": [
        {
            "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_diffusion\n",
                "%cd finetuned_diffusion/\n",
                "!pip install -r requirements.txt\n",
                "!pip install gradio==3.17.1\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": [],
        },
    ],
}