Upload 2 files
Browse files- easydiffusion/_main.ipynb +4 -8
- easydiffusion/_start.ipynb +2 -8
easydiffusion/_main.ipynb
CHANGED
|
@@ -54,22 +54,18 @@
|
|
| 54 |
"\n",
|
| 55 |
"fix_script()\n",
|
| 56 |
"os.chdir(\"sd-ui-files\")\n",
|
| 57 |
-
"!python
|
| 58 |
"!pip install --upgrade pytorch-lightning\n",
|
| 59 |
"\n",
|
| 60 |
-
"!curl -Lo /
|
| 61 |
-
"!curl -Lo /
|
| 62 |
-
"\n",
|
| 63 |
-
"# !curl -Lo content/apply_func.py https://github.com/Van-wise/sd-colab/raw/main/easydiffusion/apply_func.py\n",
|
| 64 |
-
"# !rm -rf /usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/apply_func.py\n",
|
| 65 |
-
"# !cp /content/apply_func.py /usr/local/lib/python3.10/dist-packages/pytorch_lightning/utilities/apply_func.py\n",
|
| 66 |
"\n",
|
| 67 |
"from pathlib import Path\n",
|
| 68 |
"os.environ[\"SD_UI_PATH\"] = str(Path(Path.cwd(), \"ui\"))\n",
|
| 69 |
"os.environ[\"INSTALL_ENV_DIR\"] = \"/usr/local\"\n",
|
| 70 |
"print(str(Path(Path.cwd(), \"ui\")))\n",
|
| 71 |
"\n",
|
| 72 |
-
"
|
| 73 |
]
|
| 74 |
}
|
| 75 |
],
|
|
|
|
| 54 |
"\n",
|
| 55 |
"fix_script()\n",
|
| 56 |
"os.chdir(\"sd-ui-files\")\n",
|
| 57 |
+
"!python current_dir/scripts/check_modules.py #安装依赖&环境\n",
|
| 58 |
"!pip install --upgrade pytorch-lightning\n",
|
| 59 |
"\n",
|
| 60 |
+
"!curl -Lo {current_dir}/models/stable-diffusion/chilloutmix_NiPrunedFp32Fix-chonghui.safetensors https://huggingface.co/spaces/weo1101/111/resolve/main/chilloutmix_NiPrunedFp32Fix-inpainting.inpainting.safetensors\n",
|
| 61 |
+
"!curl -Lo {current_dir}/models/stable-diffusion/chilloutmix_NiPrunedFp32Fix.safetensors https://huggingface.co/spaces/weo1101/111/resolve/main/chilloutmix_NiPrunedFp32Fix-inpainting.inpainting.safetensors\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
| 62 |
"\n",
|
| 63 |
"from pathlib import Path\n",
|
| 64 |
"os.environ[\"SD_UI_PATH\"] = str(Path(Path.cwd(), \"ui\"))\n",
|
| 65 |
"os.environ[\"INSTALL_ENV_DIR\"] = \"/usr/local\"\n",
|
| 66 |
"print(str(Path(Path.cwd(), \"ui\")))\n",
|
| 67 |
"\n",
|
| 68 |
+
"print(\"Installing Easy Diffusion's UI..\\n\")"
|
| 69 |
]
|
| 70 |
}
|
| 71 |
],
|
easydiffusion/_start.ipynb
CHANGED
|
@@ -9,11 +9,6 @@
|
|
| 9 |
"import threading\n",
|
| 10 |
"import time\n",
|
| 11 |
"import os\n",
|
| 12 |
-
"if not os.path.exists('/content/key/id_rsa'):\n",
|
| 13 |
-
" !mkdir -p /content/key/id_rsa\n",
|
| 14 |
-
" !ssh-keygen -t rsa -b 4096 -N \"\" -f /content/key/id_rsa -y\n",
|
| 15 |
-
" !chmod 644 /content/key/id_rsa\n",
|
| 16 |
-
" !chmod 644 /content/key/id_rsa.pub\n",
|
| 17 |
"\n",
|
| 18 |
"def tunnel():\n",
|
| 19 |
" time.sleep(1)\n",
|
|
@@ -24,12 +19,11 @@
|
|
| 24 |
" print(ngrok_tunnel)\n",
|
| 25 |
" print(cloudflare_url)\n",
|
| 26 |
" time.sleep(1)\n",
|
| 27 |
-
" !ssh -R 80:127.0.0.1:9000 -o StrictHostKeyChecking=no -i /content/key/id_rsa remote.moe\n",
|
| 28 |
"\n",
|
| 29 |
"threading.Thread(target=tunnel, daemon=True).start()\n",
|
| 30 |
"\n",
|
| 31 |
-
"!python
|
| 32 |
-
"#!python ./
|
| 33 |
]
|
| 34 |
}
|
| 35 |
],
|
|
|
|
| 9 |
"import threading\n",
|
| 10 |
"import time\n",
|
| 11 |
"import os\n",
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
"\n",
|
| 13 |
"def tunnel():\n",
|
| 14 |
" time.sleep(1)\n",
|
|
|
|
| 19 |
" print(ngrok_tunnel)\n",
|
| 20 |
" print(cloudflare_url)\n",
|
| 21 |
" time.sleep(1)\n",
|
|
|
|
| 22 |
"\n",
|
| 23 |
"threading.Thread(target=tunnel, daemon=True).start()\n",
|
| 24 |
"\n",
|
| 25 |
+
"!python {current_dir}/scripts/check_modules.py --launch-uvicorn\n",
|
| 26 |
+
"#!python ./ui/main.py"
|
| 27 |
]
|
| 28 |
}
|
| 29 |
],
|