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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
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
{
 "cells": [
  {
   "cell_type": "markdown",
   "id": "6247c454-ae5d-4fa2-80e5-1918ccd4d094",
   "metadata": {},
   "source": [
    "# 启智云云端部署Stable Diffusion WebUI\n",
    "## 永久免费白嫖A100 24G/40G/80G显卡!\n",
    "### 唯一项目地址:https://openi.pcl.ac.cn/2575044704/stable-diffusion-webui-v1.6.1\n",
    "### 唯一项目地址:https://openi.pcl.ac.cn/2575044704/stable-diffusion-webui-v1.6.1\n",
    "### 唯一项目地址:https://openi.pcl.ac.cn/2575044704/stable-diffusion-webui-v1.6.1\n",
    "### 其它项目都是盗版!坚决不要相信此云端的显卡要给租金才能用!"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "091be464",
   "metadata": {},
   "source": [
    "## By Nyan9 BiliBili。QQ2575044704\n",
    "此为20元付费脚本,未经同意禁止公开此脚本。\n",
    "如果要公开,请删除所有全部关键代码"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "48852a6e",
   "metadata": {},
   "source": [
    "# 首次使用先复制镜像(左侧目录有sd就不用按这个):"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "0da5ecae",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "你的GPU运行状态:\n",
      "Tue Mar 26 21:33:25 2024       \n",
      "+---------------------------------------------------------------------------------------+\n",
      "| NVIDIA-SMI 535.54.03              Driver Version: 535.54.03    CUDA Version: 12.2     |\n",
      "|-----------------------------------------+----------------------+----------------------+\n",
      "| GPU  Name                 Persistence-M | Bus-Id        Disp.A | Volatile Uncorr. ECC |\n",
      "| Fan  Temp   Perf          Pwr:Usage/Cap |         Memory-Usage | GPU-Util  Compute M. |\n",
      "|                                         |                      |               MIG M. |\n",
      "|=========================================+======================+======================|\n",
      "|   0  NVIDIA A100-SXM4-80GB          On  | 00000000:89:00.0 Off |                    0 |\n",
      "| N/A   32C    P0              64W / 400W |      4MiB / 81920MiB |      0%      Default |\n",
      "|                                         |                      |             Disabled |\n",
      "+-----------------------------------------+----------------------+----------------------+\n",
      "                                                                                         \n",
      "+---------------------------------------------------------------------------------------+\n",
      "| Processes:                                                                            |\n",
      "|  GPU   GI   CI        PID   Type   Process name                            GPU Memory |\n",
      "|        ID   ID                                                             Usage      |\n",
      "|=======================================================================================|\n",
      "|  No running processes found                                                           |\n",
      "+---------------------------------------------------------------------------------------+\n"
     ]
    }
   ],
   "source": [
    "。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "932a01c4",
   "metadata": {},
   "source": [
    "# SD启动:\n",
    "## 出现http//:127.0.0.1:7860后从内网穿透连接进入SD-WebUI!不是本地地址"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "929ee5ea-15e7-48cd-8c8a-09316b75ad18",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "everyone.safetensors  openi_resource.version\t模型1.3.safetensors\n",
      "niji.safetensors      xuanliduocai.safetensors\t漫画模型.safetensors\n"
     ]
    }
   ],
   "source": [
    "#先复制模型\n",
    "。。。。。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "a52ebf7d",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[Errno 2] No such file or directory: '/tmp/code/sd'\n",
      "/sd\n",
      "Python 3.10.9 (main, May 15 2023, 07:38:08) [GCC 11.3.0]\n",
      "Version: v1.7.0-1-g167206da\n",
      "Commit hash: 167206dafd7ea357ec3824e853f6dab024b6a338\n",
      "Installing requirements\n",
      "ControlNet init warning: Unable to install insightface automatically. Please try run `pip install insightface` manually.\n",
      "Launching Web UI with arguments: --ckpt-dir=/tmp/pretrainmodel --ngrok=2douOsr61tUyYwMVF3lfj9uZGoa_6FPJ2x1xhKPbL6z4euKkM --ngrok-region=ap --ad-no-huggingface --no-download-sd-model --opt-channelslast --xformers --api --no-hashing --skip-torch-cuda-test --api-auth=123:123\n",
      "ngrok authtoken detected, trying to connect...\n",
      "ngrok connected to localhost:7860! URL: https://81fc-218-17-115-213.ngrok-free.app\n",
      "\n",
      "Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.\n",
      "\u001b[1m[\u001b[0m-\u001b[1m]\u001b[0m ADetailer initialized. version: \u001b[1;36m24.1\u001b[0m.\u001b[1;36m2\u001b[0m, num models: \u001b[1;36m4\u001b[0m\n",
      "ControlNet preprocessor location: /sd/extensions/sd-webui-controlnet/annotator/downloads\n",
      "2024-03-24 23:37:37,861 - ControlNet - \u001b[0;32mINFO\u001b[0m - ControlNet v1.1.441\n",
      "2024-03-24 23:37:38,007 - ControlNet - \u001b[0;32mINFO\u001b[0m - ControlNet v1.1.441\n",
      "sd-webui-prompt-all-in-one background API service started successfully.\n",
      "Checkpoint 131-half.safetensors [870fa2e24c] not found; loading fallback stable_diffusion_model_01/everyone.safetensors\n",
      "Loading weights [None] from /tmp/pretrainmodel/stable_diffusion_model_01/everyone.safetensors\n",
      "2024-03-24 23:37:39,868 - ControlNet - \u001b[0;32mINFO\u001b[0m - ControlNet UI callback registered.\n",
      "Creating model from config: /sd/configs/v1-inference.yaml\n",
      "Running on local URL:  http://127.0.0.1:7860\n",
      "\n",
      "To create a public link, set `share=True` in `launch()`.\n",
      "Startup time: 28.6s (prepare environment: 12.7s, import torch: 2.9s, import gradio: 1.3s, setup paths: 1.4s, initialize shared: 0.3s, other imports: 2.0s, setup codeformer: 0.1s, load scripts: 2.7s, create ui: 2.0s, gradio launch: 2.8s, add APIs: 0.2s).\n",
      "Couldn't find VAE named pastel-waifu-diffusion.vae.pt; using None instead\n",
      "Applying attention optimization: xformers... done.\n",
      "Model loaded in 34.5s (load weights from disk: 1.6s, create model: 1.3s, apply weights to model: 31.1s, calculate empty prompt: 0.2s).\n"
     ]
    }
   ],
   "source": [
    "# 点击这个启动SD\n",
    "。。。。。。。。。。。。。。。。。。。。。。。"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0e0dc739",
   "metadata": {},
   "source": [
    "-------"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "54a6b833",
   "metadata": {},
   "source": [
    "# 下载模型,直接把模型下载地址粘贴进去\n",
    "# 支持的模型下载站:liblib.ai, tusiart.com, Huggingface镜像站\n",
    "# 不支持的:Civitai,\n",
    "## HUggingface镜像站:huggingface.sukaka.top\n",
    "## 必须先把SD停下来再执行代码!"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 8,
   "id": "e1d736de",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "/tmp/code/sd/models/Lora\n",
      "\u001b[35m[\u001b[0m#36562e 153MiB/162MiB\u001b[36m(94%)\u001b[0m CN:9 DL:\u001b[32m62MiB\u001b[0m\u001b[35m]\u001b[0m\u001b[0mm\n",
      "Download Results:\n",
      "gid   |stat|avg speed  |path/URI\n",
      "======+====+===========+=======================================================\n",
      "36562e|\u001b[1;32mOK\u001b[0m  |    47MiB/s|/tmp/code/sd/models/Lora/Baiyu.safetensors\n",
      "\n",
      "Status Legend:\n",
      "(OK):download completed.\n",
      "/tmp/code\n"
     ]
    }
   ],
   "source": [
    "代码呢?"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 9,
   "id": "741c1a0c",
   "metadata": {},
   "outputs": [],
   "source": [
    "。。"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "4097b906",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "EOL while scanning string literal (680814184.py, line 13)",
     "output_type": "error",
     "traceback": [
      "\u001b[0;36m  Cell \u001b[0;32mIn[3], line 13\u001b[0;36m\u001b[0m\n\u001b[0;31m    \"https://gidsgdsmncvknsnkdvsnkdvsknd\u001b[0m\n\u001b[0m                                        ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m EOL while scanning string literal\n"
     ]
    }
   ],
   "source": [
    "## 安装常用插件,github如果连不上就多执行几次\n",
    "extensions = [\n",
    "\"https://github.com/Mikubill/sd-webui-controlnet\",\n",
    "代码被砂糖酱吃掉了!\n",
    "    asfknaskfnf\n",
    "    asfasv\n",
    "\n",
    "\n",
    "sfhkahsffhaksfa\n",
    "sf\n",
    "asf\n",
    "\n",
    "sf\n",
    "as\n",
    "f\n",
    "asffas\n",
    "saf\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "\n",
    "草草草草草草草草草草草草草草草草草草草"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "a28903ba",
   "metadata": {},
   "source": [
    "------------------"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "902e6634",
   "metadata": {},
   "source": [
    "# 下面代码是启动秋叶的Lora训练器:"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "13585ce5",
   "metadata": {},
   "source": [
    "# 1.拉取lora训练文件(首次启动)(左侧有lora文件夹就不用拉取)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "dcf2eeb6",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Object `(空)` not found.\n"
     ]
    },
    {
     "ename": "NameError",
     "evalue": "name 'aa' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[0;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[0;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[0;32mIn[11], line 3\u001b[0m\n\u001b[1;32m      1\u001b[0m get_ipython()\u001b[38;5;241m.\u001b[39mrun_line_magic(\u001b[38;5;124m'\u001b[39m\u001b[38;5;124mpinfo\u001b[39m\u001b[38;5;124m'\u001b[39m, \u001b[38;5;124m'\u001b[39m\u001b[38;5;124m(空)\u001b[39m\u001b[38;5;124m'\u001b[39m)\n\u001b[1;32m      2\u001b[0m get_ipython()\u001b[38;5;241m.\u001b[39mshow_usage()\n\u001b[0;32m----> 3\u001b[0m \u001b[43maa\u001b[49m\n",
      "\u001b[0;31mNameError\u001b[0m: name 'aa' is not defined"
     ]
    }
   ],
   "source": [
    "\n",
    "?(空)\n",
    "??\n",
    "aa"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "0ec71212",
   "metadata": {},
   "source": [
    "# 2. 启动Lora训练器"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "a2b0612a",
   "metadata": {
    "tags": []
   },
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid character in identifier (2822435047.py, line 4)",
     "output_type": "error",
     "traceback": [
      "\u001b[0;36m  Cell \u001b[0;32mIn[5], line 4\u001b[0;36m\u001b[0m\n\u001b[0;31m    忘记了原来代码怎么写的??\u001b[0m\n\u001b[0m                ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid character in identifier\n"
     ]
    }
   ],
   "source": [
    "代码被砂糖酱吃掉了!\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 13,
   "id": "db459d42-54b2-4f32-9a5a-fb9b6b681ba9",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid syntax (3528668389.py, line 2)",
     "output_type": "error",
     "traceback": [
      "\u001b[0;36m  Cell \u001b[0;32mIn[13], line 2\u001b[0;36m\u001b[0m\n\u001b[0;31m    先从打印hello world开始\u001b[0m\n\u001b[0m              ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid syntax\n"
     ]
    }
   ],
   "source": [
    "自学python区\n",
    "先从打印hello world开始"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "5968dbc3-1a87-425e-8de6-e7c2517d66d2",
   "metadata": {},
   "outputs": [
    {
     "ename": "SyntaxError",
     "evalue": "invalid character in identifier (816423590.py, line 1)",
     "output_type": "error",
     "traceback": [
      "\u001b[0;36m  Cell \u001b[0;32mIn[12], line 1\u001b[0;36m\u001b[0m\n\u001b[0;31m    print(hello world)\u001b[0m\n\u001b[0m              ^\u001b[0m\n\u001b[0;31mSyntaxError\u001b[0m\u001b[0;31m:\u001b[0m invalid character in identifier\n"
     ]
    }
   ],
   "source": [
    "print(hello world)"
   ]
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.8.10"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}