Upload 10 files
Browse files- CA_AkiHoshino.safetensors +3 -0
- CA_aihara.safetensors +3 -0
- CA_naomi.safetensors +3 -0
- CA_punitan.safetensors +3 -0
- CA_rmmr-15.safetensors +3 -0
- CA_uta.safetensors +3 -0
- CA_yuko.safetensors +3 -0
- CA_yume.safetensors +3 -0
- C_Stewardess_red-unifrom.safetensors +3 -0
- astranime_original.ipynb +955 -0
CA_AkiHoshino.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:141eb316d89f330b69af3ff5ab018fe8ccabd07581ee2ef3b748b0a8974af422
|
3 |
+
size 302113618
|
CA_aihara.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:efaec80172a5c5cc9e5dee16fc70320b54252aa351cc5be756958a4624557f83
|
3 |
+
size 75612964
|
CA_naomi.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:2583a9486888a35bd4d690fb98d1abc9e56216196043526db41f0769c1369693
|
3 |
+
size 75612962
|
CA_punitan.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:75db9b61efea778e7ad3dfd793554c22ca514e8a5e291a2d41ddc84a9fc68850
|
3 |
+
size 37866508
|
CA_rmmr-15.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:d6c274ecf74a1519a5b1a4d36d163d3db355779fd7ad0df0e437d0212d5c492d
|
3 |
+
size 37878998
|
CA_uta.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:3aef0ccb0325799dfa315b8561266ce16707a4eb3ea37a365c2bc80fc1eacb4e
|
3 |
+
size 75612954
|
CA_yuko.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:1654df34bf6c0f6a6b596cbae2c15ccea615b9e1035983996648528b021390e3
|
3 |
+
size 151122110
|
CA_yume.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:ce358680be1a6ea3ed101e68631c9f0e9f6ed750e370a590a76ac4f180c6f7d5
|
3 |
+
size 75612958
|
C_Stewardess_red-unifrom.safetensors
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:cfe67f8b8f5ee82c3833daf4fff247c9ec632549e4ce071b6077d6f2fd4f5ce6
|
3 |
+
size 44288676
|
astranime_original.ipynb
ADDED
@@ -0,0 +1,955 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
{
|
2 |
+
"nbformat": 4,
|
3 |
+
"nbformat_minor": 0,
|
4 |
+
"metadata": {
|
5 |
+
"colab": {
|
6 |
+
"private_outputs": true,
|
7 |
+
"provenance": [],
|
8 |
+
"machine_shape": "hm",
|
9 |
+
"gpuType": "T4"
|
10 |
+
},
|
11 |
+
"kernelspec": {
|
12 |
+
"name": "python3",
|
13 |
+
"display_name": "Python 3"
|
14 |
+
},
|
15 |
+
"language_info": {
|
16 |
+
"name": "python"
|
17 |
+
},
|
18 |
+
"accelerator": "GPU"
|
19 |
+
},
|
20 |
+
"cells": [
|
21 |
+
{
|
22 |
+
"cell_type": "markdown",
|
23 |
+
"source": [
|
24 |
+
"\n",
|
25 |
+
"# **NoCrypt's Colab Remastered 🔮**\n",
|
26 |
+
"\n",
|
27 |
+
"[![my discord](https://dcbadge.vercel.app/api/shield/442099748669751297?style=flat)](https://lookup.guru/442099748669751297) [![ko-fi](https://img.shields.io/badge/Ko--fi-F16061?logo=ko-fi&logoColor=white&style=flat)](https://ko-fi.com/nocrypt) [![ko-fi](https://img.shields.io/badge/Patreon-F1465A?logo=patreon&logoColor=white&style=flat)](https://patreon.com/nocrypt)\n",
|
28 |
+
"\n",
|
29 |
+
"\n",
|
30 |
+
"y'all know what this is. check out my [QoL userscript](https://greasyfork.org/en/scripts/463547-nocrypt-colab-qol) for better experience\n",
|
31 |
+
"\n",
|
32 |
+
"<!-- [Guide for using krita with this colab](https://rentry.org/krita-ext-colab) -->\n",
|
33 |
+
"\n",
|
34 |
+
"<!-- [Hey you, thanks for looking into my colab, please ignore messages below, I just added it to announce stuff faster] -->\n",
|
35 |
+
"<!-- # <font color=red>BROKEN FOR NOW, WILL FIX ASAP ⚠️ -->\n",
|
36 |
+
"\n",
|
37 |
+
"<!-- # <font color=red>Under construction ⚠️ -->\n",
|
38 |
+
"\n",
|
39 |
+
"<small><font color=gray> V23-12-21A | [latest](https://colab.research.google.com/drive/1wEa-tS10h4LlDykd87TF5zzpXIIQoCmq) | [faq](https://rentry.org/ncpt_faq).</font></small>\n",
|
40 |
+
"\n",
|
41 |
+
"\n",
|
42 |
+
"<!-- <font color=yellow><big>Use stable build for now. Do not check latest_webui unless you know what you're doing.</big></font> -->\n",
|
43 |
+
"\n",
|
44 |
+
"<!-- <font color=yellow><big>If the image output is not what you want. Read the terminal</big></font> -->\n",
|
45 |
+
"\n",
|
46 |
+
"<details>\n",
|
47 |
+
" <summary><font color=gray>Latest Changes</summary>\n",
|
48 |
+
" \n",
|
49 |
+
"**Update V23-12-21A**\n",
|
50 |
+
"\n",
|
51 |
+
"```diff\n",
|
52 |
+
" + Potential fix for xformers issue due to CUDA 121\n",
|
53 |
+
"```\n",
|
54 |
+
"</details>\n",
|
55 |
+
"\n",
|
56 |
+
"\n",
|
57 |
+
"<details>\n",
|
58 |
+
" <summary><font color=gray>Old Changes</summary>\n",
|
59 |
+
" + cirno gone again :<\n",
|
60 |
+
" + fix xformers issues\n",
|
61 |
+
" + cirno will stay, to remember a time when colab wasnt evil\n",
|
62 |
+
" + the funky cirno!\n",
|
63 |
+
" + removed some more slanderous things \n",
|
64 |
+
" + Added HF OUT extension (use optional hf token to start)\n",
|
65 |
+
" + Fix for clipskip and other options not showing\n",
|
66 |
+
" + UmiAI is now in an accordion (thanks ao)\n",
|
67 |
+
" + Fix the order of parameters (hires fix no longer being on top)\n",
|
68 |
+
" + Improved interuption speed\n",
|
69 |
+
" + Readjusted XYZ bg colors\n",
|
70 |
+
" + Readjusted image gallery height\n",
|
71 |
+
" + Readjusted UmiAI to be auto enabled (for ur own good, wildcards etc.)\n",
|
72 |
+
" + Readjusted pooling speed so it didn't goes to fast (potential fix for generate button stuck)\n",
|
73 |
+
" + Potential fix for some tunnels having the exact same url for everyone\n",
|
74 |
+
" + Disabled deprication warnings!\n",
|
75 |
+
" + Updated custom theme (NoCrypt/miku)\n",
|
76 |
+
" + Added Privacy Mode Toggle in webui\n",
|
77 |
+
" + Added Dark/Light mode Toggle in webui\n",
|
78 |
+
" + Fixed \"no custom theme\" option\n",
|
79 |
+
" + Added disable-inpainting-overlay extension (for better inpainting)\n",
|
80 |
+
" + Added pixelization extension (with models, check extras tab)\n",
|
81 |
+
" + Adjusted defaults for Tiled Diffusion and Tilled Vae in IMG2IMG (for better experience)\n",
|
82 |
+
" + Attempt to reduce memory usage (especially while upscaling, thx camenduru!)\n",
|
83 |
+
" + Updated to webui 1.5\n",
|
84 |
+
" + Changes to controlnet model path (again, sorry config_to_drive users)\n",
|
85 |
+
" + Fixed DPMPP 2M v2 (for now)\n",
|
86 |
+
" + Fixed ram sd2 patch (for now)\n",
|
87 |
+
" + Fixed some bugs introduced on latest 1.5 using patch (extensions git failure, for now)\n",
|
88 |
+
" + Fix very high memory usage while idle (thanks neggles! 😭)\n",
|
89 |
+
" + Fix ubuntu deps broken\n",
|
90 |
+
" + Changed Branch back to master\n",
|
91 |
+
" + Keep using gradio 3.33.1 (battle-tested)\n",
|
92 |
+
" + Fix unable to start colab in general... (sorry for late fix, I was taking break for 7 days 🙏)\n",
|
93 |
+
" + Fixed ubuntu deps failing to install\n",
|
94 |
+
" + Updated pip deps\n",
|
95 |
+
" + Updated all extensions\n",
|
96 |
+
" + Cleaning up quicksettings area (mostly moved to Options panel under hiresfix)\n",
|
97 |
+
" + Some fixes and improvement with git (no more merge conflict while changing branch or latest webui hopefully)\n",
|
98 |
+
" + Renamed controlnet back to default (fixed deforum)\n",
|
99 |
+
" + Disabled Access Control mode in IIB\n",
|
100 |
+
" + Removed taming transformers\n",
|
101 |
+
" + Changed composable lora to an updated fork by a2569875\n",
|
102 |
+
" + Added neutral prompt extension (AND_PREP etc)\n",
|
103 |
+
" + Removed some files to make the size smaller\n",
|
104 |
+
" + Added surprise for ppl who copied this colab :p\n",
|
105 |
+
" + Added Amedira model\n",
|
106 |
+
" + Update all extensions\n",
|
107 |
+
" + Update all deps\n",
|
108 |
+
" + Added krita-ext fork by ashen\n",
|
109 |
+
" + Fixed anything 4.5 link\n",
|
110 |
+
" + Replace Holokuki2 -> Gishiki\n",
|
111 |
+
" + Fixed image preview looks fried\n",
|
112 |
+
" + Add more negative embeddings by Lykon and Luna\n",
|
113 |
+
" + Changed extensions paths\n",
|
114 |
+
" + Decrease live_preview_refresh_period\n",
|
115 |
+
" + Less warcrimes\n",
|
116 |
+
" + Switched to release_candidate branch as default\n",
|
117 |
+
" + Fixed \"visualize\" in two-shot\n",
|
118 |
+
" + Added openpose-editor\n",
|
119 |
+
" + Removed Posex\n",
|
120 |
+
" + Minor fix for gdown\n",
|
121 |
+
" + Using gradio 3.33.1 to fix tmp file name bug\n",
|
122 |
+
" + Updated to latest webui\n",
|
123 |
+
" + Updated extensions\n",
|
124 |
+
" + Fixed Controlnet v1.1 for good now (yes, including tile stuff)\n",
|
125 |
+
" + Removed canvas-zoom as it's unstable for mobile usage for now (can still be manually installed)\n",
|
126 |
+
" + [QoL Userscript] Fixed ngrok token autosave (pls update manually via ur userscript manager)\n",
|
127 |
+
" + Added sam models support with `sam:` prefix (thanks ZeroDuri#7380)\n",
|
128 |
+
" + Removed notification sound from colab since it's buggy and sometimes rang for no reason XD\n",
|
129 |
+
" + added more negative TIs (EN2, negative_hand, simple5.5, simple5.6)\n",
|
130 |
+
" + updated all extensions\n",
|
131 |
+
" + using different gradio for now to fix gen button stuck\n",
|
132 |
+
" + attempts to fix vae first load issue\n",
|
133 |
+
" - removed locon extension (replaced by lycoris ext fully)\n",
|
134 |
+
" + added waifu diffusion 1.5 b3 all aesthetic variants\n",
|
135 |
+
" + attempts to make colab start faster\n",
|
136 |
+
" + added lycoris support with lycoris prefix like this `lycoris:https://link.com`\n",
|
137 |
+
" + added notification sounds after download complete (in colab itself, not webui)\n",
|
138 |
+
" - disabled stealth pnginfo for now due to some bug\n",
|
139 |
+
" + change image browser to infinite img browser\n",
|
140 |
+
" + add adetailer\n",
|
141 |
+
" + add canvas-zoom\n",
|
142 |
+
" + update webui to the latest commit\n",
|
143 |
+
" + update all extensions\n",
|
144 |
+
" - removed custom theme as of now (y-yes im lazy)\n",
|
145 |
+
" + adapted to py 3.10.11\n",
|
146 |
+
" + updated all extension\n",
|
147 |
+
" + revised blapshemy\n",
|
148 |
+
" + updated configs to match blapshemy dir\n",
|
149 |
+
" + Blapshemy!\n",
|
150 |
+
" + Controlnet 1.1\n",
|
151 |
+
" + Google updated torch to 2.0.0+cu118\n",
|
152 |
+
" + Updated all deps to adapt the google's new update\n",
|
153 |
+
" + Updated xformers to 0.0.18\n",
|
154 |
+
" + Added 2 NMKD Upscaler (YandereNeo and Superscale)\n",
|
155 |
+
" + Added DEPD Upscaler\n",
|
156 |
+
" + Added `[REDACTED]-state` and `sd_webui_stealth_pnginfo` extension\n",
|
157 |
+
" + New quicksettings item: stealth_pnginfo checkbox\n",
|
158 |
+
" + Disabled april fools troll\n",
|
159 |
+
" - Revert back to STABLE COMMIT (Stable by default)\n",
|
160 |
+
" - Disabled pulling latest webui checkbox\n",
|
161 |
+
" + Added [mofu]-3d-open-pose-editor\n",
|
162 |
+
" + Changed image browser to AlUlkesh's fork\n",
|
163 |
+
" + Updated necessary deps\n",
|
164 |
+
" + Updated extensions\n",
|
165 |
+
" + Added more tunnels to \"Alternative Tunnels\"\n",
|
166 |
+
" + Added more ram optimization (camenduru's ram patch)\n",
|
167 |
+
" + Added fun stuff :>\n",
|
168 |
+
" + Changes to output name to be more meaningful\n",
|
169 |
+
" + Attempt to fix broken start link\n",
|
170 |
+
" - Disabled openpose-editor\n",
|
171 |
+
" - Disabled [mofu]-depth-lib\n",
|
172 |
+
" - Deleted Easter Egg (will add more in future without noticing)\n",
|
173 |
+
" + Change defaults: negative prompts, max res, max batch size\n",
|
174 |
+
" + Added [mofu]-runtime-block-merge\n",
|
175 |
+
" + Added multidiffusion-upscaler-for-automatic1111\n",
|
176 |
+
" + Added [REDACTED]-image-filters\n",
|
177 |
+
" + Added sd-dynamic-prompts + wildcards (credit: CtD)\n",
|
178 |
+
" + Fixed configs_in_drive and output_to_drive can't work together\n",
|
179 |
+
" + Fixed merge conflict issue that preventing webui from starting\n",
|
180 |
+
" + Updated xformers\n",
|
181 |
+
" + Added [mofu]-tunnels (fork by camenduru)\n",
|
182 |
+
" + Changed `[REDACTED]-images-browser` extension to `sd_images_browser` (fork by aka7774)\n",
|
183 |
+
" + Added sd-fast-pnginfo extension\n",
|
184 |
+
" + Replaced blessed_vae -> blessed2_vae\n",
|
185 |
+
" + Adapted to python 3.9 update\n",
|
186 |
+
" + Added t2iadapter models (including style)\n",
|
187 |
+
" + Increase ControlNet Max Models to 4\n",
|
188 |
+
" + New Default Extension: [[mofu]-llul] gh: hnmr293 sd + webui-llul\n",
|
189 |
+
" + Fixed broken img2img\n",
|
190 |
+
"\n",
|
191 |
+
" + Added Composable Lora extension\n",
|
192 |
+
" + Added Custom tags + easter eggs :>\n",
|
193 |
+
" + Added poseX and [REDACTED]-fix-image-paste extensions\n",
|
194 |
+
" + Added Colab Mobile Keep Alive cell (in useful utils, run it before start cell)\n",
|
195 |
+
" + Fixed extra networks tab after re-ordering tool buttons\n",
|
196 |
+
" + Added an option to disable notification sound in webui\n",
|
197 |
+
" + Lowered the notification sound by 40%. (thanks RileyX for the suggestion)\n",
|
198 |
+
" + Replaced two_shot_ext options (already built in)\n",
|
199 |
+
" + All_ControlNet is now enabled by default\n",
|
200 |
+
" + Notification sounds when finished generating, forked from https://github.com/etherealxx/batchlinks-webui\n",
|
201 |
+
" + New default extensions:\n",
|
202 |
+
" + [REDACTED]-two-shot\n",
|
203 |
+
" + [mofu]-supermerger\n",
|
204 |
+
" + batchlinks-webui\n",
|
205 |
+
" + a1111-[mofu]-locon\n",
|
206 |
+
" + [mofu]-depth-lib\n",
|
207 |
+
" + openpose-editor\n",
|
208 |
+
"\n",
|
209 |
+
" + Manual Downloads is now supported. Guide soon!\n",
|
210 |
+
" + Added Waifu Diffusion Beta2 Aesthetic\n",
|
211 |
+
" + Replaced WD 1.5 Beta -> Waifu Diffusion Beta2\n",
|
212 |
+
" + Fixed SD vae\n",
|
213 |
+
" + New option: fast_start. This will make the startup speed faster by bypassing dependency installations (will break extensions, use with caution)\n",
|
214 |
+
" + New option: configs_in_drive. This will use configs (config, uiconfig, styles) in your drive\n",
|
215 |
+
" + Changed git pull logic to first install only for saving time (will add old option soon)\n",
|
216 |
+
" + Updated xformers, deps, and some UI settings\n",
|
217 |
+
" + New model: All DIFF control models (see the differences [here](https://huggingface.co/kohya-ss/ControlNet-diff-modules/discussions/1))\n",
|
218 |
+
" + Fixed umiAI and two shot can't be installed together (Thanks Aojiru)\n",
|
219 |
+
" + Fixed control models hardlink (Thanks Aojiru)\n",
|
220 |
+
" + New model: All Control Models (fp16)\n",
|
221 |
+
" + New option: Two_shot Extension\n",
|
222 |
+
" + Support for control models in `custom_urls`\n",
|
223 |
+
" + Added controlnet extension by default\n",
|
224 |
+
" + Preload with self-trimmed and self-converted safetensors openpose model (+openpose hands and body pth models)\n",
|
225 |
+
" - Installation speed slowed by few seconds due to models addition (1.7gb -> 3gb)\n",
|
226 |
+
" - Changed console text to cyan\n",
|
227 |
+
" - Model replaced: WD 1.4 e1 -> WD 1.5 Beta\n",
|
228 |
+
" - New option: UmiAI. Now it's a separate option, no more bloated embeddings :D\n",
|
229 |
+
" - New option: Update extensions. Basically updating all the extension the latest version (Might be slow)\n",
|
230 |
+
" - New option: Colab Optimization. (basically Load in vram + aggressive gradio queue)\n",
|
231 |
+
" - Added support for old commits by removing inbuilt negative embeddings. (if you use commit_hash that is)\n",
|
232 |
+
" - Gradio server is turned off when `alternative tunnel` or `ngrok` is active.\n",
|
233 |
+
"\n",
|
234 |
+
"\n",
|
235 |
+
"</details>\n",
|
236 |
+
"\n",
|
237 |
+
"<img src=\"https://count.getloli.com/get/@:ncpt-colab?theme=rule34\" height=\"90px\" alt=\"counted since: May 14\"/>\n",
|
238 |
+
"<br>\n",
|
239 |
+
"<!-- <img src=\"https://media.tenor.com/6lm-svEn7dEAAAAC/cirno-fumo.gif\" height=\"90px\" alt=\"cirno day exclusive\"/> -->\n"
|
240 |
+
],
|
241 |
+
"metadata": {
|
242 |
+
"id": "mgKX41doZJ3u"
|
243 |
+
}
|
244 |
+
},
|
245 |
+
{
|
246 |
+
"cell_type": "markdown",
|
247 |
+
"source": [
|
248 |
+
"# Since there's still lots of demands from colab pro users....\n",
|
249 |
+
"I will maintain this colab again. But no guarantee that it will work since I dont have colab pro for testing it.\n",
|
250 |
+
"\n",
|
251 |
+
"Although, I can still update some of them via Paperspace, some feature like dependencies injection might gone in the future, this mean the startup time would be a lot slower.\n",
|
252 |
+
"\n",
|
253 |
+
"---\n",
|
254 |
+
"\n",
|
255 |
+
"Remember that this notebook now only work for **Colab Pro users** who have compute units. Meaning free users might have issues with it.\n",
|
256 |
+
"\n",
|
257 |
+
"\n",
|
258 |
+
"<font color=\"#612\"><sup>btw paperspace is better than colab pro, both are paid so dont bother checking if it was free or not</sup></p>\n",
|
259 |
+
"\n",
|
260 |
+
"<!-- I fuckin made tons of people bought Colab Pro, yet Google didnt appriciate my work at all, fuck this man -->"
|
261 |
+
],
|
262 |
+
"metadata": {
|
263 |
+
"id": "QJodVVDuufSW"
|
264 |
+
}
|
265 |
+
},
|
266 |
+
{
|
267 |
+
"cell_type": "code",
|
268 |
+
"execution_count": null,
|
269 |
+
"metadata": {
|
270 |
+
"id": "8Uvqba0yKW7U"
|
271 |
+
},
|
272 |
+
"outputs": [],
|
273 |
+
"source": [
|
274 |
+
"# Dear Google, I love you! Please don't ban me from colab T_T\n",
|
275 |
+
"#added yoinked\n",
|
276 |
+
"#@title # **Start** 🚀\n",
|
277 |
+
"# All necessary imports goes here\n",
|
278 |
+
"from IPython.display import clear_output, display, HTML\n",
|
279 |
+
"import os\n",
|
280 |
+
"import time\n",
|
281 |
+
"from datetime import timedelta\n",
|
282 |
+
"from google.colab import drive\n",
|
283 |
+
"from IPython.utils import capture\n",
|
284 |
+
"from subprocess import getoutput\n",
|
285 |
+
"from urllib.parse import unquote\n",
|
286 |
+
"from google.colab.output import eval_js\n",
|
287 |
+
"%cd /content\n",
|
288 |
+
"\n",
|
289 |
+
"try:\n",
|
290 |
+
" start_colab\n",
|
291 |
+
"except:\n",
|
292 |
+
" start_colab = int(time.time())-5\n",
|
293 |
+
"\n",
|
294 |
+
"print(\"\\033[96m\") #Cyan text\n",
|
295 |
+
"# Check if gpu exist, stop if don't.\n",
|
296 |
+
"try:\n",
|
297 |
+
" output\n",
|
298 |
+
"except:\n",
|
299 |
+
" print('⌚ Checking GPU...', end='')\n",
|
300 |
+
" output = getoutput('nvidia-smi --query-gpu=gpu_name --format=csv')\n",
|
301 |
+
" if \"name\" in output:\n",
|
302 |
+
" gpu_name = output[5:]\n",
|
303 |
+
" print('\\r✅ Current GPU:', gpu_name, flush=True)\n",
|
304 |
+
" else:\n",
|
305 |
+
" print('\\r\\033[91m❎ ERROR: No GPU detected. Please do step below to enable.\\n', flush=True)\n",
|
306 |
+
" display(HTML(\"<img src='https://i.ibb.co/HC9KH17/NVIDIA-Share-23-01-02-173037.png' width='800px'/>\"))\n",
|
307 |
+
" print('\\033[91m\\nIf it says \"Cannot connect to GPU backend\", meaning you\\'ve either reached free usage limit. OR there\\'s no gpu available.\\n\\nDon\\'t mind me... I\\'m destroying your current session for your own good...')\n",
|
308 |
+
" display(HTML(\"<img src='https://media.tenor.com/E9omRGF7x0AAAAAC/hitori-gotou-bocchi-rock.gif' width='500px'/>\"))\n",
|
309 |
+
" time.sleep(5)\n",
|
310 |
+
" from google.colab import runtime\n",
|
311 |
+
" runtime.unassign()\n",
|
312 |
+
"\n",
|
313 |
+
"# [ALL PARAMS]-----------------------------------------------\n",
|
314 |
+
"#@markdown ### **Install Configurations [?](https://rentry.org/ncpt_what)**\n",
|
315 |
+
"#@markdown These options only runs on First Install\n",
|
316 |
+
"latest_webui = False #@param{type:\"boolean\"}\n",
|
317 |
+
"latest_extensions = True #@param{type:\"boolean\"}\n",
|
318 |
+
"branch = \"master\" #@param [\"master\",\"release_candidate\",\"dev\"]\n",
|
319 |
+
"sdxl_patch = False\n",
|
320 |
+
"\n",
|
321 |
+
"#@markdown ### <br> **Configurations**\n",
|
322 |
+
"output_to_drive = False #@param{type:\"boolean\"}\n",
|
323 |
+
"configs_in_drive = False #@param{type:\"boolean\"}\n",
|
324 |
+
"fast_start = False #@param{type:\"boolean\"}\n",
|
325 |
+
"auto_vae = False #@param{type:\"boolean\"}\n",
|
326 |
+
"no_custom_theme = False #@param {type:\"boolean\"}\n",
|
327 |
+
"merge_in_vram = False #@param {type:\"boolean\"}\n",
|
328 |
+
"load_in_vram = False #@param {type:\"boolean\"}\n",
|
329 |
+
"ram_patch_for_sd2 = False #@param{type:\"boolean\"}\n",
|
330 |
+
"dpmpp_v2 = False #@param{type:\"boolean\"}\n",
|
331 |
+
"krita_paint_ext = False #@param {type:\"boolean\"}\n",
|
332 |
+
"verbose_download = False #@param {type:\"boolean\"}\n",
|
333 |
+
"commandline_arguments = \"--enable-insecure-extension-access --share --disable-safe-unpickle --theme dark --no-hashing --xformers\" #@param{type:\"string\"}\n",
|
334 |
+
"commit_hash = \"\" #@param{type:\"string\"}\n",
|
335 |
+
"ngrok_token = \"\" #@param{type:\"string\"}\n",
|
336 |
+
"ngrok_region = \"jp\" #@param [\"us\", \"eu\", \"au\", \"ap\", \"sa\", \"jp\", \"in\"]\n",
|
337 |
+
"ngrok_auto_save_load = False #@param{type:\"boolean\"}\n",
|
338 |
+
"alternative_tunnels = False #@param{type:\"boolean\"}\n",
|
339 |
+
"with_bore = False #@param{type:\"boolean\"}\n",
|
340 |
+
"\n",
|
341 |
+
"#@markdown ### <br> **Models, VAEs, Embeddings, Hypernetworks, Yaml, LoRA**\n",
|
342 |
+
"#@markdown *Check only what you need, colab storage is not unlimited.*\n",
|
343 |
+
"optional_huggingface_token=\"\" #@param{type:\"string\"}\n",
|
344 |
+
"model_url = \"\" # waifu_diffusion_beta2\n",
|
345 |
+
"# waifu_diffusion_AES = False #@param{type:\"boolean\"}\n",
|
346 |
+
"# waifu_diffusion = False #@param{type:\"boolean\"}\n",
|
347 |
+
"waifu_diffusion = \"none\" #@param [\"radiance\", \"ink\", \"mofu\", \"illusion\", \"none\"]\n",
|
348 |
+
"# anything_v3 = False #@param{type:\"boolean\"}\n",
|
349 |
+
"anything_v4_5 = False #@param{type:\"boolean\"}\n",
|
350 |
+
"anylora = False #@param{type:\"boolean\"}\n",
|
351 |
+
"amedira = False #@param{type:\"boolean\"}\n",
|
352 |
+
"awooooooo = True #@param{type:\"boolean\"}\n",
|
353 |
+
"gishiki_v1_1 = False #@param{type:\"boolean\"}\n",
|
354 |
+
"something_v2_2 = False #@param{type:\"boolean\"}\n",
|
355 |
+
"anything_vae = False #@param{type:\"boolean\"}\n",
|
356 |
+
"blessed2_vae = False #@param{type:\"boolean\"}\n",
|
357 |
+
"wd_vae = True #@param{type:\"boolean\"}\n",
|
358 |
+
"sd_vae = True #@param{type:\"boolean\"}\n",
|
359 |
+
"controlnet = \"v1.1\" #@param [\"v1.1\", \"v1.0\", \"v1.0-diff\", \"t2i\", \"none\"]\n",
|
360 |
+
"null_model = False #@param{type:\"boolean\"}\n",
|
361 |
+
"custom_urls = \"\" #@param {type:\"string\"}\n",
|
362 |
+
"#@markdown <font color=gray><i> Put any models, embeddings, configs, hypernetworks, loras links and separate it with comma.<br>\n",
|
363 |
+
"#@markdown <img src=\"https://cdn.discordapp.com/emojis/930580027135901777.webp?size=56\" width=\"18\"/> [How to use this custom url box?](https://rentry.org/custom_url_nocrypt) - [**Awesome Models List**](https://rentry.org/ncpt_fav_models) ✨\n",
|
364 |
+
"\n",
|
365 |
+
"# CONFIG DIR (not recommended to change unless you know what you're doing) modules/sd_models.py\n",
|
366 |
+
"destination_dir = \"/content/.downloaded/\"\n",
|
367 |
+
"config_dir=\"/content/sdw/config.json\"\n",
|
368 |
+
"models_dir = \"/content/sdw/models/Stable-diffusion/\"\n",
|
369 |
+
"vaes_dir = \"/content/sdw/models/VAE/\"\n",
|
370 |
+
"hypernetworks_dir = \"/content/sdw/models/hypernetworks/\"\n",
|
371 |
+
"embeddings_dir = \"/content/sdw/embeddings/\"\n",
|
372 |
+
"loras_dir = \"/content/sdw/models/Lora/\"\n",
|
373 |
+
"# lycoris_dir = \"/content/sdw/models/LyCORIS/\"\n",
|
374 |
+
"patches_dir = \"/content/patches/\"\n",
|
375 |
+
"extensions_dir = \"/content/sdw/extensions/\"\n",
|
376 |
+
"control_dir = \"/content/sdw/models/ControlNet/\"\n",
|
377 |
+
"drive_config_dir = \"/content/gdrive/MyDrive/WebUI/configs/\"\n",
|
378 |
+
"sam_dir = \"/content/sdw/models/sam/\"\n",
|
379 |
+
"\n",
|
380 |
+
"# -----------------------------------------------\n",
|
381 |
+
"\n",
|
382 |
+
"# Append models to model_url\n",
|
383 |
+
"model_url+=custom_urls+\", \" if custom_urls else \"\"\n",
|
384 |
+
"# if anything_v3:\n",
|
385 |
+
"# model_url+=\"https://huggingface.co/NoCrypt/safetensor_models/resolve/main/Anything-V3.0-pruned-fp32.safetensors, \"\n",
|
386 |
+
"\n",
|
387 |
+
"if anylora:\n",
|
388 |
+
" model_url+=\"https://huggingface.co/jijitobas/AllMix/resolve/main/wondermix_v10.safetensors, \"\n",
|
389 |
+
"if amedira:\n",
|
390 |
+
" model_url+=\"https://huggingface.co/AshtakaOOf/Amedira/resolve/main/Amedira-bV.safetensors, \"\n",
|
391 |
+
"if anything_v4_5:\n",
|
392 |
+
" model_url+=\"https://huggingface.co/ckpt/anything-v4.0/resolve/main/anything-v4.5-pruned.safetensors, \"\n",
|
393 |
+
"if gishiki_v1_1:\n",
|
394 |
+
" model_url+=\"https://huggingface.co/jijitobas/jiji/resolve/main/ghostmix_v20Bakedvae.safetensors, \"\n",
|
395 |
+
"if something_v2_2:\n",
|
396 |
+
" model_url+=\"https://huggingface.co/NoCrypt/SomethingV2_2/resolve/main/SomethingV2_2.safetensors, \"\n",
|
397 |
+
"if waifu_diffusion == \"radiance\":\n",
|
398 |
+
" model_url+=\"https://huggingface.co/waifu-diffusion/wd-1-5-beta3/resolve/main/wd-radiance-fp16.safetensors, \"\n",
|
399 |
+
"if waifu_diffusion == \"ink\":\n",
|
400 |
+
" model_url+=\"https://huggingface.co/waifu-diffusion/wd-1-5-beta3/resolve/main/wd-ink-fp16.safetensors, \"\n",
|
401 |
+
"if waifu_diffusion == \"mofu\": #mofu!\n",
|
402 |
+
" model_url+=\"https://huggingface.co/waifu-diffusion/wd-1-5-beta3/resolve/main/wd-mofu-fp16.safetensors, \"\n",
|
403 |
+
"if waifu_diffusion == \"illusion\":\n",
|
404 |
+
" model_url+=\"https://huggingface.co/waifu-diffusion/wd-1-5-beta3/resolve/main/wd-illusion-fp16.safetensors, \"\n",
|
405 |
+
"if awooooooo:\n",
|
406 |
+
" model_url+=\"https://huggingface.co/jijitobas/AllMix/resolve/main/astranime_v5B.safetensors, \"\n",
|
407 |
+
"\n",
|
408 |
+
"if anything_vae or anything_v4_5 or anylora:\n",
|
409 |
+
" model_url+=\" https://huggingface.co/NoCrypt/resources/resolve/main/VAE/any.vae.safetensors, \"\n",
|
410 |
+
"if blessed2_vae:\n",
|
411 |
+
" model_url+=\"https://huggingface.co/NoCrypt/resources/resolve/main/VAE/blessed2.vae.safetensors, \"\n",
|
412 |
+
"if wd_vae or waifu_diffusion!=\"none\":\n",
|
413 |
+
" model_url+=\"https://huggingface.co/NoCrypt/resources/resolve/main/VAE/wd.vae.safetensors, \"\n",
|
414 |
+
"if sd_vae:\n",
|
415 |
+
" model_url+=\"https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors, \"\n",
|
416 |
+
"if controlnet == \"v1.0\":\n",
|
417 |
+
" model_url+=\"https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_canny-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_depth-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_hed-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_mlsd-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_normal-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_openpose-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_scribble-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_seg-fp16.safetensors, \"\n",
|
418 |
+
"if controlnet == \"v1.0-diff\":\n",
|
419 |
+
" model_url+=\"https://huggingface.co/kohya-ss/ControlNet-diff-modules/resolve/main/diff_control_sd15_canny_fp16.safetensors, https://huggingface.co/kohya-ss/ControlNet-diff-modules/resolve/main/diff_control_sd15_depth_fp16.safetensors, https://huggingface.co/kohya-ss/ControlNet-diff-modules/resolve/main/diff_control_sd15_hed_fp16.safetensors, https://huggingface.co/kohya-ss/ControlNet-diff-modules/resolve/main/diff_control_sd15_mlsd_fp16.safetensors, https://huggingface.co/kohya-ss/ControlNet-diff-modules/resolve/main/diff_control_sd15_normal_fp16.safetensors, https://huggingface.co/kohya-ss/ControlNet-diff-modules/resolve/main/diff_control_sd15_openpose_fp16.safetensors, https://huggingface.co/kohya-ss/ControlNet-diff-modules/resolve/main/diff_control_sd15_scribble_fp16.safetensors, https://huggingface.co/kohya-ss/ControlNet-diff-modules/resolve/main/diff_control_sd15_seg_fp16.safetensors, \"\n",
|
420 |
+
"if controlnet == \"t2i\":\n",
|
421 |
+
" model_url+=\"https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_canny-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_color-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_depth-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_keypose-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_openpose-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_seg-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_sketch-fp16.safetensors, https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/t2iadapter_style-fp16.safetensors,\"\n",
|
422 |
+
"if controlnet == \"v1.1\":\n",
|
423 |
+
" model_url+=\"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_shuffle_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_depth_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_depth_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_lineart_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_lineart_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_mlsd_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_normalbae_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_scribble_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_scribble_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_seg_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_seg_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.yaml, https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11u_sd15_tile_fp16.safetensors, control:https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11u_sd15_tile_fp16.yaml, \"\n",
|
424 |
+
"\n",
|
425 |
+
"# Image outputs to drive (part 1)\n",
|
426 |
+
"if output_to_drive or configs_in_drive:\n",
|
427 |
+
" if not os.path.exists('/content/gdrive'):\n",
|
428 |
+
" drive.mount('/content/gdrive')\n",
|
429 |
+
"\n",
|
430 |
+
"# Unpack Repo, Dependencies, Caches\n",
|
431 |
+
"if not os.path.exists(\"/content/sdw\"):\n",
|
432 |
+
" start_install = int(time.time())\n",
|
433 |
+
"\n",
|
434 |
+
" # [!] Copy Warning ⚠️ --------------------------------------\n",
|
435 |
+
" # By removing these, you understand that updates will most likely breaks some stuff.\n",
|
436 |
+
" # I suggest you to use \"permanent\" link for repo, deps, and cache. This will prevent this colab from breaking when I update it.\n",
|
437 |
+
" # How to get permanent link? Go to a commit in my repo (https://huggingface.co/NoCrypt/fast-repo/commits/main) then click browse file.\n",
|
438 |
+
" # Then copy repo file link from that commit, it should be something like this: https://huggingface.co/NoCrypt/fast-repo/resolve/faa7a6c0a7d4d456415326285446225d12d0d426/repo.tar.lz4\n",
|
439 |
+
" # Replace the repo link below (in aria2c) to permanent link\n",
|
440 |
+
" # -----------------------------------------------------------\n",
|
441 |
+
" with capture.capture_output() as cap:\n",
|
442 |
+
" !pip install -q ipynbname\n",
|
443 |
+
" from ipynbname import name as nnb\n",
|
444 |
+
" if not nnb().split('=')[1].startswith(\"1wEa-tS10h4LlDykd87TF5zzpXIIQoCmq\"):\n",
|
445 |
+
" display(HTML(\"\"\"\n",
|
446 |
+
" <p style=\"color:red;font-size:25px\"><u> 💀 Colab copy detected 💀</u></p>\n",
|
447 |
+
" <p style=\"font-size:20px\">Please keep your copy up-to-date, do not report any bugs to NoCrypt<br/><br/></p>\n",
|
448 |
+
" <img src=\"https://i.ibb.co/2kV0btp/download-74.png\"/><br/><br/>\n",
|
449 |
+
" <p style=\"font-size:20px\">Please keep your copy up-to-date, do not report any bugs to NoCrypt</p>\n",
|
450 |
+
" <p style=\"font-size:20px\">P.s. Feel free to remove this warning! I've included a note on how to prevent colab from breaking in the code </p>\n",
|
451 |
+
" \"\"\"))\n",
|
452 |
+
" time.sleep(10)\n",
|
453 |
+
" # ------------------------------------ Feel free to remove! Don't forget to read notes above ✌️\n",
|
454 |
+
"\n",
|
455 |
+
"\n",
|
456 |
+
" print(\"🚀 Unpacking... Please do not stop this process at all cost...\", end='')\n",
|
457 |
+
" with capture.capture_output() as cap:\n",
|
458 |
+
" # !rm -rf /usr/local/lib/python3.10/dist-packages/scipy /usr/local/lib/python3.10/dist-packages/scipy-*.dist-info/ /usr/local/lib/python3.10/dist-packages/scipy.libs\n",
|
459 |
+
" # !apt install -qq libunwind8-dev\n",
|
460 |
+
" !wget https://huggingface.co/NoCrypt/fast-repo/resolve/main/ubuntu_deps.zip ; unzip ubuntu_deps.zip -d ./deps ; dpkg -i ./deps/* ; rm -rf ubuntu_deps.zip /content/deps/\n",
|
461 |
+
" # !apt install liblz4-tool aria2\n",
|
462 |
+
" # !pip uninstall -q -y huggingface_hub\n",
|
463 |
+
" # !{'curl -LO https://github.com/BurntSushi/ripgrep/releases/download/13.0.0/ripgrep_13.0.0_amd64.deb && dpkg -i ripgrep_13.0.0_amd64.deb && rm -rf ripgrep_13.0.0_amd64.deb'}\n",
|
464 |
+
"\n",
|
465 |
+
" # !aria2c --summary-interval=10 -c -x 16 -k 1M -s 16 -d /content -Z \\\n",
|
466 |
+
" # https://huggingface.co/NoCrypt/fast-repo/resolve/main/dep.tar.lz4 \\\n",
|
467 |
+
" # https://huggingface.co/NoCrypt/fast-repo/resolve/main/repo.tar.lz4 \\\n",
|
468 |
+
" # https://huggingface.co/NoCrypt/fast-repo/resolve/main/cache.tar.lz4\n",
|
469 |
+
"\n",
|
470 |
+
" # !aria2c -d /content -o dep.tar.lz4 --summary-interval=10 -c -x 16 -k 1M -s 16 https://huggingface.co/NoCrypt/fast-repo/resolve/main/dep.tar.lz4\n",
|
471 |
+
" # !aria2c -d /content -o repo.tar.lz4 --summary-interval=10 -c -x 16 -k 1M -s 16 https://huggingface.co/NoCrypt/fast-repo/resolve/main/repo.tar.lz4\n",
|
472 |
+
" # !aria2c -d /content -o cache.tar.lz4 --summary-interval=10 -c -x 16 -k 1M -s 16 https://huggingface.co/NoCrypt/fast-repo/resolve/main/cache.tar.lz4\n",
|
473 |
+
"\n",
|
474 |
+
" !echo -e \"https://huggingface.co/NoCrypt/fast-repo/resolve/main/dep.tar.lz4\\n\\tout=dep.tar.lz4\\nhttps://huggingface.co/NoCrypt/fast-repo/resolve/main/repo.tar.lz4\\n\\tout=repo.tar.lz4\\nhttps://huggingface.co/NoCrypt/fast-repo/resolve/main/cache.tar.lz4\\n\\tout=cache.tar.lz4\\n\" \\\n",
|
475 |
+
" | aria2c -i- -j5 -x16 -s16 -k1M -c\n",
|
476 |
+
"\n",
|
477 |
+
" !tar -xI lz4 -f dep.tar.lz4 --overwrite-dir --directory=/usr/local/lib/python3.10/dist-packages/ #(manual dir)\n",
|
478 |
+
" !tar -xI lz4 -f repo.tar.lz4 --directory=/ #/content/sdw/ (auto dir)\n",
|
479 |
+
" !tar -xI lz4 -f cache.tar.lz4 --directory=/ #/root/.cache/huggingface (auto dir)\n",
|
480 |
+
"\n",
|
481 |
+
" !rm -rf /content/dep.tar.lz4 /content/repo.tar.lz4 /content/cache.tar.lz4\n",
|
482 |
+
" os.environ[\"SAFETENSORS_FAST_GPU\"]='1'\n",
|
483 |
+
" os.environ[\"CUDA_MODULE_LOADING\"]=\"LAZY\"\n",
|
484 |
+
" os.environ[\"colab_url\"] = eval_js(\"google.colab.kernel.proxyPort(7860, {'cache': false})\")\n",
|
485 |
+
" os.environ[\"TF_CPP_MIN_LOG_LEVEL\"] = \"3\"\n",
|
486 |
+
" os.environ[\"PYTHONWARNINGS\"] = \"ignore\"\n",
|
487 |
+
" # %env PYTHONDONTWRITEBYTECODE=1\n",
|
488 |
+
" os.environ[\"TCMALLOC_AGGRESSIVE_DECOMMIT\"] = \"t\"\n",
|
489 |
+
"\n",
|
490 |
+
" !rm /content/sdw/extensions/tunnels/id_rsa.pub\n",
|
491 |
+
" !rm /content/sdw/extensions/tunnels/id_rsa\n",
|
492 |
+
"\n",
|
493 |
+
" # os.environ['PYTORCH_CUDA_ALLOC_CONF'] = \"garbage_collection_threshold:0.9,max_split_size_mb:512\"\n",
|
494 |
+
" # !apt -y update -qq\n",
|
495 |
+
"\n",
|
496 |
+
" !wget https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 -O /content/libtcmalloc_minimal.so.4 -c\n",
|
497 |
+
" %env LD_PRELOAD=/content/libtcmalloc_minimal.so.4\n",
|
498 |
+
"\n",
|
499 |
+
" !pip install https://download.pytorch.org/whl/cu121/xformers-0.0.22.post4-cp310-cp310-manylinux2014_x86_64.whl#sha256=7075114dbf698b609b599f0d35032c0b2f9a389751e8bbf4dd3c628376b0dd9c\n",
|
500 |
+
"\n",
|
501 |
+
" del cap\n",
|
502 |
+
" if not os.path.exists(hypernetworks_dir):\n",
|
503 |
+
" os.makedirs(hypernetworks_dir)\n",
|
504 |
+
" # if not 'T4' in gpu_name: # [For colab makers out there, facebook's xformers pypi already support almost all gpu now]\n",
|
505 |
+
" # !pip uninstall -y xformers\n",
|
506 |
+
" install_time = timedelta(seconds=time.time()-start_install)\n",
|
507 |
+
" print(\"\\r🚀 Finished unpacking. Took\",\"%02d:%02d:%02d ⚡\\n\" % (install_time.seconds / 3600, (install_time.seconds / 60) % 60, install_time.seconds % 60), end='', flush=True)\n",
|
508 |
+
" # Colab 🤝 Gradio (Colab timer integration for gradio)\n",
|
509 |
+
" !echo -n {start_colab} > /content/sdw/static/colabTimer.txt\n",
|
510 |
+
" print(\"🤝 Colab timer integration complete! You can see your colab time inside webui.\")\n",
|
511 |
+
"\n",
|
512 |
+
" # Update using git pull\n",
|
513 |
+
" if latest_webui:\n",
|
514 |
+
" !git config --global user.email \"[email protected]\"\n",
|
515 |
+
" !git config --global user.name \"Your Name\"\n",
|
516 |
+
" print('⌚ Pulling latest changes...', end=\"\")\n",
|
517 |
+
" with capture.capture_output() as cap:\n",
|
518 |
+
" %cd /content/sdw\n",
|
519 |
+
" !git restore .\n",
|
520 |
+
" !git pull -X theirs --rebase --autostash\n",
|
521 |
+
" del cap\n",
|
522 |
+
" print('\\r🪄 \\033[96mYou are currently using latest version of webui. Please use commit_hash if there is error', flush=True)\n",
|
523 |
+
"\n",
|
524 |
+
" if branch != \"master\":\n",
|
525 |
+
" print(f'⌚ Changing branch to {branch}', end=\"\")\n",
|
526 |
+
" with capture.capture_output() as cap:\n",
|
527 |
+
" !git restore .\n",
|
528 |
+
" !git checkout {branch}\n",
|
529 |
+
" !git pull\n",
|
530 |
+
" print(f'\\r🪄 \\033[96mYou are currently using {branch} branch of webui', flush=True)\n",
|
531 |
+
"\n",
|
532 |
+
" # 3.32.xx sucks! Pngwn made some changes on 3.33.1 and it's 300% better\n",
|
533 |
+
" !sed -i 's@gradio==3.32.*@gradio==3.33.1@' /content/sdw/requirements_versions.txt\n",
|
534 |
+
"\n",
|
535 |
+
" # Update extensions\n",
|
536 |
+
" if latest_extensions:\n",
|
537 |
+
" print('⌚ Updating extensions (might take a while)...', end=\"\")\n",
|
538 |
+
" with capture.capture_output() as cap:\n",
|
539 |
+
" !{'for dir in /content/sdw/extensions/*/; do cd \"$dir\" && git fetch origin && git pull; done'}\n",
|
540 |
+
" del cap\n",
|
541 |
+
" print('\\r🪄 \\033[96mInbuilt extensions are updated to its latest versions', flush=True)\n",
|
542 |
+
"\n",
|
543 |
+
" !cd /content/sdw/repositories/stable-diffusion-stability-ai && git restore .\n",
|
544 |
+
" if sdxl_patch:\n",
|
545 |
+
" !sed -i -e '''/from modules import launch_utils/a\\import os''' /content/sdw/launch.py\n",
|
546 |
+
" !sed -i -e '''/ prepare_environment()/a\\ os.system\\(f\\\"\"\"sed -i -e ''\\\"s/dict()))/dict())).cuda()/g\\\"'' /content/sdw/repositories/stable-diffusion-stability-ai/ldm/util.py\"\"\")''' /content/sdw/launch.py\n",
|
547 |
+
"\n",
|
548 |
+
"else:\n",
|
549 |
+
" print(\"🚀 Already unpacked... Skipping.\")\n",
|
550 |
+
" time_since_start = timedelta(seconds=time.time()-start_colab)\n",
|
551 |
+
" print(\"⌚ You've been running this colab for\",\"%02d:%02d:%02d\" % (time_since_start.seconds / 3600, (time_since_start.seconds / 60) % 60, time_since_start.seconds % 60))\n",
|
552 |
+
"\n",
|
553 |
+
"os.makedirs(patches_dir, exist_ok=True)\n",
|
554 |
+
"# Revert changes using time-machine (git reset)\n",
|
555 |
+
"if commit_hash:\n",
|
556 |
+
" print('⌚ Activating time machine...', end=\"\")\n",
|
557 |
+
" with capture.capture_output() as cap:\n",
|
558 |
+
" %cd /content/sdw\n",
|
559 |
+
" !git config --global user.email \"[email protected]\"\n",
|
560 |
+
" !git config --global user.name \"Your Name\"\n",
|
561 |
+
" # !git stash\n",
|
562 |
+
" !git reset --hard {commit_hash}\n",
|
563 |
+
" # !git stash apply\n",
|
564 |
+
" # !rm -rf /content/sdw/embeddings/*\n",
|
565 |
+
" del cap\n",
|
566 |
+
" print('\\r⌚ Time machine activated, you\\'re on commit', commit_hash, flush=True)\n",
|
567 |
+
" # print('✌️ Embeddings have been deleted for time machine support')\n",
|
568 |
+
"\n",
|
569 |
+
"# Colab patches for quality of life improvements\n",
|
570 |
+
"with capture.capture_output() as cap:\n",
|
571 |
+
" !wget https://gist.github.com/NoCrypt/6e7331eda3d670c2156852ae5e300a42/raw/e52dac97fcabcb054b5737e0c5188cbc600c6582/DPMPP_2M_V2.patch -P {patches_dir} -c\n",
|
572 |
+
" !wget https://gist.github.com/NoCrypt/6e7331eda3d670c2156852ae5e300a42/raw/e52dac97fcabcb054b5737e0c5188cbc600c6582/idgaf_about_git_ext.patch -P {patches_dir} -c\n",
|
573 |
+
" !wget https://gist.github.com/NoCrypt/6e7331eda3d670c2156852ae5e300a42/raw/e52dac97fcabcb054b5737e0c5188cbc600c6582/sd-lowram.patch -P {patches_dir} -c\n",
|
574 |
+
" if ram_patch_for_sd2:\n",
|
575 |
+
" pass # no needed\n",
|
576 |
+
" # !cd /content/sdw/ && git apply --ignore-whitespace {patches_dir}/sd-lowram.patch\n",
|
577 |
+
" # else:\n",
|
578 |
+
" # !cd /content/sdw/ && git apply --ignore-whitespace -R {patches_dir}/sd-lowram.patch\n",
|
579 |
+
"\n",
|
580 |
+
"\n",
|
581 |
+
" if dpmpp_v2:\n",
|
582 |
+
" !cd /content/sdw/ && git apply --ignore-whitespace {patches_dir}/DPMPP_2M_V2.patch\n",
|
583 |
+
" else:\n",
|
584 |
+
" !cd /content/sdw/ && git apply --ignore-whitespace -R {patches_dir}/DPMPP_2M_V2.patch\n",
|
585 |
+
"\n",
|
586 |
+
" # IGAF, get lost git ext checker thingy\n",
|
587 |
+
" # !cd /content/sdw/ && git apply --ignore-whitespace {patches_dir}/idgaf_about_git_ext.patch\n",
|
588 |
+
"\n",
|
589 |
+
" # Colab Optimizations modified to load_in_vram\n",
|
590 |
+
" if load_in_vram:\n",
|
591 |
+
" commandline_arguments += ' --lowram '\n",
|
592 |
+
"\n",
|
593 |
+
" # Merge in vram: self-explainotory\n",
|
594 |
+
" if merge_in_vram:\n",
|
595 |
+
" !sed -i \"s@'cpu'@'cuda'@\" /content/sdw/modules/extras.py\n",
|
596 |
+
" else:\n",
|
597 |
+
" !sed -i \"s@'cuda'@'cpu'@\" /content/sdw/modules/extras.py\n",
|
598 |
+
"\n",
|
599 |
+
" # Remove custom theme (since it's not for everyone)\n",
|
600 |
+
" if no_custom_theme:\n",
|
601 |
+
" !sed -i 's@\"gradio_theme\":.*@\"gradio_theme\": \"Default\",@' {config_dir}\n",
|
602 |
+
" else:\n",
|
603 |
+
" !sed -i 's@\"gradio_theme\":.*@\"gradio_theme\": \"NoCrypt/miku\",@' {config_dir}\n",
|
604 |
+
"\n",
|
605 |
+
"# Ngrok stuff goes here\n",
|
606 |
+
"if ngrok_token or ngrok_auto_save_load:\n",
|
607 |
+
" if ngrok_auto_save_load:\n",
|
608 |
+
" if not os.path.exists('/content/gdrive'):\n",
|
609 |
+
" drive.mount('/content/gdrive')\n",
|
610 |
+
" if ngrok_token:\n",
|
611 |
+
" if not os.path.exists(\"/content/gdrive/MyDrive/WebUI/ngrokToken.txt\"):\n",
|
612 |
+
" !mkdir -p /content/gdrive/MyDrive/WebUI/\n",
|
613 |
+
" !touch /content/gdrive/MyDrive/WebUI/ngrokToken.txt\n",
|
614 |
+
" f = open(\"/content/gdrive/MyDrive/WebUI/ngrokToken.txt\", \"w+\")\n",
|
615 |
+
" f.write(ngrok_token+\",\"+ngrok_region)\n",
|
616 |
+
" f.close()\n",
|
617 |
+
" elif os.path.exists('/content/gdrive/MyDrive/WebUI/ngrokToken.txt'):\n",
|
618 |
+
" ngrok_token,ngrok_region = getoutput(\"cat /content/gdrive/MyDrive/WebUI/ngrokToken.txt\").split(\",\",2)\n",
|
619 |
+
" else:\n",
|
620 |
+
" print(\"warning: ngrok token not detected\")\n",
|
621 |
+
" commandline_arguments += ' --ngrok ' + ngrok_token + ' --ngrok-region ' + ngrok_region\n",
|
622 |
+
" commandline_arguments = commandline_arguments.replace(\"--share\",\"\")\n",
|
623 |
+
"\n",
|
624 |
+
"# Configs in drive\n",
|
625 |
+
"if configs_in_drive:\n",
|
626 |
+
" config_dir = drive_config_dir+\"config.json\"\n",
|
627 |
+
" if not os.path.exists(drive_config_dir):\n",
|
628 |
+
" !mkdir -p {drive_config_dir}\n",
|
629 |
+
" !cp /content/sdw/styles.csv /content/sdw/ui-config.json /content/sdw/config.json {drive_config_dir}\n",
|
630 |
+
" commandline_arguments += ' --ui-config-file ' + drive_config_dir+\"ui-config.json\"\n",
|
631 |
+
" commandline_arguments += ' --ui-settings-file ' + drive_config_dir+\"config.json\"\n",
|
632 |
+
" commandline_arguments += ' --styles-file ' + drive_config_dir+\"styles.csv\"\n",
|
633 |
+
"\n",
|
634 |
+
"# Image outputs to drive (part 2)\n",
|
635 |
+
"if output_to_drive:\n",
|
636 |
+
" !sed -i 's@\"outdir_txt2img_samples\": \"outputs/txt2img-images\"@\"outdir_txt2img_samples\": \"/content/gdrive/MyDrive/WebUI/outputs/txt2img-images\"@' {config_dir}\n",
|
637 |
+
" !sed -i 's@\"outdir_img2img_samples\": \"outputs/img2img-images\"@\"outdir_img2img_samples\": \"/content/gdrive/MyDrive/WebUI/outputs/img2img-images\"@' {config_dir}\n",
|
638 |
+
" !sed -i 's@\"outdir_extras_samples\": \"outputs/extras-images\"@\"outdir_extras_samples\": \"/content/gdrive/MyDrive/WebUI/outputs/extras-images\"@' {config_dir}\n",
|
639 |
+
" !sed -i 's@\"outdir_txt2img_grids\": \"outputs/txt2img-grids\"@\"outdir_txt2img_grids\": \"/content/gdrive/MyDrive/WebUI/outputs/txt2img-grids\"@' {config_dir}\n",
|
640 |
+
" !sed -i 's@\"outdir_img2img_grids\": \"outputs/img2img-grids\"@\"outdir_img2img_grids\": \"/content/gdrive/MyDrive/WebUI/outputs/img2img-grids\"@' {config_dir}\n",
|
641 |
+
" !sed -i 's@\"outdir_save\": \"log/images\"@\"outdir_save\": \"/content/gdrive/MyDrive/WebUI/outputs/log/images\"@' {config_dir}\n",
|
642 |
+
"else:\n",
|
643 |
+
" if '/gdrive/' in getoutput('cat '+config_dir):\n",
|
644 |
+
" !sed -i 's@\"outdir_txt2img_samples\": \"outputs/txt2img-images\"@\"outdir_txt2img_samples\": \"outputs/txt2img-images\"@' {config_dir}\n",
|
645 |
+
" !sed -i 's@\"outdir_img2img_samples\": \"outputs/img2img-images\"@\"outdir_img2img_samples\": \"outputs/img2img-images\"@' {config_dir}\n",
|
646 |
+
" !sed -i 's@\"outdir_extras_samples\": \"outputs/extras-images\"@\"outdir_extras_samples\": \"outputs/extras-images\"@' {config_dir}\n",
|
647 |
+
" !sed -i 's@\"outdir_txt2img_grids\": \"outputs/txt2img-grids\"@\"outdir_txt2img_grids\": \"outputs/txt2img-grids\"@' {config_dir}\n",
|
648 |
+
" !sed -i 's@\"outdir_img2img_grids\": \"outputs/img2img-grids\"@\"outdir_img2img_grids\": \"outputs/img2img-grids\"@' {config_dir}\n",
|
649 |
+
" !sed -i 's@\"outdir_save\": \"log/images\"@\"outdir_save\": \"log/images\"@' {config_dir}\n",
|
650 |
+
"\n",
|
651 |
+
"\n",
|
652 |
+
"# Install models from model_url, oh boi it's getting bigger\n",
|
653 |
+
"extension_repo = []\n",
|
654 |
+
"prefixes = [\n",
|
655 |
+
" \"config:\",\n",
|
656 |
+
" \"ui-config:\",\n",
|
657 |
+
" \"styles:\",\n",
|
658 |
+
" \"lora:\",\n",
|
659 |
+
" \"hypernetwork:\",\n",
|
660 |
+
" \"locon:\",\n",
|
661 |
+
" \"lycoris:\",\n",
|
662 |
+
" \"model:\",\n",
|
663 |
+
" \"vae:\",\n",
|
664 |
+
" \"control:\",\n",
|
665 |
+
" \"clone:\",\n",
|
666 |
+
" \"gfpgan:\",\n",
|
667 |
+
" \"ersgan:\",\n",
|
668 |
+
" \"swinr:\",\n",
|
669 |
+
" \"ldsr:\",\n",
|
670 |
+
" \"repo:\",\n",
|
671 |
+
" \"embeddings:\",\n",
|
672 |
+
" \"sam:\"\n",
|
673 |
+
"]\n",
|
674 |
+
"token = optional_huggingface_token if optional_huggingface_token else \"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\"\n",
|
675 |
+
"user_header = f\"\\\"Authorization: Bearer {token}\\\"\"\n",
|
676 |
+
"print('📦 Downloading models and stuff...', end='')\n",
|
677 |
+
"def handle_manual(url):\n",
|
678 |
+
" if url.startswith(\"config:\"):\n",
|
679 |
+
" manual_download(url, \"/content/sdw/config.json\")\n",
|
680 |
+
" elif url.startswith(\"ui-config:\"):\n",
|
681 |
+
" manual_download(url, \"/content/sdw/ui-config.json\")\n",
|
682 |
+
" elif url.startswith(\"styles:\"):\n",
|
683 |
+
" manual_download(url, \"/content/sdw/styles.csv\")\n",
|
684 |
+
" elif url.startswith(\"sam:\"):\n",
|
685 |
+
" manual_download(url, sam_dir)\n",
|
686 |
+
" elif url.startswith(\"lora:\") or url.startswith(\"locon:\") or url.startswith(\"lycoris:\"):\n",
|
687 |
+
" manual_download(url, loras_dir)\n",
|
688 |
+
" elif url.startswith(\"hypernetwork:\"):\n",
|
689 |
+
" manual_download(url, hypernetworks_dir)\n",
|
690 |
+
" elif url.startswith(\"model:\"):\n",
|
691 |
+
" manual_download(url, models_dir)\n",
|
692 |
+
" elif url.startswith(\"vae:\"):\n",
|
693 |
+
" manual_download(url, vaes_dir)\n",
|
694 |
+
" elif url.startswith(\"control:\"):\n",
|
695 |
+
" manual_download(url, control_dir)\n",
|
696 |
+
" elif url.startswith(\"gfpgan:\"):\n",
|
697 |
+
" manual_download(url, \"/content/sdw/models/GFPGAN\")\n",
|
698 |
+
" elif url.startswith(\"esrgan:\"):\n",
|
699 |
+
" manual_download(url, \"/content/sdw/models/ESRGAN\")\n",
|
700 |
+
" elif url.startswith(\"swinr:\"):\n",
|
701 |
+
" manual_download(url, \"/content/sdw/models/SwinR\")\n",
|
702 |
+
" elif url.startswith(\"ldsr:\"):\n",
|
703 |
+
" manual_download(url, \"/content/sdw/models/LDSR\")\n",
|
704 |
+
" elif url.startswith(\"embeddings:\"):\n",
|
705 |
+
" manual_download(url, embeddings_dir)\n",
|
706 |
+
" elif url.startswith(\"extension:\"):\n",
|
707 |
+
" extension_repo.append(url)\n",
|
708 |
+
" elif url.startswith(\"clone:\") or url.startswith(\"repo:\"):\n",
|
709 |
+
" !cd /content/.downloaded && git clone $url\n",
|
710 |
+
"\n",
|
711 |
+
"def manual_download(url, dst):\n",
|
712 |
+
" url = url[url.find(':')+1:]\n",
|
713 |
+
" if \".json\" in url or \".csv\" in url:\n",
|
714 |
+
" !wget \"{url}\" -O {dst} -c\n",
|
715 |
+
" elif '.yaml' in url or '.yml' in url or 'discord' in url:\n",
|
716 |
+
" !wget \"{url}\" -P {dst} -c\n",
|
717 |
+
" elif 'drive.google' in url:\n",
|
718 |
+
" if 'folders' in url:\n",
|
719 |
+
" !gdown --folder \"{url}\" -O {dst} --fuzzy -c\n",
|
720 |
+
" else:\n",
|
721 |
+
" !gdown \"{url}\" -O {dst} --fuzzy -c\n",
|
722 |
+
" elif 'huggingface' in url:\n",
|
723 |
+
" if '/blob/' in url:\n",
|
724 |
+
" url = url.replace('/blob/', '/resolve/')\n",
|
725 |
+
" parsed_link = '\\n{}\\n\\tout={}'.format(url,unquote(url.split('/')[-1]))\n",
|
726 |
+
" !echo -e \"{parsed_link}\" | aria2c --header={user_header} --console-log-level=error --summary-interval=10 -i- -j5 -x16 -s16 -k1M -c -d \"{dst}\"\n",
|
727 |
+
" elif 'http' in url or 'magnet' in url:\n",
|
728 |
+
" parsed_link = '\"{}\"'.format(url)\n",
|
729 |
+
" !aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -j5 -x16 -s16 -k1M -c -d {dst} -Z {parsed_link}\n",
|
730 |
+
"\n",
|
731 |
+
"def download(url):\n",
|
732 |
+
" try:\n",
|
733 |
+
" have_drive_link\n",
|
734 |
+
" except:\n",
|
735 |
+
" if \"drive.google.com\" in url:\n",
|
736 |
+
" # I'm sorry drive ID enjoyer, this will make ID useless :(\n",
|
737 |
+
" !pip install -U gdown\n",
|
738 |
+
" have_drive_link = True\n",
|
739 |
+
" links_and_paths = url.split(',')\n",
|
740 |
+
" !mkdir -p {destination_dir} {models_dir} {vaes_dir} {hypernetworks_dir} {embeddings_dir} {loras_dir} {sam_dir}\n",
|
741 |
+
" http_links = []\n",
|
742 |
+
" huggingface_links = []\n",
|
743 |
+
" for link_or_path in links_and_paths:\n",
|
744 |
+
" link_or_path = link_or_path.strip()\n",
|
745 |
+
" if not link_or_path:\n",
|
746 |
+
" continue\n",
|
747 |
+
"\n",
|
748 |
+
" if any(link_or_path.startswith(prefix.lower()) for prefix in prefixes):\n",
|
749 |
+
" handle_manual(link_or_path)\n",
|
750 |
+
" continue\n",
|
751 |
+
"\n",
|
752 |
+
" if 'github.com' in link_or_path and ( '.git' in link_or_path or not '.' in link_or_path.split('/')[-1] ):\n",
|
753 |
+
" extension_repo.append(link_or_path)\n",
|
754 |
+
" continue\n",
|
755 |
+
"\n",
|
756 |
+
" if '.yaml' in link_or_path or '.yml' in link_or_path or 'discord' in link_or_path:\n",
|
757 |
+
" !wget {link_or_path} -P {destination_dir} -c\n",
|
758 |
+
" elif 'drive.google' in link_or_path:\n",
|
759 |
+
" if 'folders' in link_or_path:\n",
|
760 |
+
" !gdown --folder {link_or_path} -O {destination_dir} --fuzzy -c\n",
|
761 |
+
" else:\n",
|
762 |
+
" !gdown {link_or_path} -O {destination_dir} --fuzzy -c\n",
|
763 |
+
" elif 'huggingface' in link_or_path:\n",
|
764 |
+
" if '/blob/' in link_or_path:\n",
|
765 |
+
" link_or_path = link_or_path.replace('/blob/', '/resolve/')\n",
|
766 |
+
" huggingface_links.append(link_or_path)\n",
|
767 |
+
" elif 'http' in link_or_path or 'magnet' in link_or_path:\n",
|
768 |
+
" http_links.append(link_or_path)\n",
|
769 |
+
" elif '/' in link_or_path:\n",
|
770 |
+
" if not os.path.exists('/content/gdrive/MyDrive'):\n",
|
771 |
+
" print('Looks like there\\'s a path in your url. You need to mount your drive first.')\n",
|
772 |
+
" from google.colab import drive\n",
|
773 |
+
" drive.mount('/content/gdrive')\n",
|
774 |
+
" !rsync -avr --progress /content/gdrive/MyDrive/{link_or_path} {destination_dir}\n",
|
775 |
+
" else:\n",
|
776 |
+
" !gdown {link_or_path} -O {destination_dir} --fuzzy -c\n",
|
777 |
+
" if http_links:\n",
|
778 |
+
" links_string = ' '.join(['\"{}\"'.format(x) for x in http_links])\n",
|
779 |
+
" !aria2c --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -j5 -x16 -s16 -k1M -c -d {destination_dir} -Z {links_string}\n",
|
780 |
+
" del links_string\n",
|
781 |
+
" if huggingface_links:\n",
|
782 |
+
" # links_string = ' '.join(['\"{}\"'.format(x) for x in huggingface_links])\n",
|
783 |
+
" # !aria2c --summary-interval=10 --header={user_header} -c -x 16 -k 1M -s 16 -d {destination_dir} -Z {links_string}\n",
|
784 |
+
" # for link in huggingface_links:\n",
|
785 |
+
" # !aria2c --summary-interval=10 --header={user_header} -c -x 16 -k 1M -s 16 -d {destination_dir} -o {link.split('/')[-1]} {link}\n",
|
786 |
+
" links_string = '\\n'.join(['{}\\n\\tout={}'.format(x,unquote(x.split('/')[-1])) for x in huggingface_links])\n",
|
787 |
+
" !echo -e \"{links_string}\" | aria2c --header={user_header} --optimize-concurrent-downloads --console-log-level=error --summary-interval=10 -i- -j5 -x16 -s16 -k1M -c -d {destination_dir}\n",
|
788 |
+
"\n",
|
789 |
+
"if verbose_download:\n",
|
790 |
+
" download(model_url)\n",
|
791 |
+
"else:\n",
|
792 |
+
" with capture.capture_output() as cap:\n",
|
793 |
+
" download(model_url)\n",
|
794 |
+
" del cap\n",
|
795 |
+
"\n",
|
796 |
+
"print('\\r🏁 Download finished.', flush=True)\n",
|
797 |
+
"\n",
|
798 |
+
"if len(extension_repo) > 0:\n",
|
799 |
+
" print('✨ Installing custom extensions...', end='')\n",
|
800 |
+
" with capture.capture_output() as cap:\n",
|
801 |
+
" for repo in extension_repo:\n",
|
802 |
+
" repo_name = repo.split('/')[-1]\n",
|
803 |
+
" !cd {extensions_dir} \\\n",
|
804 |
+
" && git clone \"{repo}\" \\\n",
|
805 |
+
" && cd {repo_name} \\\n",
|
806 |
+
" && git fetch\n",
|
807 |
+
" print('\\r🏁 Installed',len(extension_repo),'custom extensions.', flush=True)\n",
|
808 |
+
"\n",
|
809 |
+
"print('\\n')\n",
|
810 |
+
"#HOT\n",
|
811 |
+
"\n",
|
812 |
+
"!curl -Lo /content/sdw/models/Lora/CA_Anzai_Rion_OK.safetensors https://huggingface.co/jijitobas/CA_G/resolve/main/CA_Rionanzai_0607.safetensors\n",
|
813 |
+
"!curl -Lo /content/sdw/models/Lora/CA_misswarmj.safetensors https://huggingface.co/jijitobas/other/resolve/main/G_misswarmj.safetensors\n",
|
814 |
+
"!curl -Lo /content/sdw/models/Lora/S_shiny-skin.safetensors https://huggingface.co/jijitobas/Top/resolve/main/S_shiny-skin.safetensors\n",
|
815 |
+
"!curl -Lo /content/sdw/models/Lora/C_nagatiti_hugebreasts.safetensors https://huggingface.co/jijitobas/Top/resolve/main/C_nagatiti_hugebreasts.safetensors\n",
|
816 |
+
"!curl -Lo /content/sdw/models/Lora/CA_baobao_08.safetensors https://huggingface.co/jijitobas/CA_G/resolve/main/CA_baobao_08.safetensors\n",
|
817 |
+
"!curl -Lo /content/sdw/models/Lora/C_Stewardess_red-unifrom.safetensors https://huggingface.co/jijitobas/Top/resolve/main/C_Stewardess_red-unifrom.safetensors\n",
|
818 |
+
"!curl -Lo /content/sdw/models/Lora/CA_cloud_08.safetensors https://huggingface.co/jijitobas/CA_G/resolve/main/CA_cloud_08.safetensors\n",
|
819 |
+
"!curl -Lo /content/sdw/models/Lora/CA_mishyfish_08.safetensors https://huggingface.co/jijitobas/CA_G/resolve/main/CA_mishyfish_08.safetensors\n",
|
820 |
+
"\n",
|
821 |
+
"# Link all files by filtering accoridng to their type\n",
|
822 |
+
"with capture.capture_output() as cap:\n",
|
823 |
+
" # files = os.listdir(destination_dir)\n",
|
824 |
+
" files = [os.path.join(dp,f) for dp, dn, fn in os.walk(destination_dir) for f in fn] # Thanks Aojiru!\n",
|
825 |
+
" for file in files:\n",
|
826 |
+
" name, file_extension = os.path.splitext(file)\n",
|
827 |
+
" if '.aria2' in file:\n",
|
828 |
+
" continue\n",
|
829 |
+
" file_path = os.path.join(destination_dir, file)\n",
|
830 |
+
" file_size = os.path.getsize(file_path)\n",
|
831 |
+
" if \"sam_\" in name and file_extension == \".pth\":\n",
|
832 |
+
" !ln \"{file_path}\" {sam_dir}\n",
|
833 |
+
" elif \"control_\" in name or \"t2iadapter_\" in name or file_extension == \".pth\":\n",
|
834 |
+
" !ln \"{file_path}\" {control_dir}\n",
|
835 |
+
" elif file_extension in ['.yaml', '.yml'] or file_size > 1_500_000_000:\n",
|
836 |
+
" !ln \"{file_path}\" {models_dir}\n",
|
837 |
+
" elif \"kl-f8\" in name or \"vae_\" in file or \"vae.\" in file or \"vae-\" in file or file_size > 380_000_000:\n",
|
838 |
+
" !ln \"{file_path}\" {vaes_dir}\n",
|
839 |
+
" elif getoutput('if rg -q -o \"lora_unet\" \"'+file_path+'\"; then echo 1; else echo 0; fi') == \"1\":\n",
|
840 |
+
" !ln \"{file_path}\" {loras_dir}\n",
|
841 |
+
" elif (file_extension == '.pt' or file_extension == '.safetensors') and file_size < 10_000_000:\n",
|
842 |
+
" !ln \"{file_path}\" {embeddings_dir}\n",
|
843 |
+
" else:\n",
|
844 |
+
" !ln \"{file_path}\" {hypernetworks_dir}\n",
|
845 |
+
" del cap\n",
|
846 |
+
"\n",
|
847 |
+
"# Automatically loads vae for first run, if it exists.\n",
|
848 |
+
"if auto_vae:\n",
|
849 |
+
" if '.vae.pt' in os.listdir(vaes_dir) or '/vae' in model_url:\n",
|
850 |
+
" commandline_arguments+=' --vae-path $(readlink -f $(find '+vaes_dir+' \\( -name \"*.vae.pt\" -or -name \"*.ckpt\" \\) -print -quit))'\n",
|
851 |
+
"\n",
|
852 |
+
"# Configure Alternatives Tunnels (Colab native, localtunnel, cloudflared, bore with auth)\n",
|
853 |
+
"if alternative_tunnels:\n",
|
854 |
+
" commandline_arguments = commandline_arguments.replace(\"--share\",\"\")\n",
|
855 |
+
" commandline_arguments += \" --multiple\"\n",
|
856 |
+
" print(\"⌚ \\033[95m\\033[1mGenerating alternative tunnels...\", end='')\n",
|
857 |
+
" with capture.capture_output() as cap:\n",
|
858 |
+
" %cd /content\n",
|
859 |
+
" if not os.path.exists('/tools/node/bin/lt'):\n",
|
860 |
+
" !npm install -g localtunnel\n",
|
861 |
+
" if not os.path.exists('/usr/bin/cloudflared'):\n",
|
862 |
+
" !curl -Lo /usr/bin/cloudflared https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 && chmod +x /usr/bin/cloudflared\n",
|
863 |
+
" del cap\n",
|
864 |
+
" !true > /content/nohup.out\n",
|
865 |
+
" !nohup lt --port 7860 > /content/nohup.out 2>&1 &\n",
|
866 |
+
" !nohup cloudflared tunnel --url localhost:7860 > /content/nohup.out 2>&1 &\n",
|
867 |
+
" if with_bore:\n",
|
868 |
+
" if not os.path.exists('/usr/bin/bore'):\n",
|
869 |
+
" !curl -Ls https://github.com/ekzhang/bore/releases/download/v0.4.0/bore-v0.4.0-x86_64-unknown-linux-musl.tar.gz | tar zx -C /usr/bin\n",
|
870 |
+
" !nohup bore local 7860 --to bore.pub > /content/nohup.out 2>&1 &\n",
|
871 |
+
" if not \"--gradio-auth\" in commandline_arguments:\n",
|
872 |
+
" import random\n",
|
873 |
+
" import string\n",
|
874 |
+
" gradio_password = ''.join(random.choice(string.ascii_lowercase) for i in range(5))\n",
|
875 |
+
" commandline_arguments+=\" --gradio-auth {}:{}\".format(\"ncpt\", gradio_password)\n",
|
876 |
+
" else:\n",
|
877 |
+
" gradio_password = False\n",
|
878 |
+
" !sleep 4\n",
|
879 |
+
" print(\"\\r💡 \\033[95m\\033[1mUse one of these alternative tunnels after the loading is finished: \", flush=True)\n",
|
880 |
+
" from google.colab.output import serve_kernel_port_as_window\n",
|
881 |
+
" # serve_kernel_port_as_window(7860, anchor_text=\"https://th15f4k3l1nkofcn0tr34ll0l-7860-colab.googleusercontent.com/\")\n",
|
882 |
+
" !cat /content/nohup.out | rg -a -o \"https[^ ]*.*\\.trycloudflare\\.com|https[^ ]*.*\\.loca\\.lt|bore.pub:[^ ]*\" | sed '[email protected]@http://bore.pub@'\n",
|
883 |
+
" print(\"\\n\")\n",
|
884 |
+
" if with_bore:\n",
|
885 |
+
" if gradio_password:\n",
|
886 |
+
" print(\"\\r🔐 \\033[0m\\033[1mLooks like you're using bore without --gradio-auth huh... \")\n",
|
887 |
+
" print(\"For security, I've enforced to use gradio auth, so use this account to login:\")\n",
|
888 |
+
" print(\"👉⚠️ Username: ncpt\")\n",
|
889 |
+
" print(\"👉⚠️ Password:\", gradio_password,\"\\n\\n\")\n",
|
890 |
+
"\n",
|
891 |
+
"# If no xformers installed, remove --xformers from arg to avoid using old builtin xformers\n",
|
892 |
+
"# if not os.path.exists(\"/usr/local/lib/python3.10/dist-packages/xformers\"):\n",
|
893 |
+
"# commandline_arguments = commandline_arguments.replace(\"--xformers\",\"\")\n",
|
894 |
+
"\n",
|
895 |
+
"# Krita extension support (adding --api automatically) + toggleable.\n",
|
896 |
+
"with capture.capture_output() as cap:\n",
|
897 |
+
" if krita_paint_ext:\n",
|
898 |
+
" # Add api if no api (if lazy y'know)\n",
|
899 |
+
" if not \"--api\" in commandline_arguments:\n",
|
900 |
+
" commandline_arguments+=\" --api\"\n",
|
901 |
+
" %cd /content/sdw\n",
|
902 |
+
" if os.path.exists('/content/sdw/extensions/auto-sd-paint-ext'):\n",
|
903 |
+
" !cd ./extensions/auto-sd-paint-ext && git fetch && git merge # Deflecting FETCH_HEAD not found bug\n",
|
904 |
+
" else:\n",
|
905 |
+
" !git clone https://github.com/ashen-sensored/auto-sd-paint-ext extensions/auto-sd-paint-ext\n",
|
906 |
+
" else:\n",
|
907 |
+
" if os.path.exists('/content/sdw/extensions/auto-sd-paint-ext'):\n",
|
908 |
+
" !rm -rf /content/sdw/extensions/auto-sd-paint-ext\n",
|
909 |
+
" # Remove junks\n",
|
910 |
+
" !find /content/sdw/ -name \".ipynb_checkpoints\" -type d -exec rm -r {} \\;\n",
|
911 |
+
"\n",
|
912 |
+
"\n",
|
913 |
+
"# Print all files in every important directory\n",
|
914 |
+
"print(\"\\033[96mCan't see your files in here? Activate verbose_download to debug!\\n\")\n",
|
915 |
+
"print(\"\\033[92m\\033[1m╭-📦 Models + Configs\\033[96m\")\n",
|
916 |
+
"!find {models_dir}/ -mindepth 1 ! -name '*.txt' -printf '%f\\n'\n",
|
917 |
+
"print(\"\\n\\033[92m\\033[1m╭-📦 VAEs\\033[96m\")\n",
|
918 |
+
"!find {vaes_dir}/ -mindepth 1 ! -name '*.txt' -printf '%f\\n'\n",
|
919 |
+
"print(\"\\n\\033[92m\\033[1m╭-📦 Custom Embeddings (inbuilt is hidden)\\033[96m\")\n",
|
920 |
+
"!find {embeddings_dir}/ -mindepth 1 -maxdepth 1 -name '*.pt' -or -name '*.safetensors' -printf '%f\\n'\n",
|
921 |
+
"print(\"\\n\\033[92m\\033[1m╭-📦 LoRAs\\033[96m\")\n",
|
922 |
+
"!find {loras_dir}/ -mindepth 1 ! -name '*.keep' -printf '%f\\n'\n",
|
923 |
+
"# print(\"\\n\\033[92m\\033[1m╭-📦 LyCORIS\\033[96m\")\n",
|
924 |
+
"# !find {lycoris_dir}/ -mindepth 1 ! -name '*.keep' -printf '%f\\n'\n",
|
925 |
+
"print(\"\\n\\033[92m\\033[1m╭-📦 Hypernetworks\\033[96m\")\n",
|
926 |
+
"!find {hypernetworks_dir}/ -mindepth 1 ! -name '*.txt' -printf '%f\\n'\n",
|
927 |
+
"print(\"\\n\\033[92m\\033[1m╭-📦 Extensions\\033[96m\")\n",
|
928 |
+
"!find {extensions_dir}/ -mindepth 1 -maxdepth 1 ! -name '*.txt' -printf '%f\\n'\n",
|
929 |
+
"print(\"\\n\\n\\033[0m\")\n",
|
930 |
+
"\n",
|
931 |
+
"# HF OUT support!\n",
|
932 |
+
"if optional_huggingface_token:\n",
|
933 |
+
" commandline_arguments+=\" --hf-token-out \"+optional_huggingface_token\n",
|
934 |
+
"\n",
|
935 |
+
"# Start the weebui\n",
|
936 |
+
"%cd /content/sdw\n",
|
937 |
+
"\n",
|
938 |
+
"if null_model:\n",
|
939 |
+
" print(\"\\033[91m ⚠️ Null model will be loaded, if you don't understand please uncheck the model \\033[0m\")\n",
|
940 |
+
" !wget https://huggingface.co/ckpt/null/resolve/main/nullModelzeros.ckpt -P {models_dir} -c\n",
|
941 |
+
" commandline_arguments+=\" --ckpt \"+models_dir+\"/nullModelzeros.ckpt \"\n",
|
942 |
+
"\n",
|
943 |
+
"if fast_start:\n",
|
944 |
+
" # commandline_arguments += \" --skip-install\"\n",
|
945 |
+
" print(\"\\033[91m ⚠️ Fast start is active, please disable it if you have any problem! \\033[0m\")\n",
|
946 |
+
" !python webui.py $commandline_arguments\n",
|
947 |
+
"else:\n",
|
948 |
+
" !COMMANDLINE_ARGS=\"{commandline_arguments}\" REQS_FILE=\"requirements_versions.txt\" python launch.py\n",
|
949 |
+
"time_since_start = timedelta(seconds=time.time()-start_colab)\n",
|
950 |
+
"print(\"\\n\\n\\033[96m⌚ You've been running this colab for\",\"%02d:%02d:%02d\" % (time_since_start.seconds / 3600, (time_since_start.seconds / 60) % 60, time_since_start.seconds % 60))\n",
|
951 |
+
"print(\"\\n\\n\")"
|
952 |
+
]
|
953 |
+
}
|
954 |
+
]
|
955 |
+
}
|