RudiCahyan commited on
Commit
a6ccf21
1 Parent(s): 910c3d7

Delete Simple.ipynb

Browse files
Files changed (1) hide show
  1. Simple.ipynb +0 -315
Simple.ipynb DELETED
@@ -1,315 +0,0 @@
1
- {
2
- "cells": [
3
- {
4
- "cell_type": "code",
5
- "execution_count": 0,
6
- "metadata": {},
7
- "outputs": [
8
- {
9
- "name": "stdout",
10
- "output_type": "stream",
11
- "text": [
12
- "--skip-torch-cuda-test\n",
13
- "\u001b[1;32mInstalling xformers...\n",
14
- "\u001b[0m\n",
15
- "[WinError 2] The system cannot find the file specified: '/content'\n",
16
- "c:\\Users\\user\\Downloads\\novelai\n",
17
- "Grabbing pre-built xformers from camenduru's repo\n",
18
- "Status code: 200\n"
19
- ]
20
- },
21
- {
22
- "name": "stderr",
23
- "output_type": "stream",
24
- "text": [
25
- "ERROR: xformers-0.0.16+814314d.d20230118-cp38-cp38-linux_x86_64.whl is not a supported wheel on this platform.\n",
26
- "\n",
27
- "[notice] A new release of pip available: 22.3.1 -> 23.0.1\n",
28
- "[notice] To update, run: C:\\Users\\user\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\python.exe -m pip install --upgrade pip\n",
29
- "ERROR: Could not find a version that satisfies the requirement triton (from versions: none)\n",
30
- "ERROR: No matching distribution found for triton\n",
31
- "\n",
32
- "[notice] A new release of pip available: 22.3.1 -> 23.0.1\n",
33
- "[notice] To update, run: C:\\Users\\user\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\python.exe -m pip install --upgrade pip\n"
34
- ]
35
- },
36
- {
37
- "name": "stdout",
38
- "output_type": "stream",
39
- "text": [
40
- "\u001b[1;32mInstalling webui...\n",
41
- "\u001b[0m\n"
42
- ]
43
- },
44
- {
45
- "name": "stderr",
46
- "output_type": "stream",
47
- "text": [
48
- "'touch' is not recognized as an internal or external command,\n",
49
- "operable program or batch file.\n"
50
- ]
51
- },
52
- {
53
- "name": "stdout",
54
- "output_type": "stream",
55
- "text": [
56
- "[WinError 2] The system cannot find the file specified: 'stable-diffusion-webui'\n",
57
- "c:\\Users\\user\\Downloads\\novelai\n",
58
- "\u001b[1;32mDownloading AnythingV3 model...\n",
59
- "\u001b[0m\n",
60
- "[WinError 3] The system cannot find the path specified: '/content/stable-diffusion-webui/models/Stable-diffusion/'\n",
61
- "c:\\Users\\user\\Downloads\\novelai\n"
62
- ]
63
- },
64
- {
65
- "name": "stderr",
66
- "output_type": "stream",
67
- "text": [
68
- "[ was unexpected at this time.\n",
69
- "[ was unexpected at this time.\n"
70
- ]
71
- },
72
- {
73
- "name": "stdout",
74
- "output_type": "stream",
75
- "text": [
76
- "\u001b[1;32mSetting UI configs...\n",
77
- "\u001b[0m\n",
78
- "[WinError 3] The system cannot find the path specified: '/content/stable-diffusion-webui'\n",
79
- "c:\\Users\\user\\Downloads\\novelai\n"
80
- ]
81
- },
82
- {
83
- "name": "stderr",
84
- "output_type": "stream",
85
- "text": [
86
- "[ was unexpected at this time.\n",
87
- "-f was unexpected at this time.\n",
88
- "[ was unexpected at this time.\n",
89
- "[ was unexpected at this time.\n",
90
- "'touch' is not recognized as an internal or external command,\n",
91
- "operable program or batch file.\n",
92
- "'gdown' is not recognized as an internal or external command,\n",
93
- "operable program or batch file.\n"
94
- ]
95
- },
96
- {
97
- "name": "stdout",
98
- "output_type": "stream",
99
- "text": [
100
- "\u001b[1;32mInstalling extensions...\n",
101
- "\u001b[0m\n",
102
- "[WinError 3] The system cannot find the path specified: '/content/stable-diffusion-webui/extensions'\n",
103
- "c:\\Users\\user\\Downloads\\novelai\n"
104
- ]
105
- },
106
- {
107
- "name": "stderr",
108
- "output_type": "stream",
109
- "text": [
110
- "'[' is not recognized as an internal or external command,\n",
111
- "operable program or batch file.\n",
112
- "/bin/bash: -c: line 0: unexpected EOF while looking for matching `''\n",
113
- "/bin/bash: -c: line 1: syntax error: unexpected end of file\n",
114
- "/bin/bash: -c: line 0: unexpected EOF while looking for matching `''\n",
115
- "/bin/bash: -c: line 1: syntax error: unexpected end of file\n"
116
- ]
117
- },
118
- {
119
- "name": "stdout",
120
- "output_type": "stream",
121
- "text": [
122
- "[WinError 3] The system cannot find the path specified: '/content/stable-diffusion-webui/embeddings/'\n",
123
- "c:\\Users\\user\\Downloads\\novelai\n"
124
- ]
125
- },
126
- {
127
- "name": "stderr",
128
- "output_type": "stream",
129
- "text": [
130
- "fatal: destination path 'Umi-AI' already exists and is not an empty directory.\n",
131
- "[ was unexpected at this time.\n",
132
- "[ was unexpected at this time.\n",
133
- "[ was unexpected at this time.\n"
134
- ]
135
- },
136
- {
137
- "name": "stdout",
138
- "output_type": "stream",
139
- "text": [
140
- "\u001b[1;32mInstallation Success!\n",
141
- "\u001b[1;32mLaunching the webui...\n",
142
- "\u001b[0m\n",
143
- "[WinError 3] The system cannot find the path specified: '/content/stable-diffusion-webui'\n",
144
- "c:\\Users\\user\\Downloads\\novelai\n"
145
- ]
146
- },
147
- {
148
- "name": "stderr",
149
- "output_type": "stream",
150
- "text": [
151
- "'sed' is not recognized as an internal or external command,\n",
152
- "operable program or batch file.\n"
153
- ]
154
- },
155
- {
156
- "name": "stdout",
157
- "output_type": "stream",
158
- "text": [
159
- "Python 3.10.10 (tags/v3.10.10:aad5f6a, Feb 7 2023, 17:20:36) [MSC v.1929 64 bit (AMD64)]"
160
- ]
161
- },
162
- {
163
- "name": "stderr",
164
- "output_type": "stream",
165
- "text": [
166
- "Traceback (most recent call last):\n",
167
- " File \"c:\\Users\\user\\Downloads\\novelai\\launch.py\", line 360, in <module>\n",
168
- " prepare_environment()\n",
169
- " File \"c:\\Users\\user\\Downloads\\novelai\\launch.py\", line 272, in prepare_environment\n",
170
- " run_python(\"import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'\")\n",
171
- " File \"c:\\Users\\user\\Downloads\\novelai\\launch.py\", line 129, in run_python\n",
172
- " return run(f'\"{python}\" -c \"{code}\"', desc, errdesc)\n",
173
- " File \"c:\\Users\\user\\Downloads\\novelai\\launch.py\", line 105, in run\n",
174
- " raise RuntimeError(message)\n",
175
- "RuntimeError: Error running command.\n",
176
- "Command: \"C:\\Users\\user\\AppData\\Local\\Microsoft\\WindowsApps\\PythonSoftwareFoundation.Python.3.10_qbz5n2kfra8p0\\python.exe\" -c \"import torch; assert torch.cuda.is_available(), 'Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check'\"\n",
177
- "Error code: 1\n",
178
- "stdout: <empty>\n",
179
- "stderr: Traceback (most recent call last):\n",
180
- "\n",
181
- " File \"<string>\", line 1, in <module>\n",
182
- "\n",
183
- "AssertionError: Torch is not able to use GPU; add --skip-torch-cuda-test to COMMANDLINE_ARGS variable to disable this check\n",
184
- "\n",
185
- "\n",
186
- "\n"
187
- ]
188
- },
189
- {
190
- "name": "stdout",
191
- "output_type": "stream",
192
- "text": [
193
- "\n",
194
- "Commit hash: <none>\n"
195
- ]
196
- }
197
- ],
198
- "source": [
199
- "#@title - Instant (Simple)\n",
200
- "import requests\n",
201
- "import os\n",
202
- "import subprocess\n",
203
- "# cek = subprocess.getoutput('nvidia-smi')\n",
204
- "# if not 'T4' in cek:\n",
205
- "# print(\"\u001b[1;32m-----Your colab session is over. Use other google account or wait 12-24 hours-----\")\n",
206
- "# print(\"-----Sesi colab elu udah habis bro. Saran gw tunggu 12-24 jam atau bikin/pake akun google lain-----\")\n",
207
- "# raise KeyboardInterrupt\n",
208
- "\n",
209
- "\n",
210
- "#thanks to https://github.com/camenduru for the fork\n",
211
- "\n",
212
- "# print(subprocess.check_output('nvidia-smi'))\n",
213
- "commandline_args = os.environ.get('COMMANDLINE_ARGS', \"--skip-torch-cuda-test\")\n",
214
- "print(commandline_args)\n",
215
- "print('\u001b[1;32mInstalling xformers...')\n",
216
- "print('\u001b[0m')\n",
217
- "%cd /content\n",
218
- "#!if ! [ -f xformers ]; then pip install -q https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16+814314d.d20230118-cp38-cp38-linux_x86_64.whl; pip install -q --pre triton; touch xformers; fi\n",
219
- "if not os.path.isfile('xformers'):\n",
220
- " print(\"Grabbing pre-built xformers from camenduru's repo\")\n",
221
- " url = 'https://api.github.com/repos/camenduru/stable-diffusion-webui-colab/releases/latest'\n",
222
- " response = requests.get(url)\n",
223
- " print(\"Status code: \" + str(response.status_code))\n",
224
- " if response.status_code == 200:\n",
225
- " data = response.json()\n",
226
- " templink = [link for link in [asset['browser_download_url'] for asset in data['assets'] if 'cp38' in asset['name']]]\n",
227
- " xformerlink = templink[0]\n",
228
- " else:\n",
229
- " print(\"Request failed, loading last updated xformers instead\")\n",
230
- " xformerlink = 'https://github.com/camenduru/stable-diffusion-webui-colab/releases/download/0.0.16/xformers-0.0.16%2B814314d.d20230118-cp38-cp38-linux_x86_64.whl'\n",
231
- " !pip install -q $xformerlink\n",
232
- " !pip install -q --pre triton\n",
233
- " !touch xformers\n",
234
- "print('\u001b[1;32mInstalling webui...')\n",
235
- "print('\u001b[0m')\n",
236
- "!if ! [ -d stable-diffusion-webui ]; then git clone -b v2.0 https://github.com/camenduru/stable-diffusion-webui; touch forkedwebui; fi\n",
237
- "%cd stable-diffusion-webui\n",
238
- "\n",
239
- "#AnythingV3 Model & Vae\n",
240
- "print('\u001b[1;32mDownloading AnythingV3 model...')\n",
241
- "print('\u001b[0m')\n",
242
- "%cd /content/stable-diffusion-webui/models/Stable-diffusion/\n",
243
- "!if ! [ -f Anything-V3.0.safetensors ]; then gdown https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/anything-v3-fp32-pruned.safetensors -O /content/stable-diffusion-webui/models/Stable-diffusion/Anything-V3.0.safetensors; fi\n",
244
- "!if ! [ -f Anything-V3.0.vae.pt ]; then gdown https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/VAEs/orangemix.vae.pt -O /content/stable-diffusion-webui/models/Stable-diffusion/Anything-V3.0.vae.pt; fi\n",
245
- "\n",
246
- "#webui setup for nai\n",
247
- "print('\u001b[1;32mSetting UI configs...')\n",
248
- "print('\u001b[0m')\n",
249
- "%cd /content/stable-diffusion-webui\n",
250
- "!if [ -f configinstan ]; then rm configinstan; fi\n",
251
- "!if ! [ -f configinstanlite ]; then gdown https://pastebin.com/raw/fmN0i5Sd -O /content/stable-diffusion-webui/ui-config.json && gdown https://pastebin.com/raw/amVtB1NW -O /content/stable-diffusion-webui/config.json; fi\n",
252
- "!if ! [ -f configinstanlite ]; then mv /content/stable-diffusion-webui/modules/ui.py /content/stable-diffusion-webui/modules/ui_backup.py && gdown https://pastebin.com/raw/pKFWUfLM -O /content/stable-diffusion-webui/modules/ui.py; fi\n",
253
- "!touch configinstanlite\n",
254
- "\n",
255
- "#notification bell\n",
256
- "!gdown https://github.com/etherealxx/etherportal-webui-colab/raw/master/notification.mp3 -O /content/stable-diffusion-webui/notification.mp3\n",
257
- "\n",
258
- "#foolhardy remacri\n",
259
- "! [ ! -d models/ESRGAN ] && mkdir -p models/ESRGAN; [ ! -f models/ESRGAN/4x_foolhardy_Remacri.pth ] && gdown https://huggingface.co/etherealxx/whoseisthis/resolve/main/4x_foolhardy_Remacri.pth -O /content/stable-diffusion-webui/models/ESRGAN/4x_foolhardy_Remacri.pth\n",
260
- "\n",
261
- "#extensions\n",
262
- "print('\u001b[1;32mInstalling extensions...')\n",
263
- "print('\u001b[0m')\n",
264
- "%cd /content/stable-diffusion-webui/extensions\n",
265
- "!bash -c 'for repo in AlUlkesh/stable-diffusion-webui-images-browser Extraltodeus/depthmap2mask DominikDoom/a1111-sd-webui-tagcomplete ddPn08/kohya-sd-scripts-webui arenatemp/stable-diffusion-webui-model-toolkit; do if [ ! -d \"$repo\" ]; then git clone \"https://github.com/$repo\" && true; fi; done'\n",
266
- "!bash -c 'for repo in sd-civitai-browser kohya-sd-scripts-webui stable-diffusion-webui-model-toolkit batchlinks-webui; do if [ -d \"$repo\" ]; then rm -rf $repo && true; fi; done'\n",
267
- "#%cd /content/stable-diffusion-webui/extensions/UnivAICharGen\n",
268
- "#!git checkout c56b5146049b91cfcd645c62bd356bd0631c4131 .\n",
269
- "!git clone -b pre-embedding --single-branch https://github.com/etherealxx/Umi-AI\n",
270
- "\n",
271
- "#badprompt & badartist\n",
272
- "%cd /content/stable-diffusion-webui/embeddings/\n",
273
- "!if ! [ -f bad_prompt.pt ]; then gdown https://huggingface.co/datasets/Nerfgun3/bad_prompt/resolve/main/bad_prompt_version2.pt -O /content/stable-diffusion-webui/embeddings/bad_prompt.pt; fi\n",
274
- "!if ! [ -f bad_artist.pt ]; then gdown https://huggingface.co/NiXXerHATTER59/bad-artist/resolve/main/bad-artist.pt -O /content/stable-diffusion-webui/embeddings/bad_artist.pt; fi\n",
275
- "!if ! [ -f bad_hands.pt ]; then gdown https://huggingface.co/etherealxx/whoseisthis/resolve/main/bad-hands-5.pt -O /content/stable-diffusion-webui/embeddings/bad_hands.pt; fi\n",
276
- "\n",
277
- "#some fix\n",
278
- "!sed -i -e '''/prepare_environment()/a\\ os.system\\(f\\\"\"\"sed -i -e ''\\\"s/dict()))/dict())).cuda()/g\\\"'' /content/stable-diffusion-webui/repositories/stable-diffusion-stability-ai/ldm/util.py\"\"\")''' /content/stable-diffusion-webui/launch.py\n",
279
- "\n",
280
- "print('\u001b[1;32mInstallation Success!')\n",
281
- "print('\u001b[1;32mLaunching the webui...')\n",
282
- "print('\u001b[0m')\n",
283
- "%cd /content/stable-diffusion-webui\n",
284
- "!python launch.py --ckpt /content/stable-diffusion-webui/models/Stable-diffusion/Anything-V3.0.safetensors --vae-path /content/stable-diffusion-webui/models/Stable-diffusion/Anything-V3.0.vae.pt --share --xformers --enable-insecure-extension-access --gradio-queue"
285
- ]
286
- }
287
- ],
288
- "metadata": {
289
- "kernelspec": {
290
- "display_name": "Python 3",
291
- "language": "python",
292
- "name": "python3"
293
- },
294
- "language_info": {
295
- "codemirror_mode": {
296
- "name": "ipython",
297
- "version": 3
298
- },
299
- "file_extension": ".py",
300
- "mimetype": "text/x-python",
301
- "name": "python",
302
- "nbconvert_exporter": "python",
303
- "pygments_lexer": "ipython3",
304
- "version": "3.10.10"
305
- },
306
- "orig_nbformat": 4,
307
- "vscode": {
308
- "interpreter": {
309
- "hash": "7b1f2b33e866b0bf2409397e5f58ba9cdf170d3b7f64c8f359c79998e2f88ad4"
310
- }
311
- }
312
- },
313
- "nbformat": 4,
314
- "nbformat_minor": 2
315
- }