Spaces:
No application file
No application file
Commit
·
2b85222
1
Parent(s):
65db5bb
Update app.py
Browse files
app.py
CHANGED
|
@@ -1 +1,68 @@
|
|
| 1 |
-
{
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
{
|
| 2 |
+
"nbformat": 4,
|
| 3 |
+
"nbformat_minor": 0,
|
| 4 |
+
"metadata": {
|
| 5 |
+
"colab": {
|
| 6 |
+
"provenance": [
|
| 7 |
+
{
|
| 8 |
+
"file_id": "https://gist.github.com/AdamOswald/6030606e4eb31a8aab1ab299bceeb3de#file-copy-of-fine-tuned-diffusion-gradio-ipynb",
|
| 9 |
+
"timestamp": 1675348702376,
|
| 10 |
+
}
|
| 11 |
+
],
|
| 12 |
+
"private_outputs": true,
|
| 13 |
+
},
|
| 14 |
+
"kernelspec": {"name": "python3", "display_name": "Python 3"},
|
| 15 |
+
"language_info": {"name": "python"},
|
| 16 |
+
"gpuClass": "standard",
|
| 17 |
+
"accelerator": "GPU",
|
| 18 |
+
},
|
| 19 |
+
"cells": [
|
| 20 |
+
{
|
| 21 |
+
"cell_type": "markdown",
|
| 22 |
+
"source": [
|
| 23 |
+
"**Finetuned Diffusion demo 🪄🖼️** \n",
|
| 24 |
+
"\n",
|
| 25 |
+
"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 🤗.",
|
| 26 |
+
],
|
| 27 |
+
"metadata": {"id": "oBB6SkL2REFn"},
|
| 28 |
+
},
|
| 29 |
+
{
|
| 30 |
+
"cell_type": "markdown",
|
| 31 |
+
"source": ["### 1. Install dependencies"],
|
| 32 |
+
"metadata": {"id": "2o-2jPqITvtD"},
|
| 33 |
+
},
|
| 34 |
+
{
|
| 35 |
+
"cell_type": "code",
|
| 36 |
+
"execution_count": null,
|
| 37 |
+
"metadata": {"id": "8WYSV-73rslm"},
|
| 38 |
+
"outputs": [],
|
| 39 |
+
"source": [
|
| 40 |
+
"!git clone https://huggingface.co/spaces/AdamOswald1/finetuned_diffusion\n",
|
| 41 |
+
"%cd finetuned_diffusion/\n",
|
| 42 |
+
"!pip install -r requirements.txt\n",
|
| 43 |
+
"!pip install gradio==3.17.1\n",
|
| 44 |
+
"\n",
|
| 45 |
+
"!pip uninstall -y xformers\n",
|
| 46 |
+
"!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",
|
| 47 |
+
],
|
| 48 |
+
},
|
| 49 |
+
{
|
| 50 |
+
"cell_type": "markdown",
|
| 51 |
+
"source": [
|
| 52 |
+
"### 2. Run\n",
|
| 53 |
+
"\n",
|
| 54 |
+
"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",
|
| 55 |
+
"\n",
|
| 56 |
+
"When running in a colab, models need to be downloaded the first time you use them, so give it some time.",
|
| 57 |
+
],
|
| 58 |
+
"metadata": {"id": "g51-cBLlTsO4"},
|
| 59 |
+
},
|
| 60 |
+
{
|
| 61 |
+
"cell_type": "code",
|
| 62 |
+
"source": ["!python app.py"],
|
| 63 |
+
"metadata": {"id": "dMhWUqKdNzn3"},
|
| 64 |
+
"execution_count": null,
|
| 65 |
+
"outputs": [],
|
| 66 |
+
},
|
| 67 |
+
],
|
| 68 |
+
}
|