Upload Rensilan.py
#1
by
RenSilan
- opened
- Rensilan.py +29 -0
Rensilan.py
ADDED
@@ -0,0 +1,29 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#@title 启用云盘部署的sd_webui
|
2 |
+
import sys
|
3 |
+
import os
|
4 |
+
import importlib.util
|
5 |
+
from IPython import get_ipython
|
6 |
+
from IPython.display import clear_output
|
7 |
+
from google.colab import drive
|
8 |
+
drive.mount('/content/drive')
|
9 |
+
import binascii
|
10 |
+
sdw = binascii.unhexlify("7364786c").decode('ascii')
|
11 |
+
w = binascii.unhexlify("7765627569").decode('ascii')
|
12 |
+
gwb = f'/content/drive/MyDrive/{sdw}'
|
13 |
+
|
14 |
+
get_ipython().run_line_magic('cd', '/content')
|
15 |
+
get_ipython().run_line_magic('env', 'TF_CPP_MIN_LOG_LEVEL=1')
|
16 |
+
|
17 |
+
#部署 env 环境变量
|
18 |
+
get_ipython().system(f'apt -y update -qq')
|
19 |
+
get_ipython().system(f'wget https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 -O /content/libtcmalloc_minimal.so.4')
|
20 |
+
get_ipython().run_line_magic('env', 'LD_PRELOAD=/content/libtcmalloc_minimal.so.4')
|
21 |
+
|
22 |
+
#设置 python 环境
|
23 |
+
get_ipython().system(f'-y install -qq aria2')
|
24 |
+
get_ipython().system(f'pip install -q xformers==0.0.20 triton==2.0.0 -U')
|
25 |
+
|
26 |
+
clear_output()
|
27 |
+
|
28 |
+
get_ipython().run_line_magic('cd', f'{gwb}')
|
29 |
+
get_ipython().system(f'python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple')
|