Update app.py
Browse files
app.py
CHANGED
|
@@ -1,306 +1,78 @@
|
|
| 1 |
-
import gradio as gr
|
| 2 |
-
from datasets import load_dataset
|
| 3 |
-
from PIL import Image
|
| 4 |
-
import re
|
| 5 |
import os
|
| 6 |
-
|
|
|
|
|
|
|
| 7 |
|
| 8 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 9 |
|
| 10 |
-
|
| 11 |
-
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 12 |
|
| 13 |
-
|
| 14 |
-
|
| 15 |
|
| 16 |
-
|
| 17 |
-
def infer(prompt):
|
| 18 |
-
global is_gpu_busy
|
| 19 |
-
samples = 4
|
| 20 |
-
steps = 50
|
| 21 |
-
scale = 7.5
|
| 22 |
-
for filter in word_list:
|
| 23 |
-
if re.search(rf"\b{filter}\b", prompt):
|
| 24 |
-
raise gr.Error("Unsafe content found. Please try again with different prompts.")
|
| 25 |
-
|
| 26 |
-
images = []
|
| 27 |
-
url = os.getenv('JAX_BACKEND_URL')
|
| 28 |
-
payload = {'prompt': prompt}
|
| 29 |
-
images_request = requests.post(url, json = payload)
|
| 30 |
-
for image in images_request.json()["images"]:
|
| 31 |
-
image_b64 = (f"data:image/jpeg;base64,{image}")
|
| 32 |
-
images.append(image_b64)
|
| 33 |
-
|
| 34 |
-
return images
|
| 35 |
-
|
| 36 |
-
|
| 37 |
-
css = """
|
| 38 |
-
.gradio-container {
|
| 39 |
-
font-family: 'IBM Plex Sans', sans-serif;
|
| 40 |
-
}
|
| 41 |
-
.gr-button {
|
| 42 |
-
color: white;
|
| 43 |
-
border-color: black;
|
| 44 |
-
background: black;
|
| 45 |
-
}
|
| 46 |
-
input[type='range'] {
|
| 47 |
-
accent-color: black;
|
| 48 |
-
}
|
| 49 |
-
.dark input[type='range'] {
|
| 50 |
-
accent-color: #dfdfdf;
|
| 51 |
-
}
|
| 52 |
-
.container {
|
| 53 |
-
max-width: 730px;
|
| 54 |
-
margin: auto;
|
| 55 |
-
padding-top: 1.5rem;
|
| 56 |
-
}
|
| 57 |
-
#gallery {
|
| 58 |
-
min-height: 22rem;
|
| 59 |
-
margin-bottom: 15px;
|
| 60 |
-
margin-left: auto;
|
| 61 |
-
margin-right: auto;
|
| 62 |
-
border-bottom-right-radius: .5rem !important;
|
| 63 |
-
border-bottom-left-radius: .5rem !important;
|
| 64 |
-
}
|
| 65 |
-
#gallery>div>.h-full {
|
| 66 |
-
min-height: 20rem;
|
| 67 |
-
}
|
| 68 |
-
.details:hover {
|
| 69 |
-
text-decoration: underline;
|
| 70 |
-
}
|
| 71 |
-
.gr-button {
|
| 72 |
-
white-space: nowrap;
|
| 73 |
-
}
|
| 74 |
-
.gr-button:focus {
|
| 75 |
-
border-color: rgb(147 197 253 / var(--tw-border-opacity));
|
| 76 |
-
outline: none;
|
| 77 |
-
box-shadow: var(--tw-ring-offset-shadow), var(--tw-ring-shadow), var(--tw-shadow, 0 0 #0000);
|
| 78 |
-
--tw-border-opacity: 1;
|
| 79 |
-
--tw-ring-offset-shadow: var(--tw-ring-inset) 0 0 0 var(--tw-ring-offset-width) var(--tw-ring-offset-color);
|
| 80 |
-
--tw-ring-shadow: var(--tw-ring-inset) 0 0 0 calc(3px var(--tw-ring-offset-width)) var(--tw-ring-color);
|
| 81 |
-
--tw-ring-color: rgb(191 219 254 / var(--tw-ring-opacity));
|
| 82 |
-
--tw-ring-opacity: .5;
|
| 83 |
-
}
|
| 84 |
-
#advanced-btn {
|
| 85 |
-
font-size: .7rem !important;
|
| 86 |
-
line-height: 19px;
|
| 87 |
-
margin-top: 12px;
|
| 88 |
-
margin-bottom: 12px;
|
| 89 |
-
padding: 2px 8px;
|
| 90 |
-
border-radius: 14px !important;
|
| 91 |
-
}
|
| 92 |
-
#advanced-options {
|
| 93 |
-
display: none;
|
| 94 |
-
margin-bottom: 20px;
|
| 95 |
-
}
|
| 96 |
-
.footer {
|
| 97 |
-
margin-bottom: 45px;
|
| 98 |
-
margin-top: 35px;
|
| 99 |
-
text-align: center;
|
| 100 |
-
border-bottom: 1px solid #e5e5e5;
|
| 101 |
-
}
|
| 102 |
-
.footer>p {
|
| 103 |
-
font-size: .8rem;
|
| 104 |
-
display: inline-block;
|
| 105 |
-
padding: 0 10px;
|
| 106 |
-
transform: translateY(10px);
|
| 107 |
-
background: white;
|
| 108 |
-
}
|
| 109 |
-
.dark .footer {
|
| 110 |
-
border-color: #303030;
|
| 111 |
-
}
|
| 112 |
-
.dark .footer>p {
|
| 113 |
-
background: #0b0f19;
|
| 114 |
-
}
|
| 115 |
-
.acknowledgments h4{
|
| 116 |
-
margin: 1.25em 0 .25em 0;
|
| 117 |
-
font-weight: bold;
|
| 118 |
-
font-size: 115%;
|
| 119 |
-
}
|
| 120 |
-
#container-advanced-btns{
|
| 121 |
-
display: flex;
|
| 122 |
-
flex-wrap: wrap;
|
| 123 |
-
justify-content: space-between;
|
| 124 |
-
align-items: center;
|
| 125 |
-
}
|
| 126 |
-
.animate-spin {
|
| 127 |
-
animation: spin 1s linear infinite;
|
| 128 |
-
}
|
| 129 |
-
@keyframes spin {
|
| 130 |
-
from {
|
| 131 |
-
transform: rotate(0deg);
|
| 132 |
-
}
|
| 133 |
-
to {
|
| 134 |
-
transform: rotate(360deg);
|
| 135 |
-
}
|
| 136 |
-
}
|
| 137 |
-
#share-btn-container {
|
| 138 |
-
display: flex; padding-left: 0.5rem !important; padding-right: 0.5rem !important; background-color: #000000; justify-content: center; align-items: center; border-radius: 9999px !important; width: 13rem;
|
| 139 |
-
}
|
| 140 |
-
#share-btn {
|
| 141 |
-
all: initial; color: #ffffff;font-weight: 600; cursor:pointer; font-family: 'IBM Plex Sans', sans-serif; margin-left: 0.5rem !important; padding-top: 0.25rem !important; padding-bottom: 0.25rem !important;
|
| 142 |
-
}
|
| 143 |
-
#share-btn * {
|
| 144 |
-
all: unset;
|
| 145 |
-
}
|
| 146 |
-
.gr-form{
|
| 147 |
-
flex: 1 1 50%; border-top-right-radius: 0; border-bottom-right-radius: 0;
|
| 148 |
-
}
|
| 149 |
-
#prompt-container{
|
| 150 |
-
gap: 0;
|
| 151 |
-
}
|
| 152 |
-
#share-btn-container div:nth-child(-n+2){
|
| 153 |
-
width: auto !important;
|
| 154 |
-
min-height: 0px !important;
|
| 155 |
-
}
|
| 156 |
-
"""
|
| 157 |
|
| 158 |
-
|
| 159 |
-
|
| 160 |
-
examples = [
|
| 161 |
-
[
|
| 162 |
-
'The spirit of a tamagotchi wandering in the city of Paris',
|
| 163 |
-
# 4,
|
| 164 |
-
# 45,
|
| 165 |
-
# 7.5,
|
| 166 |
-
# 1024,
|
| 167 |
-
],
|
| 168 |
-
[
|
| 169 |
-
'A delicious ceviche cheesecake slice',
|
| 170 |
-
# 4,
|
| 171 |
-
# 45,
|
| 172 |
-
# 7,
|
| 173 |
-
# 1024,
|
| 174 |
-
],
|
| 175 |
-
[
|
| 176 |
-
'A pao de queijo foodcart in front of a japanese castle',
|
| 177 |
-
# 4,
|
| 178 |
-
# 45,
|
| 179 |
-
# 7,
|
| 180 |
-
# 1024,
|
| 181 |
-
],
|
| 182 |
-
[
|
| 183 |
-
'alone in the amusement park by Edward Hopper',
|
| 184 |
-
# 4,
|
| 185 |
-
# 45,
|
| 186 |
-
# 7,
|
| 187 |
-
# 1024,
|
| 188 |
-
],
|
| 189 |
-
[
|
| 190 |
-
"A large cabin on top of a sunny mountain in the style of Dreamworks, artstation",
|
| 191 |
-
# 4,
|
| 192 |
-
# 45,
|
| 193 |
-
# 7,
|
| 194 |
-
# 1024,
|
| 195 |
-
],
|
| 196 |
-
]
|
| 197 |
-
|
| 198 |
-
|
| 199 |
-
with block:
|
| 200 |
-
gr.HTML(
|
| 201 |
-
"""
|
| 202 |
-
<div style="text-align: center; max-width: 650px; margin: 0 auto; padding-top: 7px;">
|
| 203 |
-
<div
|
| 204 |
-
style="
|
| 205 |
-
display: inline-flex;
|
| 206 |
-
align-items: center;
|
| 207 |
-
gap: 0.8rem;
|
| 208 |
-
font-size: 1.75rem;
|
| 209 |
-
"
|
| 210 |
-
>
|
| 211 |
-
<h1 style="font-weight: 900; margin-bottom: 7px;">
|
| 212 |
-
Stable Diffusion v1-5 Demo
|
| 213 |
-
</h1>
|
| 214 |
-
</div>
|
| 215 |
-
<p style="margin-bottom: 10px; font-size: 94%">
|
| 216 |
-
Stable Diffusion v1-5 is the latest version of the state of the art text-to-image model.<br>For faster generation you can try
|
| 217 |
-
<a href="https://app.runwayml.com/ai-tools/text-to-image"
|
| 218 |
-
style="text-decoration: underline;" target="_blank">text to image tool at Runway.</a>
|
| 219 |
-
</p>
|
| 220 |
-
</div>
|
| 221 |
-
"""
|
| 222 |
-
)
|
| 223 |
-
with gr.Group():
|
| 224 |
-
with gr.Box():
|
| 225 |
-
with gr.Row(elem_id="prompt-container").style(mobile_collapse=False, equal_height=True):
|
| 226 |
-
text = gr.Textbox(
|
| 227 |
-
label="Enter your prompt",
|
| 228 |
-
show_label=False,
|
| 229 |
-
max_lines=1,
|
| 230 |
-
placeholder="Enter your prompt",
|
| 231 |
-
elem_id="prompt-text-input",
|
| 232 |
-
).style(
|
| 233 |
-
border=(True, False, True, True),
|
| 234 |
-
rounded=(True, False, False, True),
|
| 235 |
-
container=False,
|
| 236 |
-
)
|
| 237 |
-
btn = gr.Button("Generate image").style(
|
| 238 |
-
margin=False,
|
| 239 |
-
rounded=(False, True, True, False),
|
| 240 |
-
full_width=False,
|
| 241 |
-
)
|
| 242 |
-
|
| 243 |
-
gallery = gr.Gallery(
|
| 244 |
-
label="Generated images", show_label=False, elem_id="gallery"
|
| 245 |
-
).style(grid=[2], height="auto")
|
| 246 |
-
|
| 247 |
-
with gr.Group(elem_id="container-advanced-btns"):
|
| 248 |
-
advanced_button = gr.Button("Advanced options", elem_id="advanced-btn")
|
| 249 |
-
with gr.Group(elem_id="share-btn-container"):
|
| 250 |
-
community_icon = gr.HTML(community_icon_html)
|
| 251 |
-
loading_icon = gr.HTML(loading_icon_html)
|
| 252 |
-
share_button = gr.Button("Share to community", elem_id="share-btn")
|
| 253 |
-
|
| 254 |
-
with gr.Row(elem_id="advanced-options"):
|
| 255 |
-
gr.Markdown("Advanced settings are temporarily unavailable")
|
| 256 |
-
samples = gr.Slider(label="Images", minimum=1, maximum=4, value=4, step=1)
|
| 257 |
-
steps = gr.Slider(label="Steps", minimum=1, maximum=50, value=45, step=1)
|
| 258 |
-
scale = gr.Slider(
|
| 259 |
-
label="Guidance Scale", minimum=0, maximum=50, value=7.5, step=0.1
|
| 260 |
-
)
|
| 261 |
-
seed = gr.Slider(
|
| 262 |
-
label="Seed",
|
| 263 |
-
minimum=0,
|
| 264 |
-
maximum=2147483647,
|
| 265 |
-
step=1,
|
| 266 |
-
randomize=True,
|
| 267 |
-
)
|
| 268 |
-
|
| 269 |
-
ex = gr.Examples(examples=examples, fn=infer, inputs=text, outputs=[gallery], cache_examples=True, postprocess=False)
|
| 270 |
-
ex.dataset.headers = [""]
|
| 271 |
-
|
| 272 |
-
text.submit(infer, inputs=text, outputs=[gallery], postprocess=False)
|
| 273 |
-
btn.click(infer, inputs=text, outputs=[gallery], postprocess=False)
|
| 274 |
-
|
| 275 |
-
advanced_button.click(
|
| 276 |
-
None,
|
| 277 |
-
[],
|
| 278 |
-
text,
|
| 279 |
-
_js="""
|
| 280 |
-
() => {
|
| 281 |
-
const options = document.querySelector("body > gradio-app").querySelector("#advanced-options");
|
| 282 |
-
options.style.display = ["none", ""].includes(options.style.display) ? "flex" : "none";
|
| 283 |
-
}""",
|
| 284 |
-
)
|
| 285 |
-
share_button.click(
|
| 286 |
-
None,
|
| 287 |
-
[],
|
| 288 |
-
[],
|
| 289 |
-
_js=share_js,
|
| 290 |
-
)
|
| 291 |
-
gr.HTML(
|
| 292 |
-
"""
|
| 293 |
-
<div class="footer">
|
| 294 |
-
<p>Model by <a href="https://huggingface.co/CompVis" style="text-decoration: underline;" target="_blank">CompVis</a> and <a href="https://runwayml.com/" style="text-decoration: underline;" target="_blank">Runway</a> supported by <a href="https://huggingface.co/stabilityai" style="text-decoration: underline;" target="_blank">Stability AI</a> - backend running JAX on TPUs due to generous support of <a href="https://sites.research.google/trc/about/" style="text-decoration: underline;" target="_blank">Google TRC program</a> - Gradio Demo by 🤗 Hugging Face
|
| 295 |
-
</p>
|
| 296 |
-
</div>
|
| 297 |
-
<div class="acknowledgments">
|
| 298 |
-
<p><h4>LICENSE</h4>
|
| 299 |
-
The model is licensed with a <a href="https://huggingface.co/spaces/CompVis/stable-diffusion-license" style="text-decoration: underline;" target="_blank">CreativeML Open RAIL-M</a> license. The authors claim no rights on the outputs you generate, you are free to use them and are accountable for their use which must not go against the provisions set in this license. The license forbids you from sharing any content that violates any laws, produce any harm to a person, disseminate any personal information that would be meant for harm, spread misinformation and target vulnerable groups. For the full list of restrictions please <a href="https://huggingface.co/spaces/CompVis/stable-diffusion-license" target="_blank" style="text-decoration: underline;" target="_blank">read the license</a></p>
|
| 300 |
-
<p><h4>Biases and content acknowledgment</h4>
|
| 301 |
-
Despite how impressive being able to turn text into image is, beware to the fact that this model may output content that reinforces or exacerbates societal biases, as well as realistic faces, pornography and violence. The model was trained on the <a href="https://laion.ai/blog/laion-5b/" style="text-decoration: underline;" target="_blank">LAION-5B dataset</a>, which scraped non-curated image-text-pairs from the internet (the exception being the removal of illegal content) and is meant for research purposes. You can read more in the <a href="https://huggingface.co/runwayml/stable-diffusion-v1-5" style="text-decoration: underline;" target="_blank">model card</a></p>
|
| 302 |
-
</div>
|
| 303 |
-
"""
|
| 304 |
-
)
|
| 305 |
-
|
| 306 |
-
block.queue(concurrency_count=40, max_size=20).launch(max_threads=150)
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
import os
|
| 2 |
+
os.system(f"git lfs install")
|
| 3 |
+
os.system(f"git clone -b v2.2 https://github.com/camenduru/stable-diffusion-webui /home/ichelp/source/stable-diffusion-webui")
|
| 4 |
+
os.chdir(f"/home/ichelp/source/stable-diffusion-webui")
|
| 5 |
|
| 6 |
+
os.system(f"git clone https://huggingface.co/embed/negative /home/ichelp/source/stable-diffusion-webui/embeddings/negative")
|
| 7 |
+
os.system(f"git clone https://huggingface.co/embed/lora /home/ichelp/source/stable-diffusion-webui/models/Lora/positive")
|
| 8 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth -d /home/ichelp/source/stable-diffusion-webui/models/ESRGAN -o 4x-UltraSharp.pth")
|
| 9 |
+
os.system(f"wget https://raw.githubusercontent.com/camenduru/stable-diffusion-webui-scripts/main/run_n_times.py -O /home/ichelp/source/stable-diffusion-webui/scripts/run_n_times.py")
|
| 10 |
+
os.system(f"git clone https://github.com/deforum-art/deforum-for-automatic1111-webui /home/ichelp/source/stable-diffusion-webui/extensions/deforum-for-automatic1111-webui")
|
| 11 |
+
# os.system(f"git clone https://github.com/AlUlkesh/stable-diffusion-webui-images-browser /home/ichelp/source/stable-diffusion-webui/extensions/stable-diffusion-webui-images-browser")
|
| 12 |
+
os.system(f"git clone https://github.com/zanllp/sd-webui-infinite-image-browsing /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-infinite-image-browsing")
|
| 13 |
+
os.system(f"git clone https://github.com/camenduru/stable-diffusion-webui-huggingface /home/ichelp/source/stable-diffusion-webui/extensions/stable-diffusion-webui-huggingface")
|
| 14 |
+
os.system(f"git clone https://github.com/camenduru/sd-civitai-browser /home/ichelp/source/stable-diffusion-webui/extensions/sd-civitai-browser")
|
| 15 |
+
os.system(f"git clone https://github.com/kohya-ss/sd-webui-additional-networks /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-additional-networks")
|
| 16 |
+
os.system(f"git clone https://github.com/Mikubill/sd-webui-controlnet /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet")
|
| 17 |
+
os.system(f"git clone https://github.com/fkunn1326/openpose-editor /home/ichelp/source/stable-diffusion-webui/extensions/openpose-editor")
|
| 18 |
+
os.system(f"git clone https://github.com/jexom/sd-webui-depth-lib /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-depth-lib")
|
| 19 |
+
os.system(f"git clone https://github.com/hnmr293/posex /home/ichelp/source/stable-diffusion-webui/extensions/posex")
|
| 20 |
+
# os.system(f"git clone https://github.com/nonnonstop/sd-webui-3d-open-pose-editor /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-3d-open-pose-editor")
|
| 21 |
+
os.system(f"git clone https://github.com/camenduru/sd-webui-tunnels /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-tunnels")
|
| 22 |
+
os.system(f"git clone https://github.com/etherealxx/batchlinks-webui /home/ichelp/source/stable-diffusion-webui/extensions/batchlinks-webui")
|
| 23 |
+
os.system(f"git clone https://github.com/catppuccin/stable-diffusion-webui /home/ichelp/source/stable-diffusion-webui/extensions/stable-diffusion-webui-catppuccin")
|
| 24 |
+
os.system(f"git clone https://github.com/camenduru/a1111-sd-webui-locon /home/ichelp/source/stable-diffusion-webui/extensions/a1111-sd-webui-locon")
|
| 25 |
+
os.system(f"git clone https://github.com/AUTOMATIC1111/stable-diffusion-webui-rembg /home/ichelp/source/stable-diffusion-webui/extensions/stable-diffusion-webui-rembg")
|
| 26 |
+
os.system(f"git clone https://github.com/ashen-sensored/stable-diffusion-webui-two-shot /home/ichelp/source/stable-diffusion-webui/extensions/stable-diffusion-webui-two-shot")
|
| 27 |
+
# os.system(f"git clone https://github.com/camenduru/sd_webui_stealth_pnginfo /home/ichelp/source/stable-diffusion-webui/extensions/sd_webui_stealth_pnginfo")
|
| 28 |
+
# os.system(f"git clone -b dev https://github.com/camenduru/sd-webui-aspect-ratio-helper /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-aspect-ratio-helper")
|
| 29 |
+
os.system(f"git clone -b dev https://github.com/camenduru/SadTalker /home/ichelp/source/stable-diffusion-webui/extensions/SadTalker")
|
| 30 |
+
os.system(f"git -C /home/ichelp/source/stable-diffusion-webui/extensions/SadTalker/checkpoints clone https://huggingface.co/camenduru/SadTalker")
|
| 31 |
|
| 32 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_ip2p_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11e_sd15_ip2p_fp16.safetensors")
|
| 33 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11e_sd15_shuffle_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11e_sd15_shuffle_fp16.safetensors")
|
| 34 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_canny_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_canny_fp16.safetensors")
|
| 35 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1p_sd15_depth_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11f1p_sd15_depth_fp16.safetensors")
|
| 36 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_inpaint_fp16.safetensors")
|
| 37 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_lineart_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_lineart_fp16.safetensors")
|
| 38 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_mlsd_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_mlsd_fp16.safetensors")
|
| 39 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_normalbae_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_normalbae_fp16.safetensors")
|
| 40 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_openpose_fp16.safetensors")
|
| 41 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_scribble_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_scribble_fp16.safetensors")
|
| 42 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_seg_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_seg_fp16.safetensors")
|
| 43 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_softedge_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_softedge_fp16.safetensors")
|
| 44 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15s2_lineart_anime_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15s2_lineart_anime_fp16.safetensors")
|
| 45 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11f1e_sd15_tile_fp16.safetensors -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11f1e_sd15_tile_fp16.safetensors")
|
| 46 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_ip2p_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11e_sd15_ip2p_fp16.yaml")
|
| 47 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11e_sd15_shuffle_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11e_sd15_shuffle_fp16.yaml")
|
| 48 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_canny_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_canny_fp16.yaml")
|
| 49 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1p_sd15_depth_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11f1p_sd15_depth_fp16.yaml")
|
| 50 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_inpaint_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_inpaint_fp16.yaml")
|
| 51 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_lineart_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_lineart_fp16.yaml")
|
| 52 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_mlsd_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_mlsd_fp16.yaml")
|
| 53 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_normalbae_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_normalbae_fp16.yaml")
|
| 54 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_openpose_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_openpose_fp16.yaml")
|
| 55 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_scribble_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_scribble_fp16.yaml")
|
| 56 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_seg_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_seg_fp16.yaml")
|
| 57 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15_softedge_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15_softedge_fp16.yaml")
|
| 58 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11p_sd15s2_lineart_anime_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11p_sd15s2_lineart_anime_fp16.yaml")
|
| 59 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/raw/main/control_v11f1e_sd15_tile_fp16.yaml -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o control_v11f1e_sd15_tile_fp16.yaml")
|
| 60 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_style_sd14v1.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_style_sd14v1.pth")
|
| 61 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_sketch_sd14v1.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_sketch_sd14v1.pth")
|
| 62 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_seg_sd14v1.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_seg_sd14v1.pth")
|
| 63 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_openpose_sd14v1.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_openpose_sd14v1.pth")
|
| 64 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_keypose_sd14v1.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_keypose_sd14v1.pth")
|
| 65 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd14v1.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_depth_sd14v1.pth")
|
| 66 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_color_sd14v1.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_color_sd14v1.pth")
|
| 67 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd14v1.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_canny_sd14v1.pth")
|
| 68 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_canny_sd15v2.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_canny_sd15v2.pth")
|
| 69 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_depth_sd15v2.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_depth_sd15v2.pth")
|
| 70 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_sketch_sd15v2.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_sketch_sd15v2.pth")
|
| 71 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/t2iadapter_zoedepth_sd15v1.pth -d /home/ichelp/source/stable-diffusion-webui/extensions/sd-webui-controlnet/models -o t2iadapter_zoedepth_sd15v1.pth")
|
| 72 |
|
| 73 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/dark-sushi-25d/resolve/main/darkSushi25D25D_v20.safetensors -d /home/ichelp/source/stable-diffusion-webui/models/Stable-diffusion -o darkSushi25D25D_v20.safetensors")
|
| 74 |
+
os.system(f"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.ckpt -d /home/ichelp/source/stable-diffusion-webui/models/Stable-diffusion -o darkSushi25D25D_v20.vae.pt")
|
| 75 |
|
| 76 |
+
os.system(f"sed -i -e 's/\"sd_model_checkpoint\"\,/\"sd_model_checkpoint\,sd_vae\,CLIP_stop_at_last_layers\"\,/g' /home/ichelp/source/stable-diffusion-webui/modules/shared.py")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 77 |
|
| 78 |
+
os.system(f"python launch.py --port 8266 --listen --cors-allow-origins=* --xformers --enable-insecure-extension-access --theme dark --gradio-queue --disable-safe-unpickle")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|