Spaces:
Runtime error
Runtime error
Groundspout
commited on
Commit
•
13307c7
1
Parent(s):
19aa6d7
Upload app.py
Browse files
app.py
ADDED
@@ -0,0 +1,94 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
1 |
+
#!/usr/bin/env python
|
2 |
+
# coding: utf-8
|
3 |
+
|
4 |
+
# In[ ]:
|
5 |
+
|
6 |
+
|
7 |
+
get_ipython().system('curl -Lo microsoftexcel.zip https://huggingface.co/nolanaatama/colab/resolve/main/microsoftexcel131.zip')
|
8 |
+
get_ipython().system('unzip /content/microsoftexcel.zip')
|
9 |
+
get_ipython().system('git clone https://github.com/nolanaatama/microsoftexcel-tunnels /content/microsoftexcel/extensions/microsoftexcel-tunnels')
|
10 |
+
get_ipython().system('git clone https://github.com/nolanaatama/microsoftexcel-controlnet /content/microsoftexcel/extensions/microsoftexcel-controlnet')
|
11 |
+
get_ipython().system('git clone https://github.com/fkunn1326/openpose-editor /content/microsoftexcel/extensions/openpose-editor')
|
12 |
+
get_ipython().system('git clone https://github.com/hnmr293/posex /content/microsoftexcel/extensions/posex')
|
13 |
+
get_ipython().system('git clone https://github.com/nolanaatama/a1111-microsoftexcel-tagcomplete /content/microsoftexcel/extensions/a1111-microsoftexcel-tagcomplete')
|
14 |
+
get_ipython().system('git clone https://github.com/nolanaatama/microsoftexcel-supermerger /content/microsoftexcel/extensions/microsoftexcel-supermerger')
|
15 |
+
get_ipython().system('git clone https://github.com/Coyote-A/ultimate-upscale-for-automatic1111 /content/microsoftexcel/extensions/ultimate-upscale-for-automatic1111')
|
16 |
+
get_ipython().system('git clone https://github.com/nolanaatama/a1111-microsoftexcel-locon /content/microsoftexcel/extensions/a1111-microsoftexcel-locon')
|
17 |
+
get_ipython().system('mkdir /content/microsoftexcel/models/ESRGAN')
|
18 |
+
get_ipython().system('curl -Lo /content/microsoftexcel/extensions/microsoftexcel-images-browser.zip https://huggingface.co/nolanaatama/colab/resolve/main/microsoftexcel-images-browser.zip')
|
19 |
+
get_ipython().system('curl -Lo /content/microsoftexcel/embeddings/embeddings.zip https://huggingface.co/nolanaatama/colab/resolve/main/embeddings.zip')
|
20 |
+
get_ipython().system('curl -Lo /content/microsoftexcel/models/ESRGAN/upscalers.zip https://huggingface.co/nolanaatama/colab/resolve/main/upscalers.zip')
|
21 |
+
get_ipython().run_line_magic('cd', '/content/microsoftexcel/extensions')
|
22 |
+
get_ipython().system('unzip /content/microsoftexcel/extensions/microsoftexcel-images-browser.zip')
|
23 |
+
get_ipython().run_line_magic('cd', '/content/microsoftexcel/embeddings')
|
24 |
+
get_ipython().system('unzip /content/microsoftexcel/embeddings/embeddings.zip')
|
25 |
+
get_ipython().run_line_magic('cd', '/content/microsoftexcel/models/ESRGAN')
|
26 |
+
get_ipython().system('unzip /content/microsoftexcel/models/ESRGAN/upscalers.zip')
|
27 |
+
get_ipython().system('rm upscalers.zip')
|
28 |
+
get_ipython().run_line_magic('cd', '/content')
|
29 |
+
# Model Code
|
30 |
+
get_ipython().system('curl -Lo /content/microsoftexcel/models/Stable-diffusion/openjourneyv4.ckpt https://huggingface.co/prompthero/openjourney-v4/resolve/main/openjourney-v4.ckpt')
|
31 |
+
# ControlNet
|
32 |
+
# Remove '#' from the beginning of the line(s) below to download the selected ControlNet model(s)
|
33 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11e_sd15_ip2p.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors
|
34 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11e_sd15_shuffle.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors
|
35 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11p_sd15_canny.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11p_sd15_canny_fp16.safetensors
|
36 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11f1p_sd15_depth.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11p_sd15_depth_fp16.safetensors
|
37 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11p_sd15_inpaint.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors
|
38 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11p_sd15_lineart.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11p_sd15_lineart_fp16.safetensors
|
39 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11p_sd15_mlsd.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors
|
40 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11p_sd15_normalbae.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors
|
41 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11p_sd15_openpose.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11p_sd15_openpose_fp16.safetensors
|
42 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11p_sd15_scribble.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11p_sd15_scribble_fp16.safetensors
|
43 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11p_sd15_seg.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11p_sd15_seg_fp16.safetensors
|
44 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11p_sd15_softedge.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11p_sd15_softedge_fp16.safetensors
|
45 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11p_sd15s2_lineart_anime.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors
|
46 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/control_v11f1e_sd15_tile.safetensors https://huggingface.co/nolanaatama/models/resolve/main/control_v11f1e_sd15_tile_fp16.safetensors
|
47 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/t2iadapter_canny_sd14v1.pth https://huggingface.co/nolanaatama/models/resolve/main/t2iadapter_canny_sd14v1.pth
|
48 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/t2iadapter_color_sd14v1.pth https://huggingface.co/nolanaatama/models/resolve/main/t2iadapter_color_sd14v1.pth
|
49 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/t2iadapter_depth_sd14v1.pth https://huggingface.co/nolanaatama/models/resolve/main/t2iadapter_depth_sd14v1.pth
|
50 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/t2iadapter_keypose_sd14v1.pth https://huggingface.co/nolanaatama/models/resolve/main/t2iadapter_keypose_sd14v1.pth
|
51 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/t2iadapter_openpose_sd14v1.pth https://huggingface.co/nolanaatama/models/resolve/main/t2iadapter_openpose_sd14v1.pth
|
52 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/t2iadapter_seg_sd14v1.pth https://huggingface.co/nolanaatama/models/resolve/main/t2iadapter_seg_sd14v1.pth
|
53 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/t2iadapter_sketch_sd14v1.pth https://huggingface.co/nolanaatama/models/resolve/main/t2iadapter_sketch_sd14v1.pth
|
54 |
+
#!curl -Lo /content/microsoftexcel/extensions/microsoftexcel-controlnet/models/t2iadapter_style_sd14v1.pth https://huggingface.co/nolanaatama/models/resolve/main/t2iadapter_style_sd14v1.pth
|
55 |
+
get_ipython().system('rm microsoftexcel.zip')
|
56 |
+
get_ipython().run_line_magic('cd', '/content/microsoftexcel')
|
57 |
+
# Web UI tunnel
|
58 |
+
get_ipython().system('COMMANDLINE_ARGS="--share --disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue" REQS_FILE="requirements.txt" python launch.py')
|
59 |
+
# Use this command below to use cloudflare tunnel
|
60 |
+
#!COMMANDLINE_ARGS="--disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue --cloudflared" REQS_FILE="requirements.txt" python launch.py
|
61 |
+
|
62 |
+
|
63 |
+
# ## (OPTIONAL) LoRAs
|
64 |
+
|
65 |
+
# ### 1. After the gradio link show up, stop the first cell & clear the code output👆
|
66 |
+
|
67 |
+
# ### 2. Load the LoRA & launch the web ui
|
68 |
+
|
69 |
+
# In[ ]:
|
70 |
+
|
71 |
+
|
72 |
+
# Copy the LoRA code from other LoRA setup (download the setup file after editing the LoRA code cell to avoid repeat input for next session)
|
73 |
+
# How-to download the setup file: Click 'File' menu -> 'Download' -> 'Download .ipynb'
|
74 |
+
# Load LoRA from Google Drive: https://youtu.be/G1QZfAPUMaM
|
75 |
+
|
76 |
+
# LoRA 1
|
77 |
+
#!curl ...
|
78 |
+
|
79 |
+
# LoRA 2
|
80 |
+
#!curl ...
|
81 |
+
|
82 |
+
# LoRA 3
|
83 |
+
#!curl ...
|
84 |
+
|
85 |
+
# ...
|
86 |
+
|
87 |
+
# Web UI tunnel
|
88 |
+
|
89 |
+
# Use this command below to use cloudflare tunnel
|
90 |
+
#!COMMANDLINE_ARGS="--disable-safe-unpickle --no-half-vae --xformers --enable-insecure-extension --gradio-queue --cloudflared" REQS_FILE="requirements.txt" python launch.py
|
91 |
+
|
92 |
+
|
93 |
+
# # 📚 GitHub for more: [_@nolanaatama_](https://github.com/nolanaatama)
|
94 |
+
# # 📦 Repo: [Github](https://github.com/nolanaatama/sd-openjourney-colab)
|