├── LICENSE ├── README.md ├── controlnet_v1.0.json ├── dev └── run.ipynb ├── drive ├── install.ipynb ├── install_run.ipynb ├── run.ipynb └── run_run.ipynb ├── nightly ├── animagine_xl_webui_colab.ipynb ├── animagine_xl_webui_colab_run.ipynb ├── animechangeful_xl_webui_colab.ipynb ├── animechangeful_xl_webui_colab_run.ipynb ├── counterfeit_xl_webui_colab.ipynb ├── counterfeit_xl_webui_colab_run.ipynb ├── crystalclear_xl_webui_colab.ipynb ├── crystalclear_xl_webui_colab_run.ipynb ├── duchaitenaiart_xl_webui_colab.ipynb ├── duchaitenaiart_xl_webui_colab_run.ipynb ├── juggernaut_xl_webui_colab.ipynb ├── juggernaut_xl_webui_colab_run.ipynb ├── rundiffusion_xl_webui_colab.ipynb └── rundiffusion_xl_webui_colab_run.ipynb ├── refiner_v0.9.json ├── refiner_v1.0.json ├── sdxl_v0.9_comfyui_colab.ipynb ├── sdxl_v0.9_comfyui_colab_run.ipynb ├── sdxl_v0.9_webui_colab.ipynb ├── sdxl_v0.9_webui_colab_run.ipynb ├── sdxl_v1.0_autotrain_train_dreambooth_lora_colab.ipynb ├── sdxl_v1.0_autotrain_train_dreambooth_lora_colab_run.ipynb ├── sdxl_v1.0_comfyui_colab.ipynb ├── sdxl_v1.0_comfyui_colab_run.ipynb ├── sdxl_v1.0_controlnet_comfyui_colab.ipynb ├── sdxl_v1.0_controlnet_comfyui_colab_run.ipynb ├── sdxl_v1.0_diffusers_train_dreambooth_lora_colab.ipynb ├── sdxl_v1.0_diffusers_train_dreambooth_lora_colab_run.ipynb ├── sdxl_v1.0_webui_colab.ipynb ├── sdxl_v1.0_webui_colab_run.ipynb ├── sdxl_v1.0_webui_dev_colab.ipynb ├── sdxl_v1.0_webui_dev_colab_run.ipynb └── tost.json /LICENSE: -------------------------------------------------------------------------------- 1 | This is free and unencumbered software released into the public domain. 2 | 3 | Anyone is free to copy, modify, publish, use, compile, sell, or 4 | distribute this software, either in source code form or as a compiled 5 | binary, for any purpose, commercial or non-commercial, and by any 6 | means. 7 | 8 | In jurisdictions that recognize copyright laws, the author or authors 9 | of this software dedicate any and all copyright interest in the 10 | software to the public domain. We make this dedication for the benefit 11 | of the public at large and to the detriment of our heirs and 12 | successors. We intend this dedication to be an overt act of 13 | relinquishment in perpetuity of all present and future rights to this 14 | software under copyright law. 15 | 16 | THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, 17 | EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF 18 | MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. 19 | IN NO EVENT SHALL THE AUTHORS BE LIABLE FOR ANY CLAIM, DAMAGES OR 20 | OTHER LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, 21 | ARISING FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR 22 | OTHER DEALINGS IN THE SOFTWARE. 23 | 24 | For more information, please refer to 25 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | 🐣 Please follow me for new updates https://twitter.com/camenduru
2 | 🔥 Please join our discord server https://discord.gg/k5BwmmvJJU
3 | 🥳 Please join my patreon community https://patreon.com/camenduru
4 | 5 | # 🚦 WIP 🚦 6 | 7 | ## 🦒 Vanilla Colab 8 | 9 | | Colab | Info | Load 10 | | --- | --- | --- | 11 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_controlnet_comfyui_colab.ipynb) | sdxl_v1.0_controlnet_comfyui_colab (1024x1024 model) | `controlnet_v1.0.json` 12 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_webui_colab.ipynb) | sdxl_v1.0_webui_colab (1024x1024 model) | 13 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v0.9_webui_colab.ipynb) | sdxl_v0.9_webui_colab (1024x1024 model) | 14 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_comfyui_colab.ipynb) | sdxl_v1.0_comfyui_colab (1024x1024 model) please use with | `refiner_v1.0.json` 15 | [![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v0.9_comfyui_colab.ipynb) | sdxl_v0.9_comfyui_colab (1024x1024 model) please use with | `refiner_v0.9.json` 16 | 17 | ## 🦒 Drive Colab 18 | 19 | | nightly | Info - Token - Model Page 20 | | --- | --- | 21 | [![Open In Colab](https://user-images.githubusercontent.com/54370274/224839802-95968900-392b-4b30-ad75-aeac13675e1b.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/drive/install.ipynb) | One Time Install & Update 22 | [![Open In Colab](https://user-images.githubusercontent.com/54370274/224839802-95968900-392b-4b30-ad75-aeac13675e1b.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/drive/run.ipynb) | Run 23 | 24 | ## 🦒 Fine-Tuned SDXL Colab 25 | 26 | | nightly | Info - Token - Model Page 27 | | --- | --- | 28 | [![Open In Colab](https://user-images.githubusercontent.com/54370274/224839802-95968900-392b-4b30-ad75-aeac13675e1b.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/animagine_xl_webui_colab.ipynb) | animagine_xl_webui_colab
[Linaqruf/animagine-xl](https://civitai.com/models/122533/animagine-xl) 29 | [![Open In Colab](https://user-images.githubusercontent.com/54370274/224839802-95968900-392b-4b30-ad75-aeac13675e1b.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/animechangeful_xl_webui_colab.ipynb) | animechangeful_xl_webui_colab
[L_A_X/anime-changeful-xl](https://civitai.com/models/118545/anime-changeful-xl) 30 | [![Open In Colab](https://user-images.githubusercontent.com/54370274/224839802-95968900-392b-4b30-ad75-aeac13675e1b.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/counterfeit_xl_webui_colab.ipynb) | counterfeit_xl_webui_colab
[rqdwdw/counterfeitxl](https://civitai.com/models/118406/counterfeitxl) 31 | [![Open In Colab](https://user-images.githubusercontent.com/54370274/224839802-95968900-392b-4b30-ad75-aeac13675e1b.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/crystalclear_xl_webui_colab.ipynb) | crystalclear_xl_webui_colab
[WarAnakin/crystal-clear-xl](https://civitai.com/models/122822/crystal-clear-xl) 32 | [![Open In Colab](https://user-images.githubusercontent.com/54370274/224839802-95968900-392b-4b30-ad75-aeac13675e1b.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/duchaitenaiart_xl_webui_colab.ipynb) | duchaitenaiart_xl_webui_colab
[DucHaiten/duchaiten-aiart-sdxl](https://civitai.com/models/118756/duchaiten-aiart-sdxl) 33 | [![Open In Colab](https://user-images.githubusercontent.com/54370274/224839802-95968900-392b-4b30-ad75-aeac13675e1b.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/juggernaut_xl_webui_colab.ipynb) | juggernaut_xl_webui_colab
[KandooAI/juggernaut-xl](https://civitai.com/models/133005/juggernaut-xl) 34 | [![Open In Colab](https://user-images.githubusercontent.com/54370274/224839802-95968900-392b-4b30-ad75-aeac13675e1b.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/rundiffusion_xl_webui_colab.ipynb) | rundiffusion_xl_webui_colab
[RunDiffusion/rundiffusion-xl](https://civitai.com/models/120964/rundiffusion-xl) 35 | 36 | ## Main Repo 37 | https://github.com/Stability-AI/generative-models
38 | https://github.com/comfyanonymous/ComfyUI
39 | 40 | ## Page 41 | https://stability.ai/blog/sdxl-09-stable-diffusion 42 | 43 | ## Paper 44 | https://arxiv.org/abs//2307.01952 45 | 46 | ## Output 47 | 48 | sdxl_v1.0_controlnet_comfyui_colab 49 | ![Screenshot 2023-08-19 163653](https://github.com/camenduru/sdxl-colab/assets/54370274/c73c00be-2026-488d-a05d-22e5294b57c1) 50 | 51 | sdxl_v0.9_comfyui_colab 52 | ![Screenshot 2023-07-07 020217](https://github.com/camenduru/sdxl-colab/assets/54370274/05317f2c-fb45-4aac-9bb3-203c15944ba3) 53 | 54 | sdxl_v1.0_webui_colab 55 | ![F1_U90kXoAQ38Ny](https://github.com/camenduru/sdxl-colab/assets/54370274/73a9dafe-d782-4b1c-ae63-1f67580b9abd) 56 | -------------------------------------------------------------------------------- /controlnet_v1.0.json: -------------------------------------------------------------------------------- 1 | { 2 | "last_node_id": 17, 3 | "last_link_id": 23, 4 | "nodes": [ 5 | { 6 | "id": 16, 7 | "type": "ImageScaleToTotalPixels", 8 | "pos": [ 9 | -73, 10 | -96 11 | ], 12 | "size": { 13 | "0": 315, 14 | "1": 82 15 | }, 16 | "flags": {}, 17 | "order": 6, 18 | "mode": 0, 19 | "inputs": [ 20 | { 21 | "name": "image", 22 | "type": "IMAGE", 23 | "link": 21 24 | } 25 | ], 26 | "outputs": [ 27 | { 28 | "name": "IMAGE", 29 | "type": "IMAGE", 30 | "links": [ 31 | 22 32 | ], 33 | "shape": 3, 34 | "slot_index": 0 35 | } 36 | ], 37 | "properties": { 38 | "Node name for S&R": "ImageScaleToTotalPixels" 39 | }, 40 | "widgets_values": [ 41 | "nearest-exact", 42 | 1 43 | ] 44 | }, 45 | { 46 | "id": 4, 47 | "type": "CheckpointLoaderSimple", 48 | "pos": [ 49 | -80, 50 | 34 51 | ], 52 | "size": { 53 | "0": 315, 54 | "1": 98 55 | }, 56 | "flags": {}, 57 | "order": 0, 58 | "mode": 0, 59 | "outputs": [ 60 | { 61 | "name": "MODEL", 62 | "type": "MODEL", 63 | "links": [ 64 | 18 65 | ], 66 | "slot_index": 0 67 | }, 68 | { 69 | "name": "CLIP", 70 | "type": "CLIP", 71 | "links": [ 72 | 3, 73 | 5 74 | ], 75 | "slot_index": 1 76 | }, 77 | { 78 | "name": "VAE", 79 | "type": "VAE", 80 | "links": [ 81 | 8, 82 | 19 83 | ], 84 | "slot_index": 2 85 | } 86 | ], 87 | "properties": { 88 | "Node name for S&R": "CheckpointLoaderSimple" 89 | }, 90 | "widgets_values": [ 91 | "sd_xl_base_1.0.safetensors" 92 | ] 93 | }, 94 | { 95 | "id": 8, 96 | "type": "VAEDecode", 97 | "pos": [ 98 | 1216, 99 | -109 100 | ], 101 | "size": { 102 | "0": 210, 103 | "1": 46 104 | }, 105 | "flags": {}, 106 | "order": 11, 107 | "mode": 0, 108 | "inputs": [ 109 | { 110 | "name": "samples", 111 | "type": "LATENT", 112 | "link": 17 113 | }, 114 | { 115 | "name": "vae", 116 | "type": "VAE", 117 | "link": 8 118 | } 119 | ], 120 | "outputs": [ 121 | { 122 | "name": "IMAGE", 123 | "type": "IMAGE", 124 | "links": [ 125 | 9 126 | ], 127 | "slot_index": 0 128 | } 129 | ], 130 | "properties": { 131 | "Node name for S&R": "VAEDecode" 132 | } 133 | }, 134 | { 135 | "id": 15, 136 | "type": "VAEEncode", 137 | "pos": [ 138 | 370, 139 | -93 140 | ], 141 | "size": { 142 | "0": 210, 143 | "1": 46 144 | }, 145 | "flags": {}, 146 | "order": 9, 147 | "mode": 0, 148 | "inputs": [ 149 | { 150 | "name": "pixels", 151 | "type": "IMAGE", 152 | "link": 22, 153 | "slot_index": 0 154 | }, 155 | { 156 | "name": "vae", 157 | "type": "VAE", 158 | "link": 19 159 | } 160 | ], 161 | "outputs": [ 162 | { 163 | "name": "LATENT", 164 | "type": "LATENT", 165 | "links": [ 166 | 20 167 | ], 168 | "shape": 3, 169 | "slot_index": 0 170 | } 171 | ], 172 | "properties": { 173 | "Node name for S&R": "VAEEncode" 174 | } 175 | }, 176 | { 177 | "id": 10, 178 | "type": "ControlNetLoader", 179 | "pos": [ 180 | 298, 181 | 547 182 | ], 183 | "size": [ 184 | 363, 185 | 77 186 | ], 187 | "flags": {}, 188 | "order": 1, 189 | "mode": 0, 190 | "outputs": [ 191 | { 192 | "name": "CONTROL_NET", 193 | "type": "CONTROL_NET", 194 | "links": [ 195 | 10 196 | ], 197 | "shape": 3, 198 | "slot_index": 0 199 | } 200 | ], 201 | "properties": { 202 | "Node name for S&R": "ControlNetLoader" 203 | }, 204 | "widgets_values": [ 205 | "control-lora-canny-rank256.safetensors" 206 | ] 207 | }, 208 | { 209 | "id": 14, 210 | "type": "KSamplerAdvanced", 211 | "pos": [ 212 | 845, 213 | -109 214 | ], 215 | "size": { 216 | "0": 315, 217 | "1": 334 218 | }, 219 | "flags": {}, 220 | "order": 10, 221 | "mode": 0, 222 | "inputs": [ 223 | { 224 | "name": "model", 225 | "type": "MODEL", 226 | "link": 18 227 | }, 228 | { 229 | "name": "positive", 230 | "type": "CONDITIONING", 231 | "link": 15 232 | }, 233 | { 234 | "name": "negative", 235 | "type": "CONDITIONING", 236 | "link": 16 237 | }, 238 | { 239 | "name": "latent_image", 240 | "type": "LATENT", 241 | "link": 20 242 | } 243 | ], 244 | "outputs": [ 245 | { 246 | "name": "LATENT", 247 | "type": "LATENT", 248 | "links": [ 249 | 17 250 | ], 251 | "shape": 3, 252 | "slot_index": 0 253 | } 254 | ], 255 | "properties": { 256 | "Node name for S&R": "KSamplerAdvanced" 257 | }, 258 | "widgets_values": [ 259 | "enable", 260 | 718904754138180, 261 | "randomize", 262 | 20, 263 | 8, 264 | "euler_ancestral", 265 | "normal", 266 | 0, 267 | 10000, 268 | "disable" 269 | ] 270 | }, 271 | { 272 | "id": 11, 273 | "type": "ControlNetApplyAdvanced", 274 | "pos": [ 275 | 809, 276 | 320 277 | ], 278 | "size": { 279 | "0": 315, 280 | "1": 166 281 | }, 282 | "flags": {}, 283 | "order": 7, 284 | "mode": 0, 285 | "inputs": [ 286 | { 287 | "name": "positive", 288 | "type": "CONDITIONING", 289 | "link": 11 290 | }, 291 | { 292 | "name": "negative", 293 | "type": "CONDITIONING", 294 | "link": 12 295 | }, 296 | { 297 | "name": "control_net", 298 | "type": "CONTROL_NET", 299 | "link": 10 300 | }, 301 | { 302 | "name": "image", 303 | "type": "IMAGE", 304 | "link": 14 305 | } 306 | ], 307 | "outputs": [ 308 | { 309 | "name": "positive", 310 | "type": "CONDITIONING", 311 | "links": [ 312 | 15 313 | ], 314 | "shape": 3, 315 | "slot_index": 0 316 | }, 317 | { 318 | "name": "negative", 319 | "type": "CONDITIONING", 320 | "links": [ 321 | 16 322 | ], 323 | "shape": 3, 324 | "slot_index": 1 325 | } 326 | ], 327 | "properties": { 328 | "Node name for S&R": "ControlNetApplyAdvanced" 329 | }, 330 | "widgets_values": [ 331 | 1, 332 | 0, 333 | 1 334 | ] 335 | }, 336 | { 337 | "id": 6, 338 | "type": "CLIPTextEncode", 339 | "pos": [ 340 | 320, 341 | 50 342 | ], 343 | "size": { 344 | "0": 422.84503173828125, 345 | "1": 164.31304931640625 346 | }, 347 | "flags": {}, 348 | "order": 3, 349 | "mode": 0, 350 | "inputs": [ 351 | { 352 | "name": "clip", 353 | "type": "CLIP", 354 | "link": 3 355 | } 356 | ], 357 | "outputs": [ 358 | { 359 | "name": "CONDITIONING", 360 | "type": "CONDITIONING", 361 | "links": [ 362 | 11 363 | ], 364 | "slot_index": 0 365 | } 366 | ], 367 | "properties": { 368 | "Node name for S&R": "CLIPTextEncode" 369 | }, 370 | "widgets_values": [ 371 | "cute anime cat" 372 | ] 373 | }, 374 | { 375 | "id": 7, 376 | "type": "CLIPTextEncode", 377 | "pos": [ 378 | 317, 379 | 271 380 | ], 381 | "size": { 382 | "0": 425.27801513671875, 383 | "1": 180.6060791015625 384 | }, 385 | "flags": {}, 386 | "order": 4, 387 | "mode": 0, 388 | "inputs": [ 389 | { 390 | "name": "clip", 391 | "type": "CLIP", 392 | "link": 5 393 | } 394 | ], 395 | "outputs": [ 396 | { 397 | "name": "CONDITIONING", 398 | "type": "CONDITIONING", 399 | "links": [ 400 | 12 401 | ], 402 | "slot_index": 0 403 | } 404 | ], 405 | "properties": { 406 | "Node name for S&R": "CLIPTextEncode" 407 | }, 408 | "widgets_values": [ 409 | "text, watermark" 410 | ] 411 | }, 412 | { 413 | "id": 12, 414 | "type": "Canny", 415 | "pos": [ 416 | 306, 417 | 685 418 | ], 419 | "size": { 420 | "0": 315, 421 | "1": 82 422 | }, 423 | "flags": {}, 424 | "order": 5, 425 | "mode": 0, 426 | "inputs": [ 427 | { 428 | "name": "image", 429 | "type": "IMAGE", 430 | "link": 13 431 | } 432 | ], 433 | "outputs": [ 434 | { 435 | "name": "IMAGE", 436 | "type": "IMAGE", 437 | "links": [ 438 | 14, 439 | 23 440 | ], 441 | "shape": 3, 442 | "slot_index": 0 443 | } 444 | ], 445 | "properties": { 446 | "Node name for S&R": "Canny" 447 | }, 448 | "widgets_values": [ 449 | 0.19999999999999984, 450 | 0.7999999999999998 451 | ] 452 | }, 453 | { 454 | "id": 13, 455 | "type": "LoadImage", 456 | "pos": [ 457 | -109, 458 | 254 459 | ], 460 | "size": [ 461 | 376.09998474121096, 462 | 400.5000061035156 463 | ], 464 | "flags": {}, 465 | "order": 2, 466 | "mode": 0, 467 | "outputs": [ 468 | { 469 | "name": "IMAGE", 470 | "type": "IMAGE", 471 | "links": [ 472 | 13, 473 | 21 474 | ], 475 | "shape": 3, 476 | "slot_index": 0 477 | }, 478 | { 479 | "name": "MASK", 480 | "type": "MASK", 481 | "links": null, 482 | "shape": 3 483 | } 484 | ], 485 | "properties": { 486 | "Node name for S&R": "LoadImage" 487 | }, 488 | "widgets_values": [ 489 | "image (1).png", 490 | "image" 491 | ] 492 | }, 493 | { 494 | "id": 17, 495 | "type": "PreviewImage", 496 | "pos": [ 497 | 657, 498 | 667 499 | ], 500 | "size": [ 501 | 283.89998474121103, 502 | 249.5000061035156 503 | ], 504 | "flags": {}, 505 | "order": 8, 506 | "mode": 0, 507 | "inputs": [ 508 | { 509 | "name": "images", 510 | "type": "IMAGE", 511 | "link": 23 512 | } 513 | ], 514 | "properties": { 515 | "Node name for S&R": "PreviewImage" 516 | } 517 | }, 518 | { 519 | "id": 9, 520 | "type": "SaveImage", 521 | "pos": [ 522 | 1222, 523 | 14 524 | ], 525 | "size": [ 526 | 726.8999786376953, 527 | 611.3000061035157 528 | ], 529 | "flags": {}, 530 | "order": 12, 531 | "mode": 0, 532 | "inputs": [ 533 | { 534 | "name": "images", 535 | "type": "IMAGE", 536 | "link": 9 537 | } 538 | ], 539 | "properties": {}, 540 | "widgets_values": [ 541 | "ComfyUI" 542 | ] 543 | } 544 | ], 545 | "links": [ 546 | [ 547 | 3, 548 | 4, 549 | 1, 550 | 6, 551 | 0, 552 | "CLIP" 553 | ], 554 | [ 555 | 5, 556 | 4, 557 | 1, 558 | 7, 559 | 0, 560 | "CLIP" 561 | ], 562 | [ 563 | 8, 564 | 4, 565 | 2, 566 | 8, 567 | 1, 568 | "VAE" 569 | ], 570 | [ 571 | 9, 572 | 8, 573 | 0, 574 | 9, 575 | 0, 576 | "IMAGE" 577 | ], 578 | [ 579 | 10, 580 | 10, 581 | 0, 582 | 11, 583 | 2, 584 | "CONTROL_NET" 585 | ], 586 | [ 587 | 11, 588 | 6, 589 | 0, 590 | 11, 591 | 0, 592 | "CONDITIONING" 593 | ], 594 | [ 595 | 12, 596 | 7, 597 | 0, 598 | 11, 599 | 1, 600 | "CONDITIONING" 601 | ], 602 | [ 603 | 13, 604 | 13, 605 | 0, 606 | 12, 607 | 0, 608 | "IMAGE" 609 | ], 610 | [ 611 | 14, 612 | 12, 613 | 0, 614 | 11, 615 | 3, 616 | "IMAGE" 617 | ], 618 | [ 619 | 15, 620 | 11, 621 | 0, 622 | 14, 623 | 1, 624 | "CONDITIONING" 625 | ], 626 | [ 627 | 16, 628 | 11, 629 | 1, 630 | 14, 631 | 2, 632 | "CONDITIONING" 633 | ], 634 | [ 635 | 17, 636 | 14, 637 | 0, 638 | 8, 639 | 0, 640 | "LATENT" 641 | ], 642 | [ 643 | 18, 644 | 4, 645 | 0, 646 | 14, 647 | 0, 648 | "MODEL" 649 | ], 650 | [ 651 | 19, 652 | 4, 653 | 2, 654 | 15, 655 | 1, 656 | "VAE" 657 | ], 658 | [ 659 | 20, 660 | 15, 661 | 0, 662 | 14, 663 | 3, 664 | "LATENT" 665 | ], 666 | [ 667 | 21, 668 | 13, 669 | 0, 670 | 16, 671 | 0, 672 | "IMAGE" 673 | ], 674 | [ 675 | 22, 676 | 16, 677 | 0, 678 | 15, 679 | 0, 680 | "IMAGE" 681 | ], 682 | [ 683 | 23, 684 | 12, 685 | 0, 686 | 17, 687 | 0, 688 | "IMAGE" 689 | ] 690 | ], 691 | "groups": [], 692 | "config": {}, 693 | "extra": {}, 694 | "version": 0.4 695 | } -------------------------------------------------------------------------------- /dev/run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "code", 5 | "execution_count": 2, 6 | "metadata": {}, 7 | "outputs": [], 8 | "source": [ 9 | "import os\n", 10 | "import json\n", 11 | "\n", 12 | "directory_path = 'C://Users//PC//Desktop//sdxl-colab//nightly'\n", 13 | "file_list = os.listdir(directory_path)\n", 14 | "\n", 15 | "for filename in file_list:\n", 16 | " if filename.endswith('.ipynb'):\n", 17 | " new_filename = filename.replace('.ipynb', '_run.ipynb')\n", 18 | " notebook_content = {\n", 19 | " \"cells\": [\n", 20 | " {\n", 21 | " \"attachments\": {},\n", 22 | " \"cell_type\": \"markdown\",\n", 23 | " \"metadata\": {\"id\": \"view-in-github\"},\n", 24 | " \"source\": [\n", 25 | " f\"[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/{new_filename})\"\n", 26 | " ],\n", 27 | " },\n", 28 | " {\n", 29 | " \"cell_type\": \"code\",\n", 30 | " \"execution_count\": None,\n", 31 | " \"metadata\": {},\n", 32 | " \"outputs\": [],\n", 33 | " \"source\": [\n", 34 | " \"%cd /content\\n\",\n", 35 | " \"import urllib, requests\\n\",\n", 36 | " \"from notebook import notebookapp\\n\",\n", 37 | " \"name = requests.get(f\\\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\\\").json()[0][\\\"name\\\"].replace(\\\"_run\\\", \\\"\\\")\\n\",\n", 38 | " \"url = '/'.join(urllib.parse.unquote(requests.get(f\\\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\\\").json()[0][\\\"path\\\"].split(\\\"=\\\", 1)[1]).split(\\\"/\\\")).replace(\\\"/blob/\\\", \\\"/\\\").replace(\\\"github.com\\\", \\\"raw.githubusercontent.com\\\").replace(\\\"_run\\\", \\\"\\\")\\n\",\n", 39 | " \"!wget {url} -O {name}\\n\",\n", 40 | " \"%run {name}\"\n", 41 | " ],\n", 42 | " },\n", 43 | " ],\n", 44 | " \"metadata\": {\n", 45 | " \"accelerator\": \"GPU\",\n", 46 | " \"colab\": {\n", 47 | " \"collapsed_sections\": [],\n", 48 | " \"private_outputs\": True,\n", 49 | " \"provenance\": [],\n", 50 | " },\n", 51 | " \"gpuClass\": \"standard\",\n", 52 | " \"kernelspec\": {\n", 53 | " \"display_name\": \"Python 3\",\n", 54 | " \"language\": \"python\",\n", 55 | " \"name\": \"python3\",\n", 56 | " },\n", 57 | " \"language_info\": {\n", 58 | " \"name\": \"python\",\n", 59 | " \"version\": \"3.10.8\",\n", 60 | " },\n", 61 | " },\n", 62 | " \"nbformat\": 4,\n", 63 | " \"nbformat_minor\": 0,\n", 64 | "}\n", 65 | " \n", 66 | " with open(os.path.join(directory_path, new_filename), 'w') as notebook_file:\n", 67 | " json.dump(notebook_content, notebook_file, indent=2)" 68 | ] 69 | } 70 | ], 71 | "metadata": { 72 | "kernelspec": { 73 | "display_name": "Python 3", 74 | "language": "python", 75 | "name": "python3" 76 | }, 77 | "language_info": { 78 | "codemirror_mode": { 79 | "name": "ipython", 80 | "version": 3 81 | }, 82 | "file_extension": ".py", 83 | "mimetype": "text/x-python", 84 | "name": "python", 85 | "nbconvert_exporter": "python", 86 | "pygments_lexer": "ipython3", 87 | "version": "3.11.5" 88 | }, 89 | "orig_nbformat": 4 90 | }, 91 | "nbformat": 4, 92 | "nbformat_minor": 2 93 | } 94 | -------------------------------------------------------------------------------- /drive/install.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/drive/install.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "from google.colab import drive\n", 22 | "drive.mount('/content/drive')\n", 23 | "\n", 24 | "%env PYTHONDONTWRITEBYTECODE=1\n", 25 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 26 | "!apt-get -y install -qq aria2\n", 27 | "\n", 28 | "!git clone -b v2.6 https://dagshub.com/camenduru/ui /content/drive/MyDrive/ui-colab/ui\n", 29 | "!git -C /content/drive/MyDrive/ui-colab/ui checkout -f v2.6\n", 30 | "!git -C /content/drive/MyDrive/ui-colab/ui reset --hard\n", 31 | "!git -C /content/drive/MyDrive/ui-colab/ui pull origin v2.6\n", 32 | "\n", 33 | "!rm -rf /content/drive/MyDrive/ui-colab/ui/extensions/deforum\n", 34 | "!git clone https://dagshub.com/camenduru/deforum /content/drive/MyDrive/ui-colab/ui/extensions/deforum\n", 35 | "!rm -rf /content/drive/MyDrive/ui-colab/ui/extensions/control\n", 36 | "!git clone https://dagshub.com/camenduru/control /content/drive/MyDrive/ui-colab/ui/extensions/control\n", 37 | "\n", 38 | "%cd /content/drive/MyDrive/ui-colab/ui\n", 39 | "\n", 40 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_base_1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors -d /content/drive/MyDrive/ui-colab/ui/models/Stable-diffusion -o sd_xl_base_1.0.safetensors\n", 41 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors -d /content/drive/MyDrive/ui-colab/ui/models/Stable-diffusion -o sd_xl_refiner_1.0.safetensors\n", 42 | "\n", 43 | "!sed -i -e 's/ start()/ #start()/g' /content/drive/MyDrive/ui-colab/ui/launch.py\n", 44 | "!sed -i -e 's/checkout {commithash}/checkout --force {commithash}/g' /content/drive/MyDrive/ui-colab/ui/modules/launch_utils.py\n", 45 | "\n", 46 | "%cd /content/drive/MyDrive/ui-colab/ui\n", 47 | "!python launch.py --skip-torch-cuda-test\n", 48 | "\n", 49 | "print(\"Installed\")" 50 | ] 51 | } 52 | ], 53 | "metadata": { 54 | "colab": { 55 | "collapsed_sections": [], 56 | "private_outputs": true, 57 | "provenance": [] 58 | }, 59 | "gpuClass": "standard", 60 | "kernelspec": { 61 | "display_name": "Python 3", 62 | "name": "python3" 63 | }, 64 | "language_info": { 65 | "name": "python" 66 | } 67 | }, 68 | "nbformat": 4, 69 | "nbformat_minor": 0 70 | } 71 | -------------------------------------------------------------------------------- /drive/install_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/drive/install_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /drive/run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/drive/run.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "from google.colab import drive\n", 22 | "drive.mount('/content/drive')\n", 23 | "\n", 24 | "%env PYTHONDONTWRITEBYTECODE=1\n", 25 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 26 | "!apt -y install -qq aria2\n", 27 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 28 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 29 | "\n", 30 | "%cd /content/drive/MyDrive/ui-colab/ui\n", 31 | "\n", 32 | "!git reset --hard\n", 33 | "!git -C /content/drive/MyDrive/ui-colab/ui/repositories/stable-diffusion-stability-ai reset --hard\n", 34 | "!git -C /content/drive/MyDrive/ui-colab/ui/extensions/control reset --hard\n", 35 | "!git -C /content/drive/MyDrive/ui-colab/ui/extensions/deforum reset --hard\n", 36 | "\n", 37 | "!sed -i -e 's/checkout {commithash}/checkout --force {commithash}/g' /content/drive/MyDrive/ui-colab/ui/modules/launch_utils.py\n", 38 | "!sed -i -e 's/\\.sd-webui-controlnet/\\.control/g' /content/drive/MyDrive/ui-colab/ui/extensions/deforum/scripts/deforum_helpers/deforum_controlnet.py\n", 39 | "\n", 40 | "# Sunday, September 3, 2023 - We have a new update. Please use the \"One Time Install & Update\" Colab.\n", 41 | "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --share" 42 | ] 43 | } 44 | ], 45 | "metadata": { 46 | "accelerator": "GPU", 47 | "colab": { 48 | "collapsed_sections": [], 49 | "private_outputs": true, 50 | "provenance": [] 51 | }, 52 | "gpuClass": "standard", 53 | "kernelspec": { 54 | "display_name": "Python 3", 55 | "name": "python3" 56 | }, 57 | "language_info": { 58 | "name": "python" 59 | } 60 | }, 61 | "nbformat": 4, 62 | "nbformat_minor": 0 63 | } 64 | -------------------------------------------------------------------------------- /drive/run_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/drive/run_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /nightly/animagine_xl_webui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/animagine_xl_webui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 22 | "!apt -y install -qq aria2\n", 23 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 24 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 25 | "!git clone -b v2.6 https://dagshub.com/camenduru/ui\n", 26 | "!git clone https://dagshub.com/camenduru/control /content/ui/extensions/control\n", 27 | "!git clone https://dagshub.com/camenduru/deforum /content/ui/extensions/deforum\n", 28 | "!git clone https://github.com/camenduru/tunnels /content/ui/extensions/tunnels\n", 29 | "!git clone https://github.com/camenduru/sd-civitai-browser /content/ui/extensions/sd-civitai-browser\n", 30 | "!git clone https://github.com/etherealxx/batchlinks-webui /content/ui/extensions/batchlinks-webui\n", 31 | "%cd /content/ui\n", 32 | "!git reset --hard\n", 33 | "!git -C /content/ui/extensions/deforum reset --hard\n", 34 | "!sed -i -e 's/\\[\"sd_model_checkpoint\"\\]/\\[\"sd_model_checkpoint\",\"sd_vae\",\"CLIP_stop_at_last_layers\"\\]/g' /content/ui/modules/shared_options.py\n", 35 | "!sed -i -e 's/\\.sd-webui-controlnet/\\.control/g' /content/ui/extensions/deforum/scripts/deforum_helpers/deforum_controlnet.py\n", 36 | "\n", 37 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_refiner_1.0.safetensors\n", 38 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/animechangeful-xl/resolve/main/animeChangefulXL_v10ReleasedCandidate.safetensors -d /content/ui/models/Stable-diffusion -o animeChangefulXL_v10ReleasedCandidate.safetensors\n", 39 | "\n", 40 | "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple" 41 | ] 42 | } 43 | ], 44 | "metadata": { 45 | "accelerator": "GPU", 46 | "colab": { 47 | "collapsed_sections": [], 48 | "private_outputs": true, 49 | "provenance": [] 50 | }, 51 | "gpuClass": "standard", 52 | "kernelspec": { 53 | "display_name": "Python 3", 54 | "name": "python3" 55 | }, 56 | "language_info": { 57 | "name": "python" 58 | } 59 | }, 60 | "nbformat": 4, 61 | "nbformat_minor": 0 62 | } 63 | -------------------------------------------------------------------------------- /nightly/animagine_xl_webui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/animagine_xl_webui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /nightly/animechangeful_xl_webui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/animechangeful_xl_webui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 22 | "!apt -y install -qq aria2\n", 23 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 24 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 25 | "!git clone -b v2.6 https://dagshub.com/camenduru/ui\n", 26 | "!git clone https://dagshub.com/camenduru/control /content/ui/extensions/control\n", 27 | "!git clone https://dagshub.com/camenduru/deforum /content/ui/extensions/deforum\n", 28 | "!git clone https://github.com/camenduru/tunnels /content/ui/extensions/tunnels\n", 29 | "!git clone https://github.com/camenduru/sd-civitai-browser /content/ui/extensions/sd-civitai-browser\n", 30 | "!git clone https://github.com/etherealxx/batchlinks-webui /content/ui/extensions/batchlinks-webui\n", 31 | "%cd /content/ui\n", 32 | "!git reset --hard\n", 33 | "!git -C /content/ui/extensions/deforum reset --hard\n", 34 | "!sed -i -e 's/\\[\"sd_model_checkpoint\"\\]/\\[\"sd_model_checkpoint\",\"sd_vae\",\"CLIP_stop_at_last_layers\"\\]/g' /content/ui/modules/shared_options.py\n", 35 | "!sed -i -e 's/\\.sd-webui-controlnet/\\.control/g' /content/ui/extensions/deforum/scripts/deforum_helpers/deforum_controlnet.py\n", 36 | "\n", 37 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_refiner_1.0.safetensors\n", 38 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/rundiffusion-xl/resolve/main/rundiffusionXL_beta.safetensors -d /content/ui/models/Stable-diffusion -o rundiffusionXL_beta.safetensors\n", 39 | "\n", 40 | "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple" 41 | ] 42 | } 43 | ], 44 | "metadata": { 45 | "accelerator": "GPU", 46 | "colab": { 47 | "collapsed_sections": [], 48 | "private_outputs": true, 49 | "provenance": [] 50 | }, 51 | "gpuClass": "standard", 52 | "kernelspec": { 53 | "display_name": "Python 3", 54 | "name": "python3" 55 | }, 56 | "language_info": { 57 | "name": "python" 58 | } 59 | }, 60 | "nbformat": 4, 61 | "nbformat_minor": 0 62 | } 63 | -------------------------------------------------------------------------------- /nightly/animechangeful_xl_webui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/animechangeful_xl_webui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /nightly/counterfeit_xl_webui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/counterfeit_xl_webui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 22 | "!apt -y install -qq aria2\n", 23 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 24 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 25 | "!git clone -b v2.6 https://dagshub.com/camenduru/ui\n", 26 | "!git clone https://dagshub.com/camenduru/control /content/ui/extensions/control\n", 27 | "!git clone https://dagshub.com/camenduru/deforum /content/ui/extensions/deforum\n", 28 | "!git clone https://github.com/camenduru/tunnels /content/ui/extensions/tunnels\n", 29 | "!git clone https://github.com/camenduru/sd-civitai-browser /content/ui/extensions/sd-civitai-browser\n", 30 | "!git clone https://github.com/etherealxx/batchlinks-webui /content/ui/extensions/batchlinks-webui\n", 31 | "%cd /content/ui\n", 32 | "!git reset --hard\n", 33 | "!git -C /content/ui/extensions/deforum reset --hard\n", 34 | "!sed -i -e 's/\\[\"sd_model_checkpoint\"\\]/\\[\"sd_model_checkpoint\",\"sd_vae\",\"CLIP_stop_at_last_layers\"\\]/g' /content/ui/modules/shared_options.py\n", 35 | "!sed -i -e 's/\\.sd-webui-controlnet/\\.control/g' /content/ui/extensions/deforum/scripts/deforum_helpers/deforum_controlnet.py\n", 36 | "\n", 37 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_refiner_1.0.safetensors\n", 38 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/counterfeit-xl/resolve/main/counterfeitxl_v10.safetensors -d /content/ui/models/Stable-diffusion -o counterfeitxl_v10.safetensors\n", 39 | "\n", 40 | "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple" 41 | ] 42 | } 43 | ], 44 | "metadata": { 45 | "accelerator": "GPU", 46 | "colab": { 47 | "collapsed_sections": [], 48 | "private_outputs": true, 49 | "provenance": [] 50 | }, 51 | "gpuClass": "standard", 52 | "kernelspec": { 53 | "display_name": "Python 3", 54 | "name": "python3" 55 | }, 56 | "language_info": { 57 | "name": "python" 58 | } 59 | }, 60 | "nbformat": 4, 61 | "nbformat_minor": 0 62 | } 63 | -------------------------------------------------------------------------------- /nightly/counterfeit_xl_webui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/counterfeit_xl_webui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /nightly/crystalclear_xl_webui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/crystalclear_xl_webui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 22 | "!apt -y install -qq aria2\n", 23 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 24 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 25 | "!git clone -b v2.6 https://dagshub.com/camenduru/ui\n", 26 | "!git clone https://dagshub.com/camenduru/control /content/ui/extensions/control\n", 27 | "!git clone https://dagshub.com/camenduru/deforum /content/ui/extensions/deforum\n", 28 | "!git clone https://github.com/camenduru/tunnels /content/ui/extensions/tunnels\n", 29 | "!git clone https://github.com/camenduru/sd-civitai-browser /content/ui/extensions/sd-civitai-browser\n", 30 | "!git clone https://github.com/etherealxx/batchlinks-webui /content/ui/extensions/batchlinks-webui\n", 31 | "%cd /content/ui\n", 32 | "!git reset --hard\n", 33 | "!git -C /content/ui/extensions/deforum reset --hard\n", 34 | "!sed -i -e 's/\\[\"sd_model_checkpoint\"\\]/\\[\"sd_model_checkpoint\",\"sd_vae\",\"CLIP_stop_at_last_layers\"\\]/g' /content/ui/modules/shared_options.py\n", 35 | "!sed -i -e 's/\\.sd-webui-controlnet/\\.control/g' /content/ui/extensions/deforum/scripts/deforum_helpers/deforum_controlnet.py\n", 36 | "\n", 37 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_refiner_1.0.safetensors\n", 38 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/crystalclear-xl/resolve/main/crystalClearXL_ccxl.safetensors -d /content/ui/models/Stable-diffusion -o crystalClearXL_ccxl.safetensors\n", 39 | "\n", 40 | "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple" 41 | ] 42 | } 43 | ], 44 | "metadata": { 45 | "accelerator": "GPU", 46 | "colab": { 47 | "collapsed_sections": [], 48 | "private_outputs": true, 49 | "provenance": [] 50 | }, 51 | "gpuClass": "standard", 52 | "kernelspec": { 53 | "display_name": "Python 3", 54 | "name": "python3" 55 | }, 56 | "language_info": { 57 | "name": "python" 58 | } 59 | }, 60 | "nbformat": 4, 61 | "nbformat_minor": 0 62 | } 63 | -------------------------------------------------------------------------------- /nightly/crystalclear_xl_webui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/crystalclear_xl_webui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /nightly/duchaitenaiart_xl_webui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/duchaitenaiart_xl_webui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 22 | "!apt -y install -qq aria2\n", 23 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 24 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 25 | "!git clone -b v2.6 https://dagshub.com/camenduru/ui\n", 26 | "!git clone https://dagshub.com/camenduru/control /content/ui/extensions/control\n", 27 | "!git clone https://dagshub.com/camenduru/deforum /content/ui/extensions/deforum\n", 28 | "!git clone https://github.com/camenduru/tunnels /content/ui/extensions/tunnels\n", 29 | "!git clone https://github.com/camenduru/sd-civitai-browser /content/ui/extensions/sd-civitai-browser\n", 30 | "!git clone https://github.com/etherealxx/batchlinks-webui /content/ui/extensions/batchlinks-webui\n", 31 | "%cd /content/ui\n", 32 | "!git reset --hard\n", 33 | "!git -C /content/ui/extensions/deforum reset --hard\n", 34 | "!sed -i -e 's/\\[\"sd_model_checkpoint\"\\]/\\[\"sd_model_checkpoint\",\"sd_vae\",\"CLIP_stop_at_last_layers\"\\]/g' /content/ui/modules/shared_options.py\n", 35 | "!sed -i -e 's/\\.sd-webui-controlnet/\\.control/g' /content/ui/extensions/deforum/scripts/deforum_helpers/deforum_controlnet.py\n", 36 | "\n", 37 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_refiner_1.0.safetensors\n", 38 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/duchaiten-aiart-xl/resolve/main/duchaitenAiartSDXL_v10.safetensors -d /content/ui/models/Stable-diffusion -o duchaitenAiartSDXL_v10.safetensors\n", 39 | "\n", 40 | "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple" 41 | ] 42 | } 43 | ], 44 | "metadata": { 45 | "accelerator": "GPU", 46 | "colab": { 47 | "collapsed_sections": [], 48 | "private_outputs": true, 49 | "provenance": [] 50 | }, 51 | "gpuClass": "standard", 52 | "kernelspec": { 53 | "display_name": "Python 3", 54 | "name": "python3" 55 | }, 56 | "language_info": { 57 | "name": "python" 58 | } 59 | }, 60 | "nbformat": 4, 61 | "nbformat_minor": 0 62 | } 63 | -------------------------------------------------------------------------------- /nightly/duchaitenaiart_xl_webui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/duchaitenaiart_xl_webui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /nightly/juggernaut_xl_webui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/juggernaut_xl_webui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 22 | "!apt -y install -qq aria2\n", 23 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 24 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 25 | "!git clone -b v2.6 https://dagshub.com/camenduru/ui\n", 26 | "!git clone https://dagshub.com/camenduru/control /content/ui/extensions/control\n", 27 | "!git clone https://dagshub.com/camenduru/deforum /content/ui/extensions/deforum\n", 28 | "!git clone https://github.com/camenduru/tunnels /content/ui/extensions/tunnels\n", 29 | "!git clone https://github.com/camenduru/sd-civitai-browser /content/ui/extensions/sd-civitai-browser\n", 30 | "!git clone https://github.com/etherealxx/batchlinks-webui /content/ui/extensions/batchlinks-webui\n", 31 | "%cd /content/ui\n", 32 | "!git reset --hard\n", 33 | "!git -C /content/ui/extensions/deforum reset --hard\n", 34 | "!sed -i -e 's/\\[\"sd_model_checkpoint\"\\]/\\[\"sd_model_checkpoint\",\"sd_vae\",\"CLIP_stop_at_last_layers\"\\]/g' /content/ui/modules/shared_options.py\n", 35 | "!sed -i -e 's/\\.sd-webui-controlnet/\\.control/g' /content/ui/extensions/deforum/scripts/deforum_helpers/deforum_controlnet.py\n", 36 | "\n", 37 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_refiner_1.0.safetensors\n", 38 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/juggernaut-xl/resolve/main/juggernautXL_version2.safetensors -d /content/ui/models/Stable-diffusion -o juggernautXL_version2.safetensors\n", 39 | "\n", 40 | "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple" 41 | ] 42 | } 43 | ], 44 | "metadata": { 45 | "accelerator": "GPU", 46 | "colab": { 47 | "collapsed_sections": [], 48 | "private_outputs": true, 49 | "provenance": [] 50 | }, 51 | "gpuClass": "standard", 52 | "kernelspec": { 53 | "display_name": "Python 3", 54 | "name": "python3" 55 | }, 56 | "language_info": { 57 | "name": "python" 58 | } 59 | }, 60 | "nbformat": 4, 61 | "nbformat_minor": 0 62 | } 63 | -------------------------------------------------------------------------------- /nightly/juggernaut_xl_webui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/juggernaut_xl_webui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /nightly/rundiffusion_xl_webui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/rundiffusion_xl_webui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 22 | "!apt -y install -qq aria2\n", 23 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 24 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 25 | "!git clone -b v2.6 https://dagshub.com/camenduru/ui\n", 26 | "!git clone https://dagshub.com/camenduru/control /content/ui/extensions/control\n", 27 | "!git clone https://dagshub.com/camenduru/deforum /content/ui/extensions/deforum\n", 28 | "!git clone https://github.com/camenduru/tunnels /content/ui/extensions/tunnels\n", 29 | "!git clone https://github.com/camenduru/sd-civitai-browser /content/ui/extensions/sd-civitai-browser\n", 30 | "!git clone https://github.com/etherealxx/batchlinks-webui /content/ui/extensions/batchlinks-webui\n", 31 | "%cd /content/ui\n", 32 | "!git reset --hard\n", 33 | "!git -C /content/ui/extensions/deforum reset --hard\n", 34 | "!sed -i -e 's/\\[\"sd_model_checkpoint\"\\]/\\[\"sd_model_checkpoint\",\"sd_vae\",\"CLIP_stop_at_last_layers\"\\]/g' /content/ui/modules/shared_options.py\n", 35 | "!sed -i -e 's/\\.sd-webui-controlnet/\\.control/g' /content/ui/extensions/deforum/scripts/deforum_helpers/deforum_controlnet.py\n", 36 | "\n", 37 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_refiner_1.0.safetensors\n", 38 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/rundiffusion-xl/resolve/main/rundiffusionXL_beta.safetensors -d /content/ui/models/Stable-diffusion -o rundiffusionXL_beta.safetensors\n", 39 | "\n", 40 | "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple" 41 | ] 42 | } 43 | ], 44 | "metadata": { 45 | "accelerator": "GPU", 46 | "colab": { 47 | "collapsed_sections": [], 48 | "private_outputs": true, 49 | "provenance": [] 50 | }, 51 | "gpuClass": "standard", 52 | "kernelspec": { 53 | "display_name": "Python 3", 54 | "name": "python3" 55 | }, 56 | "language_info": { 57 | "name": "python" 58 | } 59 | }, 60 | "nbformat": 4, 61 | "nbformat_minor": 0 62 | } 63 | -------------------------------------------------------------------------------- /nightly/rundiffusion_xl_webui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/nightly/rundiffusion_xl_webui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /refiner_v0.9.json: -------------------------------------------------------------------------------- 1 | { 2 | "last_node_id": 22, 3 | "last_link_id": 38, 4 | "nodes": [ 5 | { 6 | "id": 7, 7 | "type": "CLIPTextEncode", 8 | "pos": [ 9 | 394, 10 | 179 11 | ], 12 | "size": { 13 | "0": 210, 14 | "1": 54 15 | }, 16 | "flags": { 17 | "collapsed": true 18 | }, 19 | "order": 8, 20 | "mode": 0, 21 | "inputs": [ 22 | { 23 | "name": "clip", 24 | "type": "CLIP", 25 | "link": 5 26 | }, 27 | { 28 | "name": "text", 29 | "type": "STRING", 30 | "link": 22, 31 | "widget": { 32 | "name": "text", 33 | "config": [ 34 | "STRING", 35 | { 36 | "multiline": true 37 | } 38 | ] 39 | } 40 | } 41 | ], 42 | "outputs": [ 43 | { 44 | "name": "CONDITIONING", 45 | "type": "CONDITIONING", 46 | "links": [ 47 | 25 48 | ], 49 | "slot_index": 0 50 | } 51 | ], 52 | "properties": { 53 | "Node name for S&R": "CLIPTextEncode" 54 | }, 55 | "widgets_values": [ 56 | "text, watermark" 57 | ] 58 | }, 59 | { 60 | "id": 13, 61 | "type": "CLIPTextEncode", 62 | "pos": [ 63 | 421, 64 | -255 65 | ], 66 | "size": { 67 | "0": 210, 68 | "1": 54 69 | }, 70 | "flags": { 71 | "collapsed": true 72 | }, 73 | "order": 6, 74 | "mode": 0, 75 | "inputs": [ 76 | { 77 | "name": "clip", 78 | "type": "CLIP", 79 | "link": 13 80 | }, 81 | { 82 | "name": "text", 83 | "type": "STRING", 84 | "link": 21, 85 | "widget": { 86 | "name": "text", 87 | "config": [ 88 | "STRING", 89 | { 90 | "multiline": true 91 | } 92 | ] 93 | }, 94 | "slot_index": 1 95 | } 96 | ], 97 | "outputs": [ 98 | { 99 | "name": "CONDITIONING", 100 | "type": "CONDITIONING", 101 | "links": [ 102 | 33 103 | ], 104 | "slot_index": 0 105 | } 106 | ], 107 | "properties": { 108 | "Node name for S&R": "CLIPTextEncode" 109 | }, 110 | "widgets_values": [ 111 | "text, watermark" 112 | ] 113 | }, 114 | { 115 | "id": 12, 116 | "type": "CLIPTextEncode", 117 | "pos": [ 118 | 426, 119 | -297 120 | ], 121 | "size": { 122 | "0": 219, 123 | "1": 54 124 | }, 125 | "flags": { 126 | "collapsed": true 127 | }, 128 | "order": 5, 129 | "mode": 0, 130 | "inputs": [ 131 | { 132 | "name": "clip", 133 | "type": "CLIP", 134 | "link": 11 135 | }, 136 | { 137 | "name": "text", 138 | "type": "STRING", 139 | "link": 18, 140 | "widget": { 141 | "name": "text", 142 | "config": [ 143 | "STRING", 144 | { 145 | "multiline": true 146 | } 147 | ] 148 | }, 149 | "slot_index": 1 150 | } 151 | ], 152 | "outputs": [ 153 | { 154 | "name": "CONDITIONING", 155 | "type": "CONDITIONING", 156 | "links": [ 157 | 32 158 | ], 159 | "slot_index": 0 160 | } 161 | ], 162 | "properties": { 163 | "Node name for S&R": "CLIPTextEncode" 164 | }, 165 | "widgets_values": [ 166 | "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," 167 | ] 168 | }, 169 | { 170 | "id": 18, 171 | "type": "VAEDecode", 172 | "pos": [ 173 | 1065, 174 | -334 175 | ], 176 | "size": { 177 | "0": 210, 178 | "1": 46 179 | }, 180 | "flags": {}, 181 | "order": 13, 182 | "mode": 0, 183 | "inputs": [ 184 | { 185 | "name": "samples", 186 | "type": "LATENT", 187 | "link": 36 188 | }, 189 | { 190 | "name": "vae", 191 | "type": "VAE", 192 | "link": 37 193 | } 194 | ], 195 | "outputs": [ 196 | { 197 | "name": "IMAGE", 198 | "type": "IMAGE", 199 | "links": [ 200 | 30 201 | ], 202 | "shape": 3, 203 | "slot_index": 0 204 | } 205 | ], 206 | "properties": { 207 | "Node name for S&R": "VAEDecode" 208 | } 209 | }, 210 | { 211 | "id": 17, 212 | "type": "KSampler", 213 | "pos": [ 214 | 721, 215 | 134 216 | ], 217 | "size": { 218 | "0": 315, 219 | "1": 262 220 | }, 221 | "flags": {}, 222 | "order": 9, 223 | "mode": 0, 224 | "inputs": [ 225 | { 226 | "name": "model", 227 | "type": "MODEL", 228 | "link": 27 229 | }, 230 | { 231 | "name": "positive", 232 | "type": "CONDITIONING", 233 | "link": 24 234 | }, 235 | { 236 | "name": "negative", 237 | "type": "CONDITIONING", 238 | "link": 25 239 | }, 240 | { 241 | "name": "latent_image", 242 | "type": "LATENT", 243 | "link": 38 244 | } 245 | ], 246 | "outputs": [ 247 | { 248 | "name": "LATENT", 249 | "type": "LATENT", 250 | "links": [ 251 | 28, 252 | 35 253 | ], 254 | "shape": 3, 255 | "slot_index": 0 256 | } 257 | ], 258 | "properties": { 259 | "Node name for S&R": "KSampler" 260 | }, 261 | "widgets_values": [ 262 | 750844989320825, 263 | "randomize", 264 | 20, 265 | 6, 266 | "dpmpp_2s_ancestral", 267 | "normal", 268 | 1 269 | ] 270 | }, 271 | { 272 | "id": 8, 273 | "type": "VAEDecode", 274 | "pos": [ 275 | 1088, 276 | 190 277 | ], 278 | "size": { 279 | "0": 210, 280 | "1": 46 281 | }, 282 | "flags": {}, 283 | "order": 10, 284 | "mode": 0, 285 | "inputs": [ 286 | { 287 | "name": "samples", 288 | "type": "LATENT", 289 | "link": 28 290 | }, 291 | { 292 | "name": "vae", 293 | "type": "VAE", 294 | "link": 8 295 | } 296 | ], 297 | "outputs": [ 298 | { 299 | "name": "IMAGE", 300 | "type": "IMAGE", 301 | "links": [ 302 | 9 303 | ], 304 | "slot_index": 0 305 | } 306 | ], 307 | "properties": { 308 | "Node name for S&R": "VAEDecode" 309 | } 310 | }, 311 | { 312 | "id": 6, 313 | "type": "CLIPTextEncode", 314 | "pos": [ 315 | 393, 316 | 134 317 | ], 318 | "size": { 319 | "0": 210, 320 | "1": 54 321 | }, 322 | "flags": { 323 | "collapsed": true 324 | }, 325 | "order": 7, 326 | "mode": 0, 327 | "inputs": [ 328 | { 329 | "name": "clip", 330 | "type": "CLIP", 331 | "link": 3 332 | }, 333 | { 334 | "name": "text", 335 | "type": "STRING", 336 | "link": 19, 337 | "widget": { 338 | "name": "text", 339 | "config": [ 340 | "STRING", 341 | { 342 | "multiline": true 343 | } 344 | ] 345 | } 346 | } 347 | ], 348 | "outputs": [ 349 | { 350 | "name": "CONDITIONING", 351 | "type": "CONDITIONING", 352 | "links": [ 353 | 24 354 | ], 355 | "slot_index": 0 356 | } 357 | ], 358 | "properties": { 359 | "Node name for S&R": "CLIPTextEncode" 360 | }, 361 | "widgets_values": [ 362 | "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," 363 | ] 364 | }, 365 | { 366 | "id": 15, 367 | "type": "PrimitiveNode", 368 | "pos": [ 369 | -66, 370 | -154 371 | ], 372 | "size": { 373 | "0": 402, 374 | "1": 188 375 | }, 376 | "flags": {}, 377 | "order": 1, 378 | "mode": 0, 379 | "outputs": [ 380 | { 381 | "name": "STRING", 382 | "type": "STRING", 383 | "links": [ 384 | 18, 385 | 19 386 | ], 387 | "widget": { 388 | "name": "text", 389 | "config": [ 390 | "STRING", 391 | { 392 | "multiline": true 393 | } 394 | ] 395 | }, 396 | "slot_index": 0 397 | } 398 | ], 399 | "title": "Positive Prompt", 400 | "properties": {}, 401 | "widgets_values": [ 402 | "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," 403 | ], 404 | "color": "#232", 405 | "bgcolor": "#353", 406 | "shape": 4 407 | }, 408 | { 409 | "id": 16, 410 | "type": "PrimitiveNode", 411 | "pos": [ 412 | -64, 413 | 85 414 | ], 415 | "size": { 416 | "0": 398, 417 | "1": 140 418 | }, 419 | "flags": {}, 420 | "order": 2, 421 | "mode": 0, 422 | "outputs": [ 423 | { 424 | "name": "STRING", 425 | "type": "STRING", 426 | "links": [ 427 | 21, 428 | 22 429 | ], 430 | "widget": { 431 | "name": "text", 432 | "config": [ 433 | "STRING", 434 | { 435 | "multiline": true 436 | } 437 | ] 438 | }, 439 | "slot_index": 0 440 | } 441 | ], 442 | "title": "Negative Prompt", 443 | "properties": {}, 444 | "widgets_values": [ 445 | "text, watermark" 446 | ], 447 | "color": "#332922", 448 | "bgcolor": "#593930", 449 | "shape": 4 450 | }, 451 | { 452 | "id": 9, 453 | "type": "SaveImage", 454 | "pos": [ 455 | 1351, 456 | 168 457 | ], 458 | "size": { 459 | "0": 426.084228515625, 460 | "1": 437.66387939453125 461 | }, 462 | "flags": {}, 463 | "order": 12, 464 | "mode": 0, 465 | "inputs": [ 466 | { 467 | "name": "images", 468 | "type": "IMAGE", 469 | "link": 9 470 | } 471 | ], 472 | "properties": {}, 473 | "widgets_values": [ 474 | "base_output" 475 | ], 476 | "shape": 1 477 | }, 478 | { 479 | "id": 20, 480 | "type": "KSampler", 481 | "pos": [ 482 | 681, 483 | -397 484 | ], 485 | "size": { 486 | "0": 315, 487 | "1": 262 488 | }, 489 | "flags": {}, 490 | "order": 11, 491 | "mode": 0, 492 | "inputs": [ 493 | { 494 | "name": "model", 495 | "type": "MODEL", 496 | "link": 34 497 | }, 498 | { 499 | "name": "positive", 500 | "type": "CONDITIONING", 501 | "link": 32 502 | }, 503 | { 504 | "name": "negative", 505 | "type": "CONDITIONING", 506 | "link": 33 507 | }, 508 | { 509 | "name": "latent_image", 510 | "type": "LATENT", 511 | "link": 35 512 | } 513 | ], 514 | "outputs": [ 515 | { 516 | "name": "LATENT", 517 | "type": "LATENT", 518 | "links": [ 519 | 36 520 | ], 521 | "shape": 3, 522 | "slot_index": 0 523 | } 524 | ], 525 | "title": "KSampler for refiner (like img2img)", 526 | "properties": { 527 | "Node name for S&R": "KSampler" 528 | }, 529 | "widgets_values": [ 530 | 151930796019195, 531 | "randomize", 532 | 15, 533 | 8, 534 | "dpmpp_2m", 535 | "normal", 536 | 0.25 537 | ] 538 | }, 539 | { 540 | "id": 11, 541 | "type": "CheckpointLoaderSimple", 542 | "pos": [ 543 | -32, 544 | -385 545 | ], 546 | "size": { 547 | "0": 336, 548 | "1": 98 549 | }, 550 | "flags": { 551 | "collapsed": false 552 | }, 553 | "order": 3, 554 | "mode": 0, 555 | "outputs": [ 556 | { 557 | "name": "MODEL", 558 | "type": "MODEL", 559 | "links": [ 560 | 34 561 | ], 562 | "shape": 3, 563 | "slot_index": 0 564 | }, 565 | { 566 | "name": "CLIP", 567 | "type": "CLIP", 568 | "links": [ 569 | 11, 570 | 13 571 | ], 572 | "shape": 3, 573 | "slot_index": 1 574 | }, 575 | { 576 | "name": "VAE", 577 | "type": "VAE", 578 | "links": [ 579 | 37 580 | ], 581 | "shape": 3, 582 | "slot_index": 2 583 | } 584 | ], 585 | "properties": { 586 | "Node name for S&R": "CheckpointLoaderSimple" 587 | }, 588 | "widgets_values": [ 589 | "sd_xl_refiner_0.9.safetensors" 590 | ] 591 | }, 592 | { 593 | "id": 4, 594 | "type": "CheckpointLoaderSimple", 595 | "pos": [ 596 | -52.80264120483398, 597 | 358 598 | ], 599 | "size": { 600 | "0": 397, 601 | "1": 98 602 | }, 603 | "flags": {}, 604 | "order": 4, 605 | "mode": 0, 606 | "outputs": [ 607 | { 608 | "name": "MODEL", 609 | "type": "MODEL", 610 | "links": [ 611 | 27 612 | ], 613 | "slot_index": 0 614 | }, 615 | { 616 | "name": "CLIP", 617 | "type": "CLIP", 618 | "links": [ 619 | 3, 620 | 5 621 | ], 622 | "slot_index": 1 623 | }, 624 | { 625 | "name": "VAE", 626 | "type": "VAE", 627 | "links": [ 628 | 8 629 | ], 630 | "slot_index": 2 631 | } 632 | ], 633 | "properties": { 634 | "Node name for S&R": "CheckpointLoaderSimple" 635 | }, 636 | "widgets_values": [ 637 | "sd_xl_base_0.9.safetensors" 638 | ] 639 | }, 640 | { 641 | "id": 19, 642 | "type": "SaveImage", 643 | "pos": [ 644 | 1366, 645 | -406 646 | ], 647 | "size": { 648 | "0": 462.1468811035156, 649 | "1": 441.9457702636719 650 | }, 651 | "flags": {}, 652 | "order": 14, 653 | "mode": 0, 654 | "inputs": [ 655 | { 656 | "name": "images", 657 | "type": "IMAGE", 658 | "link": 30 659 | } 660 | ], 661 | "properties": {}, 662 | "widgets_values": [ 663 | "refiner_output" 664 | ], 665 | "shape": 1 666 | }, 667 | { 668 | "id": 21, 669 | "type": "EmptyLatentImage", 670 | "pos": [ 671 | 390, 672 | 242 673 | ], 674 | "size": { 675 | "0": 295.7807922363281, 676 | "1": 106 677 | }, 678 | "flags": {}, 679 | "order": 0, 680 | "mode": 0, 681 | "outputs": [ 682 | { 683 | "name": "LATENT", 684 | "type": "LATENT", 685 | "links": [ 686 | 38 687 | ], 688 | "shape": 3, 689 | "slot_index": 0 690 | } 691 | ], 692 | "title": "Image Size\n", 693 | "properties": { 694 | "Node name for S&R": "EmptyLatentImage" 695 | }, 696 | "widgets_values": [ 697 | 1024, 698 | 1024, 699 | 1 700 | ] 701 | } 702 | ], 703 | "links": [ 704 | [ 705 | 3, 706 | 4, 707 | 1, 708 | 6, 709 | 0, 710 | "CLIP" 711 | ], 712 | [ 713 | 5, 714 | 4, 715 | 1, 716 | 7, 717 | 0, 718 | "CLIP" 719 | ], 720 | [ 721 | 8, 722 | 4, 723 | 2, 724 | 8, 725 | 1, 726 | "VAE" 727 | ], 728 | [ 729 | 9, 730 | 8, 731 | 0, 732 | 9, 733 | 0, 734 | "IMAGE" 735 | ], 736 | [ 737 | 11, 738 | 11, 739 | 1, 740 | 12, 741 | 0, 742 | "CLIP" 743 | ], 744 | [ 745 | 13, 746 | 11, 747 | 1, 748 | 13, 749 | 0, 750 | "CLIP" 751 | ], 752 | [ 753 | 18, 754 | 15, 755 | 0, 756 | 12, 757 | 1, 758 | "STRING" 759 | ], 760 | [ 761 | 19, 762 | 15, 763 | 0, 764 | 6, 765 | 1, 766 | "STRING" 767 | ], 768 | [ 769 | 21, 770 | 16, 771 | 0, 772 | 13, 773 | 1, 774 | "STRING" 775 | ], 776 | [ 777 | 22, 778 | 16, 779 | 0, 780 | 7, 781 | 1, 782 | "STRING" 783 | ], 784 | [ 785 | 24, 786 | 6, 787 | 0, 788 | 17, 789 | 1, 790 | "CONDITIONING" 791 | ], 792 | [ 793 | 25, 794 | 7, 795 | 0, 796 | 17, 797 | 2, 798 | "CONDITIONING" 799 | ], 800 | [ 801 | 27, 802 | 4, 803 | 0, 804 | 17, 805 | 0, 806 | "MODEL" 807 | ], 808 | [ 809 | 28, 810 | 17, 811 | 0, 812 | 8, 813 | 0, 814 | "LATENT" 815 | ], 816 | [ 817 | 30, 818 | 18, 819 | 0, 820 | 19, 821 | 0, 822 | "IMAGE" 823 | ], 824 | [ 825 | 32, 826 | 12, 827 | 0, 828 | 20, 829 | 1, 830 | "CONDITIONING" 831 | ], 832 | [ 833 | 33, 834 | 13, 835 | 0, 836 | 20, 837 | 2, 838 | "CONDITIONING" 839 | ], 840 | [ 841 | 34, 842 | 11, 843 | 0, 844 | 20, 845 | 0, 846 | "MODEL" 847 | ], 848 | [ 849 | 35, 850 | 17, 851 | 0, 852 | 20, 853 | 3, 854 | "LATENT" 855 | ], 856 | [ 857 | 36, 858 | 20, 859 | 0, 860 | 18, 861 | 0, 862 | "LATENT" 863 | ], 864 | [ 865 | 37, 866 | 11, 867 | 2, 868 | 18, 869 | 1, 870 | "VAE" 871 | ], 872 | [ 873 | 38, 874 | 21, 875 | 0, 876 | 17, 877 | 3, 878 | "LATENT" 879 | ] 880 | ], 881 | "groups": [ 882 | { 883 | "title": "REFINER HERE", 884 | "bounding": [ 885 | -55, 886 | -455, 887 | 381, 888 | 183 889 | ], 890 | "color": "#3f789e" 891 | }, 892 | { 893 | "title": "BASE HERE", 894 | "bounding": [ 895 | -77, 896 | 278, 897 | 444, 898 | 203 899 | ], 900 | "color": "#8A8" 901 | }, 902 | { 903 | "title": "RESULT WITHOUT REFINER", 904 | "bounding": [ 905 | 1337, 906 | 84, 907 | 461, 908 | 543 909 | ], 910 | "color": "#b58b2a" 911 | }, 912 | { 913 | "title": "RESULT WITH REFINER", 914 | "bounding": [ 915 | 1331, 916 | -498, 917 | 552, 918 | 560 919 | ], 920 | "color": "#a1309b" 921 | }, 922 | { 923 | "title": "SDXL 0.9", 924 | "bounding": [ 925 | 422, 926 | -89, 927 | 180, 928 | 80 929 | ], 930 | "color": "#8AA" 931 | } 932 | ], 933 | "config": {}, 934 | "extra": {}, 935 | "version": 0.4 936 | } -------------------------------------------------------------------------------- /refiner_v1.0.json: -------------------------------------------------------------------------------- 1 | { 2 | "last_node_id": 22, 3 | "last_link_id": 38, 4 | "nodes": [ 5 | { 6 | "id": 7, 7 | "type": "CLIPTextEncode", 8 | "pos": [ 9 | 394, 10 | 179 11 | ], 12 | "size": { 13 | "0": 210, 14 | "1": 54 15 | }, 16 | "flags": { 17 | "collapsed": true 18 | }, 19 | "order": 8, 20 | "mode": 0, 21 | "inputs": [ 22 | { 23 | "name": "clip", 24 | "type": "CLIP", 25 | "link": 5 26 | }, 27 | { 28 | "name": "text", 29 | "type": "STRING", 30 | "link": 22, 31 | "widget": { 32 | "name": "text", 33 | "config": [ 34 | "STRING", 35 | { 36 | "multiline": true 37 | } 38 | ] 39 | } 40 | } 41 | ], 42 | "outputs": [ 43 | { 44 | "name": "CONDITIONING", 45 | "type": "CONDITIONING", 46 | "links": [ 47 | 25 48 | ], 49 | "slot_index": 0 50 | } 51 | ], 52 | "properties": { 53 | "Node name for S&R": "CLIPTextEncode" 54 | }, 55 | "widgets_values": [ 56 | "text, watermark" 57 | ] 58 | }, 59 | { 60 | "id": 13, 61 | "type": "CLIPTextEncode", 62 | "pos": [ 63 | 421, 64 | -255 65 | ], 66 | "size": { 67 | "0": 210, 68 | "1": 54 69 | }, 70 | "flags": { 71 | "collapsed": true 72 | }, 73 | "order": 6, 74 | "mode": 0, 75 | "inputs": [ 76 | { 77 | "name": "clip", 78 | "type": "CLIP", 79 | "link": 13 80 | }, 81 | { 82 | "name": "text", 83 | "type": "STRING", 84 | "link": 21, 85 | "widget": { 86 | "name": "text", 87 | "config": [ 88 | "STRING", 89 | { 90 | "multiline": true 91 | } 92 | ] 93 | }, 94 | "slot_index": 1 95 | } 96 | ], 97 | "outputs": [ 98 | { 99 | "name": "CONDITIONING", 100 | "type": "CONDITIONING", 101 | "links": [ 102 | 33 103 | ], 104 | "slot_index": 0 105 | } 106 | ], 107 | "properties": { 108 | "Node name for S&R": "CLIPTextEncode" 109 | }, 110 | "widgets_values": [ 111 | "text, watermark" 112 | ] 113 | }, 114 | { 115 | "id": 12, 116 | "type": "CLIPTextEncode", 117 | "pos": [ 118 | 426, 119 | -297 120 | ], 121 | "size": { 122 | "0": 219, 123 | "1": 54 124 | }, 125 | "flags": { 126 | "collapsed": true 127 | }, 128 | "order": 5, 129 | "mode": 0, 130 | "inputs": [ 131 | { 132 | "name": "clip", 133 | "type": "CLIP", 134 | "link": 11 135 | }, 136 | { 137 | "name": "text", 138 | "type": "STRING", 139 | "link": 18, 140 | "widget": { 141 | "name": "text", 142 | "config": [ 143 | "STRING", 144 | { 145 | "multiline": true 146 | } 147 | ] 148 | }, 149 | "slot_index": 1 150 | } 151 | ], 152 | "outputs": [ 153 | { 154 | "name": "CONDITIONING", 155 | "type": "CONDITIONING", 156 | "links": [ 157 | 32 158 | ], 159 | "slot_index": 0 160 | } 161 | ], 162 | "properties": { 163 | "Node name for S&R": "CLIPTextEncode" 164 | }, 165 | "widgets_values": [ 166 | "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," 167 | ] 168 | }, 169 | { 170 | "id": 18, 171 | "type": "VAEDecode", 172 | "pos": [ 173 | 1065, 174 | -334 175 | ], 176 | "size": { 177 | "0": 210, 178 | "1": 46 179 | }, 180 | "flags": {}, 181 | "order": 13, 182 | "mode": 0, 183 | "inputs": [ 184 | { 185 | "name": "samples", 186 | "type": "LATENT", 187 | "link": 36 188 | }, 189 | { 190 | "name": "vae", 191 | "type": "VAE", 192 | "link": 37 193 | } 194 | ], 195 | "outputs": [ 196 | { 197 | "name": "IMAGE", 198 | "type": "IMAGE", 199 | "links": [ 200 | 30 201 | ], 202 | "shape": 3, 203 | "slot_index": 0 204 | } 205 | ], 206 | "properties": { 207 | "Node name for S&R": "VAEDecode" 208 | } 209 | }, 210 | { 211 | "id": 17, 212 | "type": "KSampler", 213 | "pos": [ 214 | 721, 215 | 134 216 | ], 217 | "size": { 218 | "0": 315, 219 | "1": 262 220 | }, 221 | "flags": {}, 222 | "order": 9, 223 | "mode": 0, 224 | "inputs": [ 225 | { 226 | "name": "model", 227 | "type": "MODEL", 228 | "link": 27 229 | }, 230 | { 231 | "name": "positive", 232 | "type": "CONDITIONING", 233 | "link": 24 234 | }, 235 | { 236 | "name": "negative", 237 | "type": "CONDITIONING", 238 | "link": 25 239 | }, 240 | { 241 | "name": "latent_image", 242 | "type": "LATENT", 243 | "link": 38 244 | } 245 | ], 246 | "outputs": [ 247 | { 248 | "name": "LATENT", 249 | "type": "LATENT", 250 | "links": [ 251 | 28, 252 | 35 253 | ], 254 | "shape": 3, 255 | "slot_index": 0 256 | } 257 | ], 258 | "properties": { 259 | "Node name for S&R": "KSampler" 260 | }, 261 | "widgets_values": [ 262 | 750844989320825, 263 | "randomize", 264 | 20, 265 | 6, 266 | "dpmpp_2s_ancestral", 267 | "normal", 268 | 1 269 | ] 270 | }, 271 | { 272 | "id": 8, 273 | "type": "VAEDecode", 274 | "pos": [ 275 | 1088, 276 | 190 277 | ], 278 | "size": { 279 | "0": 210, 280 | "1": 46 281 | }, 282 | "flags": {}, 283 | "order": 10, 284 | "mode": 0, 285 | "inputs": [ 286 | { 287 | "name": "samples", 288 | "type": "LATENT", 289 | "link": 28 290 | }, 291 | { 292 | "name": "vae", 293 | "type": "VAE", 294 | "link": 8 295 | } 296 | ], 297 | "outputs": [ 298 | { 299 | "name": "IMAGE", 300 | "type": "IMAGE", 301 | "links": [ 302 | 9 303 | ], 304 | "slot_index": 0 305 | } 306 | ], 307 | "properties": { 308 | "Node name for S&R": "VAEDecode" 309 | } 310 | }, 311 | { 312 | "id": 6, 313 | "type": "CLIPTextEncode", 314 | "pos": [ 315 | 393, 316 | 134 317 | ], 318 | "size": { 319 | "0": 210, 320 | "1": 54 321 | }, 322 | "flags": { 323 | "collapsed": true 324 | }, 325 | "order": 7, 326 | "mode": 0, 327 | "inputs": [ 328 | { 329 | "name": "clip", 330 | "type": "CLIP", 331 | "link": 3 332 | }, 333 | { 334 | "name": "text", 335 | "type": "STRING", 336 | "link": 19, 337 | "widget": { 338 | "name": "text", 339 | "config": [ 340 | "STRING", 341 | { 342 | "multiline": true 343 | } 344 | ] 345 | } 346 | } 347 | ], 348 | "outputs": [ 349 | { 350 | "name": "CONDITIONING", 351 | "type": "CONDITIONING", 352 | "links": [ 353 | 24 354 | ], 355 | "slot_index": 0 356 | } 357 | ], 358 | "properties": { 359 | "Node name for S&R": "CLIPTextEncode" 360 | }, 361 | "widgets_values": [ 362 | "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," 363 | ] 364 | }, 365 | { 366 | "id": 15, 367 | "type": "PrimitiveNode", 368 | "pos": [ 369 | -66, 370 | -154 371 | ], 372 | "size": { 373 | "0": 402, 374 | "1": 188 375 | }, 376 | "flags": {}, 377 | "order": 1, 378 | "mode": 0, 379 | "outputs": [ 380 | { 381 | "name": "STRING", 382 | "type": "STRING", 383 | "links": [ 384 | 18, 385 | 19 386 | ], 387 | "widget": { 388 | "name": "text", 389 | "config": [ 390 | "STRING", 391 | { 392 | "multiline": true 393 | } 394 | ] 395 | }, 396 | "slot_index": 0 397 | } 398 | ], 399 | "title": "Positive Prompt", 400 | "properties": {}, 401 | "widgets_values": [ 402 | "beautiful scenery nature glass bottle landscape, , purple galaxy bottle," 403 | ], 404 | "color": "#232", 405 | "bgcolor": "#353", 406 | "shape": 4 407 | }, 408 | { 409 | "id": 16, 410 | "type": "PrimitiveNode", 411 | "pos": [ 412 | -64, 413 | 85 414 | ], 415 | "size": { 416 | "0": 398, 417 | "1": 140 418 | }, 419 | "flags": {}, 420 | "order": 2, 421 | "mode": 0, 422 | "outputs": [ 423 | { 424 | "name": "STRING", 425 | "type": "STRING", 426 | "links": [ 427 | 21, 428 | 22 429 | ], 430 | "widget": { 431 | "name": "text", 432 | "config": [ 433 | "STRING", 434 | { 435 | "multiline": true 436 | } 437 | ] 438 | }, 439 | "slot_index": 0 440 | } 441 | ], 442 | "title": "Negative Prompt", 443 | "properties": {}, 444 | "widgets_values": [ 445 | "text, watermark" 446 | ], 447 | "color": "#332922", 448 | "bgcolor": "#593930", 449 | "shape": 4 450 | }, 451 | { 452 | "id": 9, 453 | "type": "SaveImage", 454 | "pos": [ 455 | 1351, 456 | 168 457 | ], 458 | "size": { 459 | "0": 426.084228515625, 460 | "1": 437.66387939453125 461 | }, 462 | "flags": {}, 463 | "order": 12, 464 | "mode": 0, 465 | "inputs": [ 466 | { 467 | "name": "images", 468 | "type": "IMAGE", 469 | "link": 9 470 | } 471 | ], 472 | "properties": {}, 473 | "widgets_values": [ 474 | "base_output" 475 | ], 476 | "shape": 1 477 | }, 478 | { 479 | "id": 20, 480 | "type": "KSampler", 481 | "pos": [ 482 | 681, 483 | -397 484 | ], 485 | "size": { 486 | "0": 315, 487 | "1": 262 488 | }, 489 | "flags": {}, 490 | "order": 11, 491 | "mode": 0, 492 | "inputs": [ 493 | { 494 | "name": "model", 495 | "type": "MODEL", 496 | "link": 34 497 | }, 498 | { 499 | "name": "positive", 500 | "type": "CONDITIONING", 501 | "link": 32 502 | }, 503 | { 504 | "name": "negative", 505 | "type": "CONDITIONING", 506 | "link": 33 507 | }, 508 | { 509 | "name": "latent_image", 510 | "type": "LATENT", 511 | "link": 35 512 | } 513 | ], 514 | "outputs": [ 515 | { 516 | "name": "LATENT", 517 | "type": "LATENT", 518 | "links": [ 519 | 36 520 | ], 521 | "shape": 3, 522 | "slot_index": 0 523 | } 524 | ], 525 | "title": "KSampler for refiner (like img2img)", 526 | "properties": { 527 | "Node name for S&R": "KSampler" 528 | }, 529 | "widgets_values": [ 530 | 151930796019195, 531 | "randomize", 532 | 15, 533 | 8, 534 | "dpmpp_2m", 535 | "normal", 536 | 0.25 537 | ] 538 | }, 539 | { 540 | "id": 11, 541 | "type": "CheckpointLoaderSimple", 542 | "pos": [ 543 | -32, 544 | -385 545 | ], 546 | "size": { 547 | "0": 336, 548 | "1": 98 549 | }, 550 | "flags": { 551 | "collapsed": false 552 | }, 553 | "order": 3, 554 | "mode": 0, 555 | "outputs": [ 556 | { 557 | "name": "MODEL", 558 | "type": "MODEL", 559 | "links": [ 560 | 34 561 | ], 562 | "shape": 3, 563 | "slot_index": 0 564 | }, 565 | { 566 | "name": "CLIP", 567 | "type": "CLIP", 568 | "links": [ 569 | 11, 570 | 13 571 | ], 572 | "shape": 3, 573 | "slot_index": 1 574 | }, 575 | { 576 | "name": "VAE", 577 | "type": "VAE", 578 | "links": [ 579 | 37 580 | ], 581 | "shape": 3, 582 | "slot_index": 2 583 | } 584 | ], 585 | "properties": { 586 | "Node name for S&R": "CheckpointLoaderSimple" 587 | }, 588 | "widgets_values": [ 589 | "sd_xl_refiner_1.0.safetensors" 590 | ] 591 | }, 592 | { 593 | "id": 4, 594 | "type": "CheckpointLoaderSimple", 595 | "pos": [ 596 | -52.80264120483398, 597 | 358 598 | ], 599 | "size": { 600 | "0": 397, 601 | "1": 98 602 | }, 603 | "flags": {}, 604 | "order": 4, 605 | "mode": 0, 606 | "outputs": [ 607 | { 608 | "name": "MODEL", 609 | "type": "MODEL", 610 | "links": [ 611 | 27 612 | ], 613 | "slot_index": 0 614 | }, 615 | { 616 | "name": "CLIP", 617 | "type": "CLIP", 618 | "links": [ 619 | 3, 620 | 5 621 | ], 622 | "slot_index": 1 623 | }, 624 | { 625 | "name": "VAE", 626 | "type": "VAE", 627 | "links": [ 628 | 8 629 | ], 630 | "slot_index": 2 631 | } 632 | ], 633 | "properties": { 634 | "Node name for S&R": "CheckpointLoaderSimple" 635 | }, 636 | "widgets_values": [ 637 | "sd_xl_base_1.0.safetensors" 638 | ] 639 | }, 640 | { 641 | "id": 19, 642 | "type": "SaveImage", 643 | "pos": [ 644 | 1366, 645 | -406 646 | ], 647 | "size": { 648 | "0": 462.1468811035156, 649 | "1": 441.9457702636719 650 | }, 651 | "flags": {}, 652 | "order": 14, 653 | "mode": 0, 654 | "inputs": [ 655 | { 656 | "name": "images", 657 | "type": "IMAGE", 658 | "link": 30 659 | } 660 | ], 661 | "properties": {}, 662 | "widgets_values": [ 663 | "refiner_output" 664 | ], 665 | "shape": 1 666 | }, 667 | { 668 | "id": 21, 669 | "type": "EmptyLatentImage", 670 | "pos": [ 671 | 390, 672 | 242 673 | ], 674 | "size": { 675 | "0": 295.7807922363281, 676 | "1": 106 677 | }, 678 | "flags": {}, 679 | "order": 0, 680 | "mode": 0, 681 | "outputs": [ 682 | { 683 | "name": "LATENT", 684 | "type": "LATENT", 685 | "links": [ 686 | 38 687 | ], 688 | "shape": 3, 689 | "slot_index": 0 690 | } 691 | ], 692 | "title": "Image Size\n", 693 | "properties": { 694 | "Node name for S&R": "EmptyLatentImage" 695 | }, 696 | "widgets_values": [ 697 | 1024, 698 | 1024, 699 | 1 700 | ] 701 | } 702 | ], 703 | "links": [ 704 | [ 705 | 3, 706 | 4, 707 | 1, 708 | 6, 709 | 0, 710 | "CLIP" 711 | ], 712 | [ 713 | 5, 714 | 4, 715 | 1, 716 | 7, 717 | 0, 718 | "CLIP" 719 | ], 720 | [ 721 | 8, 722 | 4, 723 | 2, 724 | 8, 725 | 1, 726 | "VAE" 727 | ], 728 | [ 729 | 9, 730 | 8, 731 | 0, 732 | 9, 733 | 0, 734 | "IMAGE" 735 | ], 736 | [ 737 | 11, 738 | 11, 739 | 1, 740 | 12, 741 | 0, 742 | "CLIP" 743 | ], 744 | [ 745 | 13, 746 | 11, 747 | 1, 748 | 13, 749 | 0, 750 | "CLIP" 751 | ], 752 | [ 753 | 18, 754 | 15, 755 | 0, 756 | 12, 757 | 1, 758 | "STRING" 759 | ], 760 | [ 761 | 19, 762 | 15, 763 | 0, 764 | 6, 765 | 1, 766 | "STRING" 767 | ], 768 | [ 769 | 21, 770 | 16, 771 | 0, 772 | 13, 773 | 1, 774 | "STRING" 775 | ], 776 | [ 777 | 22, 778 | 16, 779 | 0, 780 | 7, 781 | 1, 782 | "STRING" 783 | ], 784 | [ 785 | 24, 786 | 6, 787 | 0, 788 | 17, 789 | 1, 790 | "CONDITIONING" 791 | ], 792 | [ 793 | 25, 794 | 7, 795 | 0, 796 | 17, 797 | 2, 798 | "CONDITIONING" 799 | ], 800 | [ 801 | 27, 802 | 4, 803 | 0, 804 | 17, 805 | 0, 806 | "MODEL" 807 | ], 808 | [ 809 | 28, 810 | 17, 811 | 0, 812 | 8, 813 | 0, 814 | "LATENT" 815 | ], 816 | [ 817 | 30, 818 | 18, 819 | 0, 820 | 19, 821 | 0, 822 | "IMAGE" 823 | ], 824 | [ 825 | 32, 826 | 12, 827 | 0, 828 | 20, 829 | 1, 830 | "CONDITIONING" 831 | ], 832 | [ 833 | 33, 834 | 13, 835 | 0, 836 | 20, 837 | 2, 838 | "CONDITIONING" 839 | ], 840 | [ 841 | 34, 842 | 11, 843 | 0, 844 | 20, 845 | 0, 846 | "MODEL" 847 | ], 848 | [ 849 | 35, 850 | 17, 851 | 0, 852 | 20, 853 | 3, 854 | "LATENT" 855 | ], 856 | [ 857 | 36, 858 | 20, 859 | 0, 860 | 18, 861 | 0, 862 | "LATENT" 863 | ], 864 | [ 865 | 37, 866 | 11, 867 | 2, 868 | 18, 869 | 1, 870 | "VAE" 871 | ], 872 | [ 873 | 38, 874 | 21, 875 | 0, 876 | 17, 877 | 3, 878 | "LATENT" 879 | ] 880 | ], 881 | "groups": [ 882 | { 883 | "title": "REFINER HERE", 884 | "bounding": [ 885 | -55, 886 | -455, 887 | 381, 888 | 183 889 | ], 890 | "color": "#3f789e" 891 | }, 892 | { 893 | "title": "BASE HERE", 894 | "bounding": [ 895 | -77, 896 | 278, 897 | 444, 898 | 203 899 | ], 900 | "color": "#8A8" 901 | }, 902 | { 903 | "title": "RESULT WITHOUT REFINER", 904 | "bounding": [ 905 | 1337, 906 | 84, 907 | 461, 908 | 543 909 | ], 910 | "color": "#b58b2a" 911 | }, 912 | { 913 | "title": "RESULT WITH REFINER", 914 | "bounding": [ 915 | 1331, 916 | -498, 917 | 552, 918 | 560 919 | ], 920 | "color": "#a1309b" 921 | }, 922 | { 923 | "title": "SDXL 1.0", 924 | "bounding": [ 925 | 422, 926 | -89, 927 | 180, 928 | 80 929 | ], 930 | "color": "#8AA" 931 | } 932 | ], 933 | "config": {}, 934 | "extra": {}, 935 | "version": 0.4 936 | } -------------------------------------------------------------------------------- /sdxl_v0.9_comfyui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v0.9_comfyui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "import os\n", 21 | "\n", 22 | "!apt -y update -qq\n", 23 | "!wget https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 -O /content/libtcmalloc_minimal.so.4\n", 24 | "%env LD_PRELOAD=/content/libtcmalloc_minimal.so.4\n", 25 | "\n", 26 | "!apt -y install -qq aria2\n", 27 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 28 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 29 | "!pip install -q mediapipe==0.9.1.0 addict yapf fvcore omegaconf\n", 30 | "\n", 31 | "!git clone -b v1.3 https://github.com/camenduru/ComfyUI\n", 32 | "%cd /content/ComfyUI\n", 33 | "!pip install -q -r requirements.txt\n", 34 | "\n", 35 | "!wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O /content/cloudflared-linux-amd64 && chmod 777 /content/cloudflared-linux-amd64\n", 36 | "import atexit, requests, subprocess, time, re, os\n", 37 | "from random import randint\n", 38 | "from threading import Timer\n", 39 | "from queue import Queue\n", 40 | "def cloudflared(port, metrics_port, output_queue):\n", 41 | " atexit.register(lambda p: p.terminate(), subprocess.Popen(['/content/cloudflared-linux-amd64', 'tunnel', '--url', f'http://127.0.0.1:{port}', '--metrics', f'127.0.0.1:{metrics_port}'], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT))\n", 42 | " attempts, tunnel_url = 0, None\n", 43 | " while attempts < 10 and not tunnel_url:\n", 44 | " attempts += 1\n", 45 | " time.sleep(3)\n", 46 | " try:\n", 47 | " tunnel_url = re.search(\"(?Phttps?:\\/\\/[^\\s]+.trycloudflare.com)\", requests.get(f'http://127.0.0.1:{metrics_port}/metrics').text).group(\"url\")\n", 48 | " except:\n", 49 | " pass\n", 50 | " if not tunnel_url:\n", 51 | " raise Exception(\"Can't connect to Cloudflare Edge\")\n", 52 | " output_queue.put(tunnel_url)\n", 53 | "output_queue, metrics_port = Queue(), randint(8100, 9000)\n", 54 | "thread = Timer(2, cloudflared, args=(8188, metrics_port, output_queue))\n", 55 | "thread.start()\n", 56 | "thread.join()\n", 57 | "tunnel_url = output_queue.get()\n", 58 | "os.environ['webui_url'] = tunnel_url\n", 59 | "print(tunnel_url)\n", 60 | "\n", 61 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth -d /content/ComfyUI/models/upscale_models -o RealESRGAN_x2plus.pth\n", 62 | "\n", 63 | "base = \"https://dagshub.com/sdxl/stable-diffusion-xl-base-0.9/raw/d82c04e3c1866d98718a4c0f7d91392bcd3e0bcd/data/sd_xl_base_0.9.safetensors\"\n", 64 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M {base} -d /content/ComfyUI/models/checkpoints -o sd_xl_base_0.9.safetensors\n", 65 | "\n", 66 | "refiner = \"https://dagshub.com/sdxl/stable-diffusion-xl-refiner-0.9/raw/e7aa1d4794e5c84e1f3940ff082a61be751432ef/data/sd_xl_refiner_0.9.safetensors\"\n", 67 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M {refiner} -d /content/ComfyUI/models/checkpoints -o sd_xl_refiner_0.9.safetensors\n", 68 | "\n", 69 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sdxl_vae/resolve/main/sdxl_vae.safetensors -d /content/ComfyUI/models/vae -o sdxl_vae.vae.safetensors\n", 70 | "\n", 71 | "!python main.py --dont-print-server" 72 | ] 73 | } 74 | ], 75 | "metadata": { 76 | "accelerator": "GPU", 77 | "colab": { 78 | "collapsed_sections": [], 79 | "private_outputs": true, 80 | "provenance": [] 81 | }, 82 | "gpuClass": "standard", 83 | "kernelspec": { 84 | "display_name": "Python 3", 85 | "language": "python", 86 | "name": "python3" 87 | }, 88 | "language_info": { 89 | "name": "python", 90 | "version": "3.10.8" 91 | }, 92 | "vscode": { 93 | "interpreter": { 94 | "hash": "e593ac106456af50ce7af38f9671c411b49d6cd90f9b885e167f0f594e09038c" 95 | } 96 | } 97 | }, 98 | "nbformat": 4, 99 | "nbformat_minor": 0 100 | } 101 | -------------------------------------------------------------------------------- /sdxl_v0.9_comfyui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v0.9_comfyui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /sdxl_v0.9_webui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v0.9_webui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 22 | "\n", 23 | "!apt -y update -qq\n", 24 | "!wget https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 -O /content/libtcmalloc_minimal.so.4\n", 25 | "%env LD_PRELOAD=/content/libtcmalloc_minimal.so.4\n", 26 | "\n", 27 | "!apt -y install -qq aria2\n", 28 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 29 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 30 | "\n", 31 | "!git clone -b v2.6 https://dagshub.com/camenduru/ui\n", 32 | "# !git clone https://huggingface.co/embed/negative /content/ui/embeddings/negative\n", 33 | "# !git clone https://huggingface.co/embed/lora /content/ui/models/Lora/positive\n", 34 | "# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth -d /content/ui/models/ESRGAN -o 4x-UltraSharp.pth\n", 35 | "!git clone https://github.com/camenduru/sd-civitai-browser /content/ui/extensions/sd-civitai-browser\n", 36 | "# !git clone https://github.com/camenduru/control /content/ui/extensions/control\n", 37 | "# !git clone https://github.com/fkunn1326/openpose-editor /content/ui/extensions/openpose-editor\n", 38 | "!git clone https://github.com/camenduru/tunnels /content/ui/extensions/tunnels\n", 39 | "!git clone https://github.com/etherealxx/batchlinks-webui /content/ui/extensions/batchlinks-webui\n", 40 | "%cd /content/ui\n", 41 | "!git reset --hard\n", 42 | "!git -C /content/ui/repositories/stable-diffusion-stability-ai reset --hard\n", 43 | "\n", 44 | "# !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 /content/ui/extensions/control/models -o control_v11e_sd15_ip2p_fp16.safetensors\n", 45 | "# !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 /content/ui/extensions/control/models -o control_v11e_sd15_shuffle_fp16.safetensors\n", 46 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_canny_fp16.safetensors\n", 47 | "# !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 /content/ui/extensions/control/models -o control_v11f1p_sd15_depth_fp16.safetensors\n", 48 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_inpaint_fp16.safetensors\n", 49 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_lineart_fp16.safetensors\n", 50 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_mlsd_fp16.safetensors\n", 51 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_normalbae_fp16.safetensors\n", 52 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_openpose_fp16.safetensors\n", 53 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_scribble_fp16.safetensors\n", 54 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_seg_fp16.safetensors\n", 55 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_softedge_fp16.safetensors\n", 56 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15s2_lineart_anime_fp16.safetensors\n", 57 | "# !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 /content/ui/extensions/control/models -o control_v11f1e_sd15_tile_fp16.safetensors\n", 58 | "# !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 /content/ui/extensions/control/models -o control_v11e_sd15_ip2p_fp16.yaml\n", 59 | "# !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 /content/ui/extensions/control/models -o control_v11e_sd15_shuffle_fp16.yaml\n", 60 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_canny_fp16.yaml\n", 61 | "# !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 /content/ui/extensions/control/models -o control_v11f1p_sd15_depth_fp16.yaml\n", 62 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_inpaint_fp16.yaml\n", 63 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_lineart_fp16.yaml\n", 64 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_mlsd_fp16.yaml\n", 65 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_normalbae_fp16.yaml\n", 66 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_openpose_fp16.yaml\n", 67 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_scribble_fp16.yaml\n", 68 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_seg_fp16.yaml\n", 69 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_softedge_fp16.yaml\n", 70 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15s2_lineart_anime_fp16.yaml\n", 71 | "# !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 /content/ui/extensions/control/models -o control_v11f1e_sd15_tile_fp16.yaml\n", 72 | "# !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 /content/ui/extensions/control/models -o t2iadapter_style_sd14v1.pth\n", 73 | "# !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 /content/ui/extensions/control/models -o t2iadapter_sketch_sd14v1.pth\n", 74 | "# !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 /content/ui/extensions/control/models -o t2iadapter_seg_sd14v1.pth\n", 75 | "# !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 /content/ui/extensions/control/models -o t2iadapter_openpose_sd14v1.pth\n", 76 | "# !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 /content/ui/extensions/control/models -o t2iadapter_keypose_sd14v1.pth\n", 77 | "# !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 /content/ui/extensions/control/models -o t2iadapter_depth_sd14v1.pth\n", 78 | "# !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 /content/ui/extensions/control/models -o t2iadapter_color_sd14v1.pth\n", 79 | "# !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 /content/ui/extensions/control/models -o t2iadapter_canny_sd14v1.pth\n", 80 | "# !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 /content/ui/extensions/control/models -o t2iadapter_canny_sd15v2.pth\n", 81 | "# !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 /content/ui/extensions/control/models -o t2iadapter_depth_sd15v2.pth\n", 82 | "# !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 /content/ui/extensions/control/models -o t2iadapter_sketch_sd15v2.pth\n", 83 | "# !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 /content/ui/extensions/control/models -o t2iadapter_zoedepth_sd15v1.pth\n", 84 | "\n", 85 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://dagshub.com/sdxl/stable-diffusion-xl-base-0.9/raw/d82c04e3c1866d98718a4c0f7d91392bcd3e0bcd/data/sd_xl_base_0.9.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_base_0.9.safetensors\n", 86 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://dagshub.com/sdxl/stable-diffusion-xl-refiner-0.9/raw/e7aa1d4794e5c84e1f3940ff082a61be751432ef/data/sd_xl_refiner_0.9.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_refiner_0.9.safetensors\n", 87 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sdxl_vae/resolve/main/sdxl_vae.safetensors -d /content/ui/models/VAE -o sdxl_vae.vae.safetensors\n", 88 | "\n", 89 | "!sed -i -e 's/\\[\"sd_model_checkpoint\"\\]/\\[\"sd_model_checkpoint\",\"sd_vae\",\"CLIP_stop_at_last_layers\"\\]/g' /content/ui/modules/shared_options.py\n", 90 | "\n", 91 | "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple" 92 | ] 93 | } 94 | ], 95 | "metadata": { 96 | "accelerator": "GPU", 97 | "colab": { 98 | "collapsed_sections": [], 99 | "private_outputs": true, 100 | "provenance": [] 101 | }, 102 | "gpuClass": "standard", 103 | "kernelspec": { 104 | "display_name": "Python 3", 105 | "name": "python3" 106 | }, 107 | "language_info": { 108 | "name": "python" 109 | } 110 | }, 111 | "nbformat": 4, 112 | "nbformat_minor": 0 113 | } 114 | -------------------------------------------------------------------------------- /sdxl_v0.9_webui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v0.9_webui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /sdxl_v1.0_autotrain_train_dreambooth_lora_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_autotrain_train_dreambooth_lora_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": {}, 16 | "outputs": [], 17 | "source": [ 18 | "!pip install -q autotrain-advanced -U\n", 19 | "!autotrain setup\n", 20 | "\n", 21 | "# !mkdir /content/images\n", 22 | "# !pip install datasets\n", 23 | "# from datasets import load_dataset\n", 24 | "# dataset = load_dataset(\"camenduru/plushies\", split=\"train\")\n", 25 | "# for idx, image in enumerate(dataset['image']):\n", 26 | "# image.save(f\"/content/images/{idx}.jpg\")\n", 27 | "\n", 28 | "# !wget https://huggingface.co/test/resolve/main/test.zip -O /content/test.zip\n", 29 | "# !mkdir /content/images\n", 30 | "# !unzip /content/test.zip\n", 31 | "# !mv /content/*.jpg /content/images" 32 | ] 33 | }, 34 | { 35 | "cell_type": "code", 36 | "execution_count": null, 37 | "metadata": { 38 | "id": "SaAJk33ppFw1" 39 | }, 40 | "outputs": [], 41 | "source": [ 42 | "!autotrain dreambooth \\\n", 43 | "--model='stabilityai/stable-diffusion-xl-base-1.0' \\\n", 44 | "--output='lora' \\\n", 45 | "--image-path='/content/images' \\\n", 46 | "--prompt='a photo of a plushie toy' \\\n", 47 | "--resolution=1024 \\\n", 48 | "--batch-size=2 \\\n", 49 | "--num-steps=500 \\\n", 50 | "--gradient-accumulation=4 \\\n", 51 | "--lr=1e-4 \\\n", 52 | "--fp16 \\\n", 53 | "--xformers \\\n", 54 | "--use-8bit-adam \\\n", 55 | "--gradient-checkpointing" 56 | ] 57 | }, 58 | { 59 | "cell_type": "code", 60 | "execution_count": null, 61 | "metadata": {}, 62 | "outputs": [], 63 | "source": [ 64 | "import torch\n", 65 | "from diffusers import DiffusionPipeline, AutoencoderKL\n", 66 | "\n", 67 | "vae = AutoencoderKL.from_pretrained(\"madebyollin/sdxl-vae-fp16-fix\", torch_dtype=torch.float16)\n", 68 | "pipe = DiffusionPipeline.from_pretrained(\"stabilityai/stable-diffusion-xl-base-1.0\", vae=vae, torch_dtype=torch.float16, variant=\"fp16\", use_safetensors=True).to(\"cuda\")\n", 69 | "pipe.load_lora_weights(\"/content/lora\", weight_name=\"pytorch_lora_weights.bin\")" 70 | ] 71 | }, 72 | { 73 | "cell_type": "code", 74 | "execution_count": null, 75 | "metadata": {}, 76 | "outputs": [], 77 | "source": [ 78 | "while True:\n", 79 | " prompt = \"a photo of a plushie toy\"\n", 80 | " negative_prompt = \"\"\n", 81 | " import random\n", 82 | " random = random.randint(0, 9223372036854775807)\n", 83 | " generator = torch.Generator(\"cuda\").manual_seed(random)\n", 84 | " image = pipe(prompt=prompt, negative_prompt=negative_prompt, generator=generator, num_inference_steps=20).images[0]\n", 85 | " image.save(f\"/content/output/{random}.jpg\")\n", 86 | " # from IPython.display import Image\n", 87 | " # Image(f\"/content/output/{random}.jpg\")" 88 | ] 89 | }, 90 | { 91 | "cell_type": "code", 92 | "execution_count": null, 93 | "metadata": {}, 94 | "outputs": [], 95 | "source": [ 96 | "del pipe\n", 97 | "refiner = DiffusionPipeline.from_pretrained(\"stabilityai/stable-diffusion-xl-refiner-1.0\", variant=\"fp16\", torch_dtype=torch.float16, use_safetensors=True).to(\"cuda\")" 98 | ] 99 | }, 100 | { 101 | "cell_type": "code", 102 | "execution_count": null, 103 | "metadata": {}, 104 | "outputs": [], 105 | "source": [ 106 | "rimage = refiner(prompt=prompt, negative_prompt=negative_prompt, generator=generator, num_inference_steps=20, image=image).images[0]\n", 107 | "rimage" 108 | ] 109 | } 110 | ], 111 | "metadata": { 112 | "accelerator": "GPU", 113 | "colab": { 114 | "collapsed_sections": [], 115 | "private_outputs": true, 116 | "provenance": [] 117 | }, 118 | "gpuClass": "standard", 119 | "kernelspec": { 120 | "display_name": "Python 3", 121 | "name": "python3" 122 | }, 123 | "language_info": { 124 | "name": "python" 125 | } 126 | }, 127 | "nbformat": 4, 128 | "nbformat_minor": 0 129 | } 130 | -------------------------------------------------------------------------------- /sdxl_v1.0_autotrain_train_dreambooth_lora_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_autotrain_train_dreambooth_lora_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /sdxl_v1.0_comfyui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_comfyui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "import os\n", 21 | "\n", 22 | "!apt -y update -qq\n", 23 | "!wget https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 -O /content/libtcmalloc_minimal.so.4\n", 24 | "%env LD_PRELOAD=/content/libtcmalloc_minimal.so.4\n", 25 | "\n", 26 | "!apt -y install -qq aria2\n", 27 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 28 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 29 | "!pip install -q mediapipe==0.9.1.0 addict yapf fvcore omegaconf\n", 30 | "\n", 31 | "!git clone -b v1.3 https://github.com/camenduru/ComfyUI\n", 32 | "%cd /content/ComfyUI\n", 33 | "!pip install -q -r requirements.txt\n", 34 | "\n", 35 | "!wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O /content/cloudflared-linux-amd64 && chmod 777 /content/cloudflared-linux-amd64\n", 36 | "import atexit, requests, subprocess, time, re, os\n", 37 | "from random import randint\n", 38 | "from threading import Timer\n", 39 | "from queue import Queue\n", 40 | "def cloudflared(port, metrics_port, output_queue):\n", 41 | " atexit.register(lambda p: p.terminate(), subprocess.Popen(['/content/cloudflared-linux-amd64', 'tunnel', '--url', f'http://127.0.0.1:{port}', '--metrics', f'127.0.0.1:{metrics_port}'], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT))\n", 42 | " attempts, tunnel_url = 0, None\n", 43 | " while attempts < 10 and not tunnel_url:\n", 44 | " attempts += 1\n", 45 | " time.sleep(3)\n", 46 | " try:\n", 47 | " tunnel_url = re.search(\"(?Phttps?:\\/\\/[^\\s]+.trycloudflare.com)\", requests.get(f'http://127.0.0.1:{metrics_port}/metrics').text).group(\"url\")\n", 48 | " except:\n", 49 | " pass\n", 50 | " if not tunnel_url:\n", 51 | " raise Exception(\"Can't connect to Cloudflare Edge\")\n", 52 | " output_queue.put(tunnel_url)\n", 53 | "output_queue, metrics_port = Queue(), randint(8100, 9000)\n", 54 | "thread = Timer(2, cloudflared, args=(8188, metrics_port, output_queue))\n", 55 | "thread.start()\n", 56 | "thread.join()\n", 57 | "tunnel_url = output_queue.get()\n", 58 | "os.environ['webui_url'] = tunnel_url\n", 59 | "print(tunnel_url)\n", 60 | "\n", 61 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth -d /content/ComfyUI/models/upscale_models -o RealESRGAN_x2plus.pth\n", 62 | "\n", 63 | "base = \"https://huggingface.co/ckpt/sd_xl_base_1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors\"\n", 64 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M {base} -d /content/ComfyUI/models/checkpoints -o sd_xl_base_1.0.safetensors\n", 65 | "\n", 66 | "refiner = \"https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors\"\n", 67 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M {refiner} -d /content/ComfyUI/models/checkpoints -o sd_xl_refiner_1.0.safetensors\n", 68 | "\n", 69 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sdxl_vae/resolve/main/sdxl_vae.safetensors -d /content/ComfyUI/models/vae -o sdxl_vae.vae.safetensors\n", 70 | "\n", 71 | "!python main.py --dont-print-server" 72 | ] 73 | } 74 | ], 75 | "metadata": { 76 | "accelerator": "GPU", 77 | "colab": { 78 | "collapsed_sections": [], 79 | "private_outputs": true, 80 | "provenance": [] 81 | }, 82 | "gpuClass": "standard", 83 | "kernelspec": { 84 | "display_name": "Python 3", 85 | "language": "python", 86 | "name": "python3" 87 | }, 88 | "language_info": { 89 | "name": "python", 90 | "version": "3.10.8" 91 | }, 92 | "vscode": { 93 | "interpreter": { 94 | "hash": "e593ac106456af50ce7af38f9671c411b49d6cd90f9b885e167f0f594e09038c" 95 | } 96 | } 97 | }, 98 | "nbformat": 4, 99 | "nbformat_minor": 0 100 | } 101 | -------------------------------------------------------------------------------- /sdxl_v1.0_comfyui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_comfyui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /sdxl_v1.0_controlnet_comfyui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_controlnet_comfyui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "import os\n", 21 | "\n", 22 | "!apt -y update -qq\n", 23 | "!wget https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 -O /content/libtcmalloc_minimal.so.4\n", 24 | "%env LD_PRELOAD=/content/libtcmalloc_minimal.so.4\n", 25 | "\n", 26 | "!apt -y install -qq aria2\n", 27 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 28 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 29 | "!pip install -q mediapipe==0.9.1.0 addict yapf fvcore omegaconf\n", 30 | "\n", 31 | "!git clone -b v1.5 https://github.com/camenduru/ComfyUI\n", 32 | "%cd /content/ComfyUI\n", 33 | "!pip install -q -r requirements.txt\n", 34 | "# !git reset --hard\n", 35 | "!git clone -b v1.5 https://github.com/camenduru/comfy_controlnet_preprocessors /content/ComfyUI/custom_nodes/comfy_controlnet_preprocessors\n", 36 | "%cd /content/ComfyUI/custom_nodes/comfy_controlnet_preprocessors\n", 37 | "!python install.py --no_download_ckpts\n", 38 | "%cd /content/ComfyUI\n", 39 | "\n", 40 | "!wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64 -O /content/cloudflared-linux-amd64 && chmod 777 /content/cloudflared-linux-amd64\n", 41 | "import atexit, requests, subprocess, time, re, os\n", 42 | "from random import randint\n", 43 | "from threading import Timer\n", 44 | "from queue import Queue\n", 45 | "def cloudflared(port, metrics_port, output_queue):\n", 46 | " atexit.register(lambda p: p.terminate(), subprocess.Popen(['/content/cloudflared-linux-amd64', 'tunnel', '--url', f'http://127.0.0.1:{port}', '--metrics', f'127.0.0.1:{metrics_port}'], stdout=subprocess.DEVNULL, stderr=subprocess.STDOUT))\n", 47 | " attempts, tunnel_url = 0, None\n", 48 | " while attempts < 10 and not tunnel_url:\n", 49 | " attempts += 1\n", 50 | " time.sleep(3)\n", 51 | " try:\n", 52 | " tunnel_url = re.search(\"(?Phttps?:\\/\\/[^\\s]+.trycloudflare.com)\", requests.get(f'http://127.0.0.1:{metrics_port}/metrics').text).group(\"url\")\n", 53 | " except:\n", 54 | " pass\n", 55 | " if not tunnel_url:\n", 56 | " raise Exception(\"Can't connect to Cloudflare Edge\")\n", 57 | " output_queue.put(tunnel_url)\n", 58 | "output_queue, metrics_port = Queue(), randint(8100, 9000)\n", 59 | "thread = Timer(2, cloudflared, args=(8188, metrics_port, output_queue))\n", 60 | "thread.start()\n", 61 | "thread.join()\n", 62 | "tunnel_url = output_queue.get()\n", 63 | "os.environ['webui_url'] = tunnel_url\n", 64 | "print(tunnel_url)\n", 65 | "\n", 66 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/controlnet-sdxl-1.0/resolve/main/OpenPoseXL2.safetensors -d /content/ComfyUI/models/controlnet -o OpenPoseXL2.safetensors\n", 67 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/controlnet-sdxl-1.0/resolve/main/control-lora-canny-rank128.safetensors -d /content/ComfyUI/models/controlnet -o control-lora-canny-rank128.safetensors\n", 68 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/controlnet-sdxl-1.0/resolve/main/control-lora-canny-rank256.safetensors -d /content/ComfyUI/models/controlnet -o control-lora-canny-rank256.safetensors\n", 69 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/controlnet-sdxl-1.0/resolve/main/control-lora-depth-rank128.safetensors -d /content/ComfyUI/models/controlnet -o control-lora-depth-rank128.safetensors\n", 70 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/controlnet-sdxl-1.0/resolve/main/control-lora-depth-rank256.safetensors -d /content/ComfyUI/models/controlnet -o control-lora-depth-rank256.safetensors\n", 71 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/controlnet-sdxl-1.0/resolve/main/control-lora-recolor-rank128.safetensors -d /content/ComfyUI/models/controlnet -o control-lora-recolor-rank128.safetensors\n", 72 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/controlnet-sdxl-1.0/resolve/main/control-lora-recolor-rank256.safetensors -d /content/ComfyUI/models/controlnet -o control-lora-recolor-rank256.safetensors\n", 73 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/controlnet-sdxl-1.0/resolve/main/control-lora-sketch-rank128-metadata.safetensors -d /content/ComfyUI/models/controlnet -o control-lora-sketch-rank128-metadata.safetensors\n", 74 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/controlnet-sdxl-1.0/resolve/main/control-lora-sketch-rank256.safetensors -d /content/ComfyUI/models/controlnet -o control-lora-sketch-rank256.safetensors\n", 75 | "\n", 76 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://github.com/xinntao/Real-ESRGAN/releases/download/v0.2.1/RealESRGAN_x2plus.pth -d /content/ComfyUI/models/upscale_models -o RealESRGAN_x2plus.pth\n", 77 | "base = \"https://huggingface.co/ckpt/sd_xl_base_1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors\"\n", 78 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M {base} -d /content/ComfyUI/models/checkpoints -o sd_xl_base_1.0.safetensors\n", 79 | "refiner = \"https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors\"\n", 80 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M {refiner} -d /content/ComfyUI/models/checkpoints -o sd_xl_refiner_1.0.safetensors\n", 81 | "\n", 82 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sdxl_vae/resolve/main/sdxl_vae.safetensors -d /content/ComfyUI/models/vae -o sdxl_vae.vae.safetensors\n", 83 | "\n", 84 | "!python main.py --dont-print-server" 85 | ] 86 | } 87 | ], 88 | "metadata": { 89 | "accelerator": "GPU", 90 | "colab": { 91 | "collapsed_sections": [], 92 | "private_outputs": true, 93 | "provenance": [] 94 | }, 95 | "gpuClass": "standard", 96 | "kernelspec": { 97 | "display_name": "Python 3", 98 | "language": "python", 99 | "name": "python3" 100 | }, 101 | "language_info": { 102 | "name": "python", 103 | "version": "3.10.8" 104 | }, 105 | "vscode": { 106 | "interpreter": { 107 | "hash": "e593ac106456af50ce7af38f9671c411b49d6cd90f9b885e167f0f594e09038c" 108 | } 109 | } 110 | }, 111 | "nbformat": 4, 112 | "nbformat_minor": 0 113 | } 114 | -------------------------------------------------------------------------------- /sdxl_v1.0_controlnet_comfyui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_controlnet_comfyui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /sdxl_v1.0_diffusers_train_dreambooth_lora_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_diffusers_train_dreambooth_lora_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "!pip install xformers bitsandbytes transformers accelerate -q\n", 21 | "!pip install git+https://github.com/huggingface/diffusers.git -q\n", 22 | "!wget https://raw.githubusercontent.com/huggingface/diffusers/main/examples/dreambooth/train_dreambooth_lora_sdxl.py -O /content/train_dreambooth_lora_sdxl.py\n", 23 | "!accelerate config default\n", 24 | "\n", 25 | "# !mkdir /content/images\n", 26 | "# !pip install datasets\n", 27 | "# from datasets import load_dataset\n", 28 | "# dataset = load_dataset(\"camenduru/plushies\", split=\"train\")\n", 29 | "# for idx, image in enumerate(dataset['image']):\n", 30 | "# image.save(f\"/content/images/{idx}.jpg\")\n", 31 | "\n", 32 | "# !wget https://huggingface.co/test/resolve/main/test.zip -O /content/test.zip\n", 33 | "# !mkdir /content/images\n", 34 | "# !unzip /content/test.zip\n", 35 | "# !mv /content/*.jpg /content/images" 36 | ] 37 | }, 38 | { 39 | "cell_type": "code", 40 | "execution_count": null, 41 | "metadata": {}, 42 | "outputs": [], 43 | "source": [ 44 | "!accelerate launch train_dreambooth_lora_sdxl.py \\\n", 45 | " --pretrained_model_name_or_path=\"stabilityai/stable-diffusion-xl-base-1.0\" \\\n", 46 | " --pretrained_vae_model_name_or_path=\"madebyollin/sdxl-vae-fp16-fix\" \\\n", 47 | " --instance_data_dir=\"images\" \\\n", 48 | " --output_dir=\"lora\" \\\n", 49 | " --mixed_precision=\"fp16\" \\\n", 50 | " --instance_prompt=\"a photo of a plushie toy\" \\\n", 51 | " --resolution=1024 \\\n", 52 | " --train_batch_size=2 \\\n", 53 | " --gradient_accumulation_steps=2 \\\n", 54 | " --gradient_checkpointing \\\n", 55 | " --learning_rate=1e-4 \\\n", 56 | " --lr_scheduler=\"constant\" \\\n", 57 | " --lr_warmup_steps=0 \\\n", 58 | " --enable_xformers_memory_efficient_attention \\\n", 59 | " --mixed_precision=\"fp16\" \\\n", 60 | " --use_8bit_adam \\\n", 61 | " --max_train_steps=500 \\\n", 62 | " --checkpointing_steps=717 \\\n", 63 | " --seed=\"0\"" 64 | ] 65 | }, 66 | { 67 | "cell_type": "code", 68 | "execution_count": null, 69 | "metadata": {}, 70 | "outputs": [], 71 | "source": [ 72 | "import torch\n", 73 | "from diffusers import DiffusionPipeline, AutoencoderKL\n", 74 | "\n", 75 | "vae = AutoencoderKL.from_pretrained(\"madebyollin/sdxl-vae-fp16-fix\", torch_dtype=torch.float16)\n", 76 | "pipe = DiffusionPipeline.from_pretrained(\"stabilityai/stable-diffusion-xl-base-1.0\", vae=vae, torch_dtype=torch.float16, variant=\"fp16\", use_safetensors=True).to(\"cuda\")\n", 77 | "pipe.load_lora_weights(\"/content/lora\", weight_name=\"pytorch_lora_weights.bin\")" 78 | ] 79 | }, 80 | { 81 | "cell_type": "code", 82 | "execution_count": null, 83 | "metadata": {}, 84 | "outputs": [], 85 | "source": [ 86 | "while True:\n", 87 | " prompt = \"a photo of a plushie toy\"\n", 88 | " negative_prompt = \"\"\n", 89 | " import random\n", 90 | " random = random.randint(0, 9223372036854775807)\n", 91 | " generator = torch.Generator(\"cuda\").manual_seed(random)\n", 92 | " image = pipe(prompt=prompt, negative_prompt=negative_prompt, generator=generator, num_inference_steps=20).images[0]\n", 93 | " image.save(f\"/content/output/{random}.jpg\")\n", 94 | " # from IPython.display import Image\n", 95 | " # Image(f\"/content/output/{random}.jpg\")" 96 | ] 97 | }, 98 | { 99 | "cell_type": "code", 100 | "execution_count": null, 101 | "metadata": {}, 102 | "outputs": [], 103 | "source": [ 104 | "del pipe\n", 105 | "refiner = DiffusionPipeline.from_pretrained(\"stabilityai/stable-diffusion-xl-refiner-1.0\", variant=\"fp16\", torch_dtype=torch.float16, use_safetensors=True).to(\"cuda\")" 106 | ] 107 | }, 108 | { 109 | "cell_type": "code", 110 | "execution_count": null, 111 | "metadata": {}, 112 | "outputs": [], 113 | "source": [ 114 | "rimage = refiner(prompt=prompt, negative_prompt=negative_prompt, generator=generator, num_inference_steps=20, image=image).images[0]\n", 115 | "rimage" 116 | ] 117 | } 118 | ], 119 | "metadata": { 120 | "accelerator": "GPU", 121 | "colab": { 122 | "collapsed_sections": [], 123 | "private_outputs": true, 124 | "provenance": [] 125 | }, 126 | "gpuClass": "standard", 127 | "kernelspec": { 128 | "display_name": "Python 3", 129 | "name": "python3" 130 | }, 131 | "language_info": { 132 | "name": "python" 133 | } 134 | }, 135 | "nbformat": 4, 136 | "nbformat_minor": 0 137 | } 138 | -------------------------------------------------------------------------------- /sdxl_v1.0_diffusers_train_dreambooth_lora_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_diffusers_train_dreambooth_lora_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /sdxl_v1.0_webui_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_webui_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 22 | "\n", 23 | "!apt -y update -qq\n", 24 | "!wget https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 -O /content/libtcmalloc_minimal.so.4\n", 25 | "%env LD_PRELOAD=/content/libtcmalloc_minimal.so.4\n", 26 | "\n", 27 | "!apt -y install -qq aria2\n", 28 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 29 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 30 | "\n", 31 | "!git clone -b v2.6 https://dagshub.com/camenduru/ui\n", 32 | "# !git clone https://huggingface.co/embed/negative /content/ui/embeddings/negative\n", 33 | "# !git clone https://huggingface.co/embed/lora /content/ui/models/Lora/positive\n", 34 | "# !aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/embed/upscale/resolve/main/4x-UltraSharp.pth -d /content/ui/models/ESRGAN -o 4x-UltraSharp.pth\n", 35 | "!git clone https://github.com/camenduru/sd-civitai-browser /content/ui/extensions/sd-civitai-browser\n", 36 | "# !git clone https://github.com/camenduru/control /content/ui/extensions/control\n", 37 | "# !git clone https://github.com/fkunn1326/openpose-editor /content/ui/extensions/openpose-editor\n", 38 | "!git clone https://github.com/camenduru/tunnels /content/ui/extensions/tunnels\n", 39 | "!git clone https://github.com/etherealxx/batchlinks-webui /content/ui/extensions/batchlinks-webui\n", 40 | "%cd /content/ui\n", 41 | "!git reset --hard\n", 42 | "!git -C /content/ui/repositories/stable-diffusion-stability-ai reset --hard\n", 43 | "\n", 44 | "# !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 /content/ui/extensions/control/models -o control_v11e_sd15_ip2p_fp16.safetensors\n", 45 | "# !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 /content/ui/extensions/control/models -o control_v11e_sd15_shuffle_fp16.safetensors\n", 46 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_canny_fp16.safetensors\n", 47 | "# !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 /content/ui/extensions/control/models -o control_v11f1p_sd15_depth_fp16.safetensors\n", 48 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_inpaint_fp16.safetensors\n", 49 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_lineart_fp16.safetensors\n", 50 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_mlsd_fp16.safetensors\n", 51 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_normalbae_fp16.safetensors\n", 52 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_openpose_fp16.safetensors\n", 53 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_scribble_fp16.safetensors\n", 54 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_seg_fp16.safetensors\n", 55 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_softedge_fp16.safetensors\n", 56 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15s2_lineart_anime_fp16.safetensors\n", 57 | "# !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 /content/ui/extensions/control/models -o control_v11f1e_sd15_tile_fp16.safetensors\n", 58 | "# !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 /content/ui/extensions/control/models -o control_v11e_sd15_ip2p_fp16.yaml\n", 59 | "# !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 /content/ui/extensions/control/models -o control_v11e_sd15_shuffle_fp16.yaml\n", 60 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_canny_fp16.yaml\n", 61 | "# !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 /content/ui/extensions/control/models -o control_v11f1p_sd15_depth_fp16.yaml\n", 62 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_inpaint_fp16.yaml\n", 63 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_lineart_fp16.yaml\n", 64 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_mlsd_fp16.yaml\n", 65 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_normalbae_fp16.yaml\n", 66 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_openpose_fp16.yaml\n", 67 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_scribble_fp16.yaml\n", 68 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_seg_fp16.yaml\n", 69 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15_softedge_fp16.yaml\n", 70 | "# !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 /content/ui/extensions/control/models -o control_v11p_sd15s2_lineart_anime_fp16.yaml\n", 71 | "# !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 /content/ui/extensions/control/models -o control_v11f1e_sd15_tile_fp16.yaml\n", 72 | "# !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 /content/ui/extensions/control/models -o t2iadapter_style_sd14v1.pth\n", 73 | "# !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 /content/ui/extensions/control/models -o t2iadapter_sketch_sd14v1.pth\n", 74 | "# !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 /content/ui/extensions/control/models -o t2iadapter_seg_sd14v1.pth\n", 75 | "# !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 /content/ui/extensions/control/models -o t2iadapter_openpose_sd14v1.pth\n", 76 | "# !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 /content/ui/extensions/control/models -o t2iadapter_keypose_sd14v1.pth\n", 77 | "# !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 /content/ui/extensions/control/models -o t2iadapter_depth_sd14v1.pth\n", 78 | "# !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 /content/ui/extensions/control/models -o t2iadapter_color_sd14v1.pth\n", 79 | "# !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 /content/ui/extensions/control/models -o t2iadapter_canny_sd14v1.pth\n", 80 | "# !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 /content/ui/extensions/control/models -o t2iadapter_canny_sd15v2.pth\n", 81 | "# !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 /content/ui/extensions/control/models -o t2iadapter_depth_sd15v2.pth\n", 82 | "# !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 /content/ui/extensions/control/models -o t2iadapter_sketch_sd15v2.pth\n", 83 | "# !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 /content/ui/extensions/control/models -o t2iadapter_zoedepth_sd15v1.pth\n", 84 | "\n", 85 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_base_1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_base_1.0.safetensors\n", 86 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_refiner_1.0.safetensors\n", 87 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sdxl_vae/resolve/main/sdxl_vae.safetensors -d /content/ui/models/VAE -o sdxl_vae.vae.safetensors\n", 88 | "\n", 89 | "!sed -i -e 's/\\[\"sd_model_checkpoint\"\\]/\\[\"sd_model_checkpoint\",\"sd_vae\",\"CLIP_stop_at_last_layers\"\\]/g' /content/ui/modules/shared_options.py\n", 90 | "\n", 91 | "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple" 92 | ] 93 | } 94 | ], 95 | "metadata": { 96 | "accelerator": "GPU", 97 | "colab": { 98 | "collapsed_sections": [], 99 | "private_outputs": true, 100 | "provenance": [] 101 | }, 102 | "gpuClass": "standard", 103 | "kernelspec": { 104 | "display_name": "Python 3", 105 | "name": "python3" 106 | }, 107 | "language_info": { 108 | "name": "python" 109 | } 110 | }, 111 | "nbformat": 4, 112 | "nbformat_minor": 0 113 | } 114 | -------------------------------------------------------------------------------- /sdxl_v1.0_webui_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_webui_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /sdxl_v1.0_webui_dev_colab.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "cell_type": "markdown", 5 | "metadata": { 6 | "id": "view-in-github" 7 | }, 8 | "source": [ 9 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_webui_dev_colab.ipynb)" 10 | ] 11 | }, 12 | { 13 | "cell_type": "code", 14 | "execution_count": null, 15 | "metadata": { 16 | "id": "SaAJk33ppFw1" 17 | }, 18 | "outputs": [], 19 | "source": [ 20 | "%cd /content\n", 21 | "%env TF_CPP_MIN_LOG_LEVEL=1\n", 22 | "!apt -y update -qq\n", 23 | "!wget https://github.com/camenduru/gperftools/releases/download/v1.0/libtcmalloc_minimal.so.4 -O /content/libtcmalloc_minimal.so.4\n", 24 | "%env LD_PRELOAD=/content/libtcmalloc_minimal.so.4\n", 25 | "!apt -y install -qq aria2\n", 26 | "!pip install -q torch==2.0.1+cu118 torchvision==0.15.2+cu118 torchaudio==2.0.2+cu118 torchtext==0.15.2 torchdata==0.6.1 --extra-index-url https://download.pytorch.org/whl/cu118 -U\n", 27 | "!pip install -q xformers==0.0.20 triton==2.0.0 -U\n", 28 | "!git clone -b v2.6 https://dagshub.com/camenduru/ui\n", 29 | "!git clone https://dagshub.com/camenduru/control /content/ui/extensions/control\n", 30 | "!git clone https://dagshub.com/camenduru/deforum /content/ui/extensions/deforum\n", 31 | "!git clone https://github.com/camenduru/tunnels /content/ui/extensions/tunnels\n", 32 | "!git clone https://github.com/camenduru/sd-civitai-browser /content/ui/extensions/sd-civitai-browser\n", 33 | "!git clone https://github.com/etherealxx/batchlinks-webui /content/ui/extensions/batchlinks-webui\n", 34 | "%cd /content/ui\n", 35 | "!git reset --hard\n", 36 | "!git -C /content/ui/extensions/deforum reset --hard\n", 37 | "!sed -i -e 's/\\[\"sd_model_checkpoint\"\\]/\\[\"sd_model_checkpoint\",\"sd_vae\",\"CLIP_stop_at_last_layers\"\\]/g' /content/ui/modules/shared_options.py\n", 38 | "!sed -i -e 's/\\.sd-webui-controlnet/\\.control/g' /content/ui/extensions/deforum/scripts/deforum_helpers/deforum_controlnet.py\n", 39 | "\n", 40 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_refiner_1.0/resolve/main/sd_xl_refiner_1.0_0.9vae.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_refiner_1.0.safetensors\n", 41 | "!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/sd_xl_base_1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors -d /content/ui/models/Stable-diffusion -o sd_xl_base_1.0.safetensors\n", 42 | "\n", 43 | "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --multiple" 44 | ] 45 | } 46 | ], 47 | "metadata": { 48 | "accelerator": "GPU", 49 | "colab": { 50 | "collapsed_sections": [], 51 | "private_outputs": true, 52 | "provenance": [] 53 | }, 54 | "gpuClass": "standard", 55 | "kernelspec": { 56 | "display_name": "Python 3", 57 | "name": "python3" 58 | }, 59 | "language_info": { 60 | "name": "python" 61 | } 62 | }, 63 | "nbformat": 4, 64 | "nbformat_minor": 0 65 | } 66 | -------------------------------------------------------------------------------- /sdxl_v1.0_webui_dev_colab_run.ipynb: -------------------------------------------------------------------------------- 1 | { 2 | "cells": [ 3 | { 4 | "attachments": {}, 5 | "cell_type": "markdown", 6 | "metadata": { 7 | "id": "view-in-github" 8 | }, 9 | "source": [ 10 | "[![Open In Colab](https://colab.research.google.com/assets/colab-badge.svg)](https://colab.research.google.com/github/camenduru/sdxl-colab/blob/main/sdxl_v1.0_webui_dev_colab_run.ipynb)" 11 | ] 12 | }, 13 | { 14 | "cell_type": "code", 15 | "execution_count": null, 16 | "metadata": {}, 17 | "outputs": [], 18 | "source": [ 19 | "%cd /content\n", 20 | "import urllib, requests\n", 21 | "from notebook import notebookapp\n", 22 | "name = requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"name\"].replace(\"_run\", \"\")\n", 23 | "url = '/'.join(urllib.parse.unquote(requests.get(f\"{list(notebookapp.list_running_servers())[0]['url']}api/sessions\").json()[0][\"path\"].split(\"=\", 1)[1]).split(\"/\")).replace(\"/blob/\", \"/\").replace(\"github.com\", \"raw.githubusercontent.com\").replace(\"_run\", \"\")\n", 24 | "!wget {url} -O {name}\n", 25 | "%run {name}" 26 | ] 27 | } 28 | ], 29 | "metadata": { 30 | "accelerator": "GPU", 31 | "colab": { 32 | "collapsed_sections": [], 33 | "private_outputs": true, 34 | "provenance": [] 35 | }, 36 | "gpuClass": "standard", 37 | "kernelspec": { 38 | "display_name": "Python 3", 39 | "language": "python", 40 | "name": "python3" 41 | }, 42 | "language_info": { 43 | "name": "python", 44 | "version": "3.10.8" 45 | } 46 | }, 47 | "nbformat": 4, 48 | "nbformat_minor": 0 49 | } -------------------------------------------------------------------------------- /tost.json: -------------------------------------------------------------------------------- 1 | { 2 | "$schema": "http://json-schema.org/draft-04/hyper-schema#", 3 | "type": "object", 4 | "properties": { 5 | "readme": { 6 | "type": "string", 7 | "title": "SDXL: Improving Latent Diffusion Models for High-Resolution Image Synthesis", 8 | "author": "Dustin Podell, Zion English, Kyle Lacey, Andreas Blattmann, Tim Dockhorn, Jonas Müller, Joe Penna, Robin Rombach", 9 | "description": "We present SDXL, a latent diffusion model for text-to-image synthesis. Compared to previous versions of Stable Diffusion, SDXL leverages a three times larger UNet backbone: The increase of model parameters is mainly due to more attention blocks and a larger cross-attention context as SDXL uses a second text encoder. We design multiple novel conditioning schemes and train SDXL on multiple aspect ratios. We also introduce a refinement model which is used to improve the visual fidelity of samples generated by SDXL using a post-hoc image-to-image technique. We demonstrate that SDXL shows drastically improved performance compared the previous versions of Stable Diffusion and achieves results competitive with those of black-box state-of-the-art image generators. In the spirit of promoting open research and fostering transparency in large model training and evaluation", 10 | "code": "https://github.com/Stability-AI/generative-models", 11 | "paper": "https://arxiv.org/abs/2307.01952", 12 | "page": "https://stability.ai/news/stable-diffusion-sdxl-1-announcement", 13 | "jupyter": "https://github.com/camenduru/sdxl-colab", 14 | "post": "https://twitter.com/camenduru/status/1697317138116034778", 15 | "tags": [ 16 | "Text to Image" 17 | ], 18 | "widget": "readme" 19 | }, 20 | "prompt": { 21 | "type": "string", 22 | "description": "Prompt", 23 | "widget": "textarea" 24 | }, 25 | "negative_prompt": { 26 | "type": "string", 27 | "description": "Negative Prompt", 28 | "widget": "textarea" 29 | }, 30 | "width": { 31 | "type": "integer", 32 | "description": "Width" 33 | }, 34 | "height": { 35 | "type": "integer", 36 | "description": "Height" 37 | } 38 | }, 39 | "buttons": [ 40 | { 41 | "id": "enter", 42 | "label": "🥪 Enter" 43 | } 44 | ] 45 | } --------------------------------------------------------------------------------