Upload 2 files
Browse files- easydiffusion/_main.ipynb +1 -2
- easydiffusion/_start.ipynb +4 -6
easydiffusion/_main.ipynb
CHANGED
|
@@ -77,10 +77,9 @@
|
|
| 77 |
" gen_key(ssh_path)\n",
|
| 78 |
"\n",
|
| 79 |
"os.chdir(\"sd-ui-files\")\n",
|
| 80 |
-
"main_dir = os.environ['MAIN_DIR'] = os.getcwd() if 'MAIN_DIR' not in os.environ else os.environ['MAIN_DIR']\n",
|
| 81 |
"\n",
|
| 82 |
"!python ./scripts/check_modules.py #安装依赖&环境\n",
|
| 83 |
-
"!pip install --upgrade pytorch-lightning\n",
|
| 84 |
"!apt-get install aria2\n",
|
| 85 |
"#!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M -d {current_dir}/models/stable-diffusion/ -o chilloutmix_NiPrunedFp32Fix.safetensors https://huggingface.co/naonovn/chilloutmix_NiPrunedFp32Fix/resolve/main/chilloutmix_NiPrunedFp32Fix.safetensors\n",
|
| 86 |
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M -d {current_dir}/models/stable-diffusion/ -o chilloutmix_NiPrunedFp32Fix-chonghui.safetensors https://huggingface.co/spaces/weo1101/111/resolve/main/chilloutmix_NiPrunedFp32Fix-inpainting.inpainting.safetensors\n",
|
|
|
|
| 77 |
" gen_key(ssh_path)\n",
|
| 78 |
"\n",
|
| 79 |
"os.chdir(\"sd-ui-files\")\n",
|
|
|
|
| 80 |
"\n",
|
| 81 |
"!python ./scripts/check_modules.py #安装依赖&环境\n",
|
| 82 |
+
"!pip install --upgrade pytorch-lightning pycloudflared\n",
|
| 83 |
"!apt-get install aria2\n",
|
| 84 |
"#!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M -d {current_dir}/models/stable-diffusion/ -o chilloutmix_NiPrunedFp32Fix.safetensors https://huggingface.co/naonovn/chilloutmix_NiPrunedFp32Fix/resolve/main/chilloutmix_NiPrunedFp32Fix.safetensors\n",
|
| 85 |
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M -d {current_dir}/models/stable-diffusion/ -o chilloutmix_NiPrunedFp32Fix-chonghui.safetensors https://huggingface.co/spaces/weo1101/111/resolve/main/chilloutmix_NiPrunedFp32Fix-inpainting.inpainting.safetensors\n",
|
easydiffusion/_start.ipynb
CHANGED
|
@@ -11,16 +11,14 @@
|
|
| 11 |
"import time\n",
|
| 12 |
"import os\n",
|
| 13 |
"#/content/esay\n",
|
| 14 |
-
"
|
| 15 |
-
"main_dir = os.environ['MAIN_DIR']\n",
|
| 16 |
-
"%cd {main_dir}\n",
|
| 17 |
"use_remote = True # @param {type:\"boolean\"}\n",
|
| 18 |
"use_cloudflare = True # @param {type:\"boolean\"}\n",
|
| 19 |
"\n",
|
| 20 |
"def start_tunnle():\n",
|
| 21 |
" open(\"/content/output.log\", \"w\").close()\n",
|
| 22 |
" # 循环检测文件内容,直到存在\"http://127.0.0.1:9090\"。\n",
|
| 23 |
-
" while not \"
|
| 24 |
" time.sleep(1)\n",
|
| 25 |
" clear_output() \n",
|
| 26 |
" if ngrok_token:\n",
|
|
@@ -41,13 +39,13 @@
|
|
| 41 |
"\n",
|
| 42 |
" if use_remote:\n",
|
| 43 |
" try:\n",
|
| 44 |
-
" !ssh -R 80:127.0.0.1:9000 -o StrictHostKeyChecking=no -i
|
| 45 |
" except Exception as e:\n",
|
| 46 |
" print(\"cloudflare 连接失败:\", e)\n",
|
| 47 |
"\n",
|
| 48 |
"threading.Thread(target=start_tunnle, daemon=True).start()\n",
|
| 49 |
"\n",
|
| 50 |
-
"!python
|
| 51 |
"#!python ./ui/main.py"
|
| 52 |
]
|
| 53 |
}
|
|
|
|
| 11 |
"import time\n",
|
| 12 |
"import os\n",
|
| 13 |
"#/content/esay\n",
|
| 14 |
+
"%cd /content/esay/sd-ui-files\n",
|
|
|
|
|
|
|
| 15 |
"use_remote = True # @param {type:\"boolean\"}\n",
|
| 16 |
"use_cloudflare = True # @param {type:\"boolean\"}\n",
|
| 17 |
"\n",
|
| 18 |
"def start_tunnle():\n",
|
| 19 |
" open(\"/content/output.log\", \"w\").close()\n",
|
| 20 |
" # 循环检测文件内容,直到存在\"http://127.0.0.1:9090\"。\n",
|
| 21 |
+
" while not \"http://localhost:9000/\" in open(\"/content/output.log\", \"r\").read():\n",
|
| 22 |
" time.sleep(1)\n",
|
| 23 |
" clear_output() \n",
|
| 24 |
" if ngrok_token:\n",
|
|
|
|
| 39 |
"\n",
|
| 40 |
" if use_remote:\n",
|
| 41 |
" try:\n",
|
| 42 |
+
" !ssh -R 80:127.0.0.1:9000 -o StrictHostKeyChecking=no -i /content/id_rsa remote.moe 2>&1 | tee -a /content/tunnel.log\n",
|
| 43 |
" except Exception as e:\n",
|
| 44 |
" print(\"cloudflare 连接失败:\", e)\n",
|
| 45 |
"\n",
|
| 46 |
"threading.Thread(target=start_tunnle, daemon=True).start()\n",
|
| 47 |
"\n",
|
| 48 |
+
"!python ./scripts/check_modules.py --launch-uvicorn 2>&1 | tee /content/output.log\n",
|
| 49 |
"#!python ./ui/main.py"
|
| 50 |
]
|
| 51 |
}
|