File size: 8,017 Bytes
823b48b |
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 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 |
{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "-1jw8kgDlyHY"
},
"source": [
"# ESD Cinnamomo\n",
"\n",
"### Reference Links: 애옹이도둑 (https://arca.live/b/aiart/59406212), (https://colab.research.google.com/drive/1nBaePtwcW_ds7OQdFebcxB91n_aORQY5?usp=sharing)\n",
"\n",
"###This ipynb file is a modified version of original file. *CC BY-NC-SA 4.0* license.\n",
"\n",
"\n",
"### How to execute\n",
" 1. Click the *Runtime* menu, and choose *Change runtime type*, set *Hardware accelerator* to *GPU*.\n",
" - ⚠ try another account if you're out of GPU usage limit\n",
" 1. *Runtime* > *Run all(Ctrl+F9)*\n",
" 1. About 5-10 minutes after of execution, you may see the link to entre the Web UI.\n",
" (`https://xxxxxx.gradio.app`)\n",
" 1. For further information, or make enquiry of errors, Go to communities on below or to [Mini Community of the Original attributor](https://gall.dcinside.com/mini/board/lists/?id=owo)\n",
"\n",
"### Korean AI Community\n",
"- [아카라이브 AI그림 채널](https://arca.live/b/aiart)\n",
"- [디시인사이드 AI 창작 마이너 갤러리](https://gall.dcinside.com/m/aicreate)\n",
"\n",
"### See More\n",
"- https://rentry.org/voldy\n",
"- https://rentry.org/sdmodels\n",
"- https://cyberes.github.io/stable-diffusion-models/\n",
"- https://github.com/AUTOMATIC1111/stable-diffusion-webui\n",
"- https://public.vmm.pw/aeon/models"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "sZ9zJsP-ciOI"
},
"outputs": [],
"source": [
"#@title Preparing { display-mode: \"form\" }\n",
"\n",
"###Python 3.10 install\n",
"!apt install -yq python3.10 python3.10-dev\n",
"!update-alternatives --install /usr/bin/python3 python3 /usr/bin/python3.10 100\n",
"!python <(curl -s 'https://bootstrap.pypa.io/get-pip.py')\n",
"##########\n",
"\n",
"###ui cloning\n",
"!git clone 'https://github.com/AUTOMATIC1111/stable-diffusion-webui'\n",
"!apt install -yq build-essential libgl1\n",
"!pip install cython\n",
"!pip install -r stable-diffusion-webui/requirements.txt\n",
"##########\n",
"\n",
"###change mapping position to VRAM\n",
"# Colab send SIGKILL to process if model is too large. we can fix this issue by replacing model map location to VRAM.\n",
"# thanks to https://gist.github.com/td2sk/e32a39344537fb3cd756ef4abdd3d371\n",
"!sed -i 's/map_location=\"cpu\"/map_location=torch.device(\"cuda\")/g' ./stable-diffusion-webui/modules/sd_models.py\n",
"##########\n",
"\n",
"###Aria2c setting\n",
"!apt install -yq aria2\n",
"!mkdir -p ~/.aria2\n",
"!mkdir -p stable-diffusion-webui/models/Stable-diffusion\n",
"\n",
"from pathlib import Path\n",
"f = open(Path.joinpath(Path.home(), '.aria2', 'aria2.conf'), \"w\")\n",
"f.write(\"\"\"\n",
"summary-interval=3\n",
"allow-overwrite=true\n",
"always-resume=true\n",
"disk-cache=64M\n",
"continue=true\n",
"min-split-size=8M\n",
"max-concurrent-downloads=16\n",
"max-connection-per-server=16\n",
"max-overall-download-limit=0\n",
"max-download-limit=0\n",
"split=32\n",
"seed-time=0\n",
"\"\"\")\n",
"f.close()\n",
"##########\n",
"\n",
"from google.colab import output\n",
"output.clear()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "HT2EtHJPkYqV"
},
"outputs": [],
"source": [
"#@title Models list\n",
"\n",
"#PCIA A1 Config = https://shorturl.at/HSW23 #config.yaml\n",
"#PCIA A1 VAE = https://shorturl.at/cwxD5 #VAE\n",
"#PCIA A1 = https://shorturl.at/twXZ5 #ckpt\n",
"\n",
"#Standard Model 1.4 = https://public.vmm.pw/aeon/models/sd-v1-4.ckpt\n",
"\n",
"#Waifu Diffusion 1.3 = https://huggingface.co/hakurei/waifu-diffusion-v1-3/resolve/main/wd-v1-3-full.ckpt\n",
"#WD v1.2 and SD v1.4 Merged = https://public.vmm.pw/aeon/models/wd1-2_sd1-4_merged.ckpt\n",
"\n",
"#trinart_stable_diffusion_v2 60,000 Steps = https://huggingface.co/naclbit/trinart_stable_diffusion_v2/resolve/main/trinart2_step60000.ckpt\n",
"#trinart_stable_diffusion_v2 115,000 Steps = https://huggingface.co/naclbit/trinart_stable_diffusion_v2/resolve/main/trinart2_step115000.ckpt\n",
"\n",
"#Hiten = https://huggingface.co/BumblingOrange/Hiten/resolve/main/Hiten%20girl_anime_8k_wallpaper_4k.ckpt\n"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "pAkrfWHYgfdg"
},
"outputs": [],
"source": [
"#@title Download the Models\n",
"\n",
"!aria2c -d stable-diffusion-webui/models/Stable-diffusion -Z https://shorturl.at/HSW23 https://shorturl.at/cwxD5 https://shorturl.at/twXZ5\n",
"#put URL of Config and VAE first\n",
"#!aria2c -d 'directory' -Z 'Config file' 'VAE file' 'ckpt file #1' 'ckpt file #2' 'ckpt file #3'\n",
"\n",
"from google.colab import output\n",
"output.clear()"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"cellView": "form",
"id": "nHVHV-kafSS4"
},
"outputs": [],
"source": [
"#@title Execute and Entre\n",
"!pip install --upgrade setuptools # TODO: fix 'setup.py egg_info' error\n",
"!cd stable-diffusion-webui && python launch.py --share"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {},
"outputs": [],
"source": [
"#####TIPS#####\n",
"#(tag:int number) to adjust weight of tags.\n",
"#()=1.1\n",
"#(())=1.21 or 1.2\n",
"#((()))=1.33 or 1.3\n",
"\n",
"#Recommend prompt:(masterpiece:1.3), (best quality:1.3), (solo:1.3), (full body shot:1.3), (finely detailed beautiful eyes and detailed face:1.3), (bishoujo:1.3), (turquoise eyes:1.3), (blonde hair:1.3), (realistic body:1.3), (imperial crown:1.3), (dress:1.3), (jewelry belt:1.3), (jagged ornaments:1.3), (large jewelry:1.3), (large fallal:1.3), (glitter effect:1.3), octane render, cinematic light\n",
"#Negative prompt: (ugly:1.3), (duplicate:1.3), (morbid:1.2), (mutilated:1.2), (tranny:1.3), (trans:1.3), (trannsexual:1.3), (hermaphrodite:1.1), [out of frame], extra fingers, mutated hands, (poorly drawn hands:1.2), (poorly drawn face:1.2), (mutation:1.3), (deformed:1.3), blurry, (bad anatomy:1.2), (bad proportions:1.3), (extra limbs:1.3), cloned face, (disfigured:1.3), (more than 2 nipples:1.3), (more than 2 brests per person:1.3),[[[adult]]], out of frame, extra limbs, (bad anatomy:1.1), gross proportions, (malformed limbs:1.1), (missing arms:1.3), (missing legs:1.3), (extra arms:1.3), (extra legs:1.3), mutated hands, (fused fingers:1.1), (too many fingers:1.1), (long neck:1.3), (lowres:1.3), (low quality:1.3), (signature: 1.3), (watermark:1.3)\n",
"\n",
"#Steps: 50, Sampler: DPM2 a, CFG scale: 7.5, Seed: -1, Size: 512x768, Model hash: -1, Denoising strength: 0.7"
]
}
],
"metadata": {
"accelerator": "GPU",
"colab": {
"collapsed_sections": [],
"provenance": []
},
"kernelspec": {
"display_name": "Python 3",
"name": "python3"
},
"language_info": {
"name": "python"
}
},
"nbformat": 4,
"nbformat_minor": 0
}
|