diff --git "a/Sagemaker_Notebook_1.3.ipynb" "b/Sagemaker_Notebook_1.3.ipynb" deleted file mode 100644--- "a/Sagemaker_Notebook_1.3.ipynb" +++ /dev/null @@ -1,3451 +0,0 @@ -{ - "cells": [ - { - "cell_type": "markdown", - "id": "2a86fcac-7907-4ab9-8287-d21b241e1b89", - "metadata": {}, - "source": [ - "RUN THIS CODE BELOW (Only in the first run)" - ] - }, - { - "cell_type": "code", - "execution_count": 1, - "id": "7ad40e45-9797-4188-be16-2e6c4d218ddc", - "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Collecting package metadata (current_repodata.json): \\ Collecting package metadata (current_repodata.json): / / - done\n", - "Solving environment: done\n", - "Solving environment: done\n", - "done\n", - "\n", - "## Package Plan ##\n", - "\n", - " environment location: /opt/conda\n", - "\n", - " added / updated specs:\n", - " - conda\n", - "\n", - "\n", - "The following packages will be downloaded:\n", - "\n", - " package | build\n", - " ---------------------------|-----------------\n", - " _openmp_mutex-4.5 | 2_gnu 23 KB conda-forge\n", - " boltons-23.0.0 | pyhd8ed1ab_0 296 KB conda-forge\n", - " brotli-python-1.1.0 | py39h3d6467e_0 343 KB conda-forge\n", - " bzip2-1.0.8 | h7f98852_4 484 KB conda-forge\n", - " ca-certificates-2023.7.22 | hbcca054_0 146 KB conda-forge\n", - " certifi-2023.7.22 | pyhd8ed1ab_0 150 KB conda-forge\n", - " cffi-1.15.1 | py39h7a31438_5 231 KB conda-forge\n", - " charset-normalizer-3.2.0 | pyhd8ed1ab_0 45 KB conda-forge\n", - " colorama-0.4.6 | pyhd8ed1ab_0 25 KB conda-forge\n", - " conda-23.7.4 | py39hf3d152e_0 995 KB conda-forge\n", - " conda-package-handling-2.2.0| pyh38be061_0 249 KB conda-forge\n", - " conda-package-streaming-0.9.0| pyhd8ed1ab_0 19 KB conda-forge\n", - " cryptography-41.0.4 | py39hd4f0224_0 1.9 MB conda-forge\n", - " idna-3.4 | pyhd8ed1ab_0 55 KB conda-forge\n", - " jsonpatch-1.33 | pyhd8ed1ab_0 17 KB conda-forge\n", - " jsonpointer-2.4 | py39hf3d152e_3 16 KB conda-forge\n", - " ld_impl_linux-64-2.40 | h41732ed_0 688 KB conda-forge\n", - " libffi-3.4.2 | h7f98852_5 57 KB conda-forge\n", - " libgcc-ng-13.2.0 | h807b86a_2 753 KB conda-forge\n", - " libgomp-13.2.0 | h807b86a_2 411 KB conda-forge\n", - " libnsl-2.0.0 | h7f98852_0 31 KB conda-forge\n", - " libsqlite-3.43.0 | h2797004_0 821 KB conda-forge\n", - " libstdcxx-ng-13.2.0 | h7e041cc_2 3.7 MB conda-forge\n", - " libuuid-2.38.1 | h0b41bf4_0 33 KB conda-forge\n", - " libzlib-1.2.13 | hd590300_5 60 KB conda-forge\n", - " ncurses-6.4 | hcb278e6_0 860 KB conda-forge\n", - " openssl-3.1.3 | hd590300_0 2.5 MB conda-forge\n", - " packaging-23.1 | pyhd8ed1ab_0 45 KB conda-forge\n", - " pluggy-1.3.0 | pyhd8ed1ab_0 22 KB conda-forge\n", - " pycosat-0.6.4 | py39hd1e30aa_2 82 KB conda-forge\n", - " pycparser-2.21 | pyhd8ed1ab_0 100 KB conda-forge\n", - " pyopenssl-23.2.0 | pyhd8ed1ab_1 126 KB conda-forge\n", - " pysocks-1.7.1 | pyha2e5f31_6 19 KB conda-forge\n", - " python-3.9.18 |h0755675_0_cpython 22.7 MB conda-forge\n", - " python_abi-3.9 | 4_cp39 6 KB conda-forge\n", - " readline-8.2 | h8228510_1 275 KB conda-forge\n", - " requests-2.31.0 | pyhd8ed1ab_0 55 KB conda-forge\n", - " ruamel.yaml-0.17.32 | py39hd1e30aa_0 195 KB conda-forge\n", - " ruamel.yaml.clib-0.2.7 | py39h72bdee0_1 140 KB conda-forge\n", - " setuptools-68.2.2 | pyhd8ed1ab_0 454 KB conda-forge\n", - " tk-8.6.13 | h2797004_0 3.1 MB conda-forge\n", - " toolz-0.12.0 | pyhd8ed1ab_0 48 KB conda-forge\n", - " tqdm-4.66.1 | pyhd8ed1ab_0 87 KB conda-forge\n", - " tzdata-2023c | h71feb2d_0 115 KB conda-forge\n", - " urllib3-2.0.5 | pyhd8ed1ab_0 96 KB conda-forge\n", - " wheel-0.41.2 | pyhd8ed1ab_0 56 KB conda-forge\n", - " xz-5.2.6 | h166bdaf_0 409 KB conda-forge\n", - " zstandard-0.21.0 | py39h6e5214e_1 395 KB conda-forge\n", - " zstd-1.5.5 | hfc55251_0 532 KB conda-forge\n", - " ------------------------------------------------------------\n", - " Total: 43.7 MB\n", - "\n", - "The following NEW packages will be INSTALLED:\n", - "\n", - " boltons conda-forge/noarch::boltons-23.0.0-pyhd8ed1ab_0\n", - " brotli-python conda-forge/linux-64::brotli-python-1.1.0-py39h3d6467e_0\n", - " bzip2 conda-forge/linux-64::bzip2-1.0.8-h7f98852_4\n", - " conda-package-str~ conda-forge/noarch::conda-package-streaming-0.9.0-pyhd8ed1ab_0\n", - " jsonpatch conda-forge/noarch::jsonpatch-1.33-pyhd8ed1ab_0\n", - " jsonpointer conda-forge/linux-64::jsonpointer-2.4-py39hf3d152e_3\n", - " libnsl conda-forge/linux-64::libnsl-2.0.0-h7f98852_0\n", - " libsqlite conda-forge/linux-64::libsqlite-3.43.0-h2797004_0\n", - " libuuid conda-forge/linux-64::libuuid-2.38.1-h0b41bf4_0\n", - " libzlib conda-forge/linux-64::libzlib-1.2.13-hd590300_5\n", - " packaging conda-forge/noarch::packaging-23.1-pyhd8ed1ab_0\n", - " pluggy conda-forge/noarch::pluggy-1.3.0-pyhd8ed1ab_0\n", - " ruamel.yaml conda-forge/linux-64::ruamel.yaml-0.17.32-py39hd1e30aa_0\n", - " ruamel.yaml.clib conda-forge/linux-64::ruamel.yaml.clib-0.2.7-py39h72bdee0_1\n", - " toolz conda-forge/noarch::toolz-0.12.0-pyhd8ed1ab_0\n", - " zstandard conda-forge/linux-64::zstandard-0.21.0-py39h6e5214e_1\n", - " zstd conda-forge/linux-64::zstd-1.5.5-hfc55251_0\n", - "\n", - "The following packages will be REMOVED:\n", - "\n", - " brotlipy-0.7.0-py39h3811e60_1001\n", - " chardet-4.0.0-py39hf3d152e_1\n", - " ruamel_yaml-0.15.80-py39h3811e60_1004\n", - " six-1.16.0-pyh6c4a22f_0\n", - " sqlite-3.36.0-h9cd32fc_2\n", - " yaml-0.2.5-h516909a_0\n", - " zlib-1.2.11-h516909a_1010\n", - "\n", - "The following packages will be UPDATED:\n", - "\n", - " _openmp_mutex 4.5-1_gnu --> 4.5-2_gnu\n", - " ca-certificates 2021.5.30-ha878542_0 --> 2023.7.22-hbcca054_0\n", - " certifi conda-forge/linux-64::certifi-2021.5.~ --> conda-forge/noarch::certifi-2023.7.22-pyhd8ed1ab_0\n", - " cffi 1.14.6-py39h4bc2ebd_1 --> 1.15.1-py39h7a31438_5\n", - " charset-normalizer 2.0.0-pyhd8ed1ab_0 --> 3.2.0-pyhd8ed1ab_0\n", - " colorama 0.4.4-pyh9f0ad1d_0 --> 0.4.6-pyhd8ed1ab_0\n", - " conda 4.10.3-py39hf3d152e_2 --> 23.7.4-py39hf3d152e_0\n", - " conda-package-han~ conda-forge/linux-64::conda-package-h~ --> conda-forge/noarch::conda-package-handling-2.2.0-pyh38be061_0\n", - " cryptography 3.4.7-py39hbca0aa6_0 --> 41.0.4-py39hd4f0224_0\n", - " idna 3.1-pyhd3deb0d_0 --> 3.4-pyhd8ed1ab_0\n", - " ld_impl_linux-64 2.36.1-hea4e1c9_2 --> 2.40-h41732ed_0\n", - " libffi 3.4.2-h9c3ff4c_4 --> 3.4.2-h7f98852_5\n", - " libgcc-ng 11.2.0-h1d223b6_9 --> 13.2.0-h807b86a_2\n", - " libgomp 11.2.0-h1d223b6_9 --> 13.2.0-h807b86a_2\n", - " libstdcxx-ng 11.2.0-he4da1e4_9 --> 13.2.0-h7e041cc_2\n", - " ncurses 6.2-h58526e2_4 --> 6.4-hcb278e6_0\n", - " openssl 1.1.1l-h7f98852_0 --> 3.1.3-hd590300_0\n", - " pycosat 0.6.3-py39h3811e60_1006 --> 0.6.4-py39hd1e30aa_2\n", - " pycparser 2.20-pyh9f0ad1d_2 --> 2.21-pyhd8ed1ab_0\n", - " pyopenssl 20.0.1-pyhd8ed1ab_0 --> 23.2.0-pyhd8ed1ab_1\n", - " pysocks conda-forge/linux-64::pysocks-1.7.1-p~ --> conda-forge/noarch::pysocks-1.7.1-pyha2e5f31_6\n", - " python 3.9.7-hb7a2778_2_cpython --> 3.9.18-h0755675_0_cpython\n", - " python_abi 3.9-2_cp39 --> 3.9-4_cp39\n", - " readline 8.1-h46c0cb4_0 --> 8.2-h8228510_1\n", - " requests 2.26.0-pyhd8ed1ab_0 --> 2.31.0-pyhd8ed1ab_0\n", - " setuptools conda-forge/linux-64::setuptools-58.0~ --> conda-forge/noarch::setuptools-68.2.2-pyhd8ed1ab_0\n", - " tk 8.6.11-h27826a3_1 --> 8.6.13-h2797004_0\n", - " tqdm 4.62.3-pyhd8ed1ab_0 --> 4.66.1-pyhd8ed1ab_0\n", - " tzdata 2021a-he74cb21_1 --> 2023c-h71feb2d_0\n", - " urllib3 1.26.7-pyhd8ed1ab_0 --> 2.0.5-pyhd8ed1ab_0\n", - " wheel 0.37.0-pyhd8ed1ab_1 --> 0.41.2-pyhd8ed1ab_0\n", - " xz 5.2.5-h516909a_1 --> 5.2.6-h166bdaf_0\n", - "\n", - "\n", - "\n", - "Downloading and Extracting Packages\n", - "libzlib-1.2.13 | 60 KB | ##################################### | 100% \n", - "cryptography-41.0.4 | 1.9 MB | ##################################### | 100% \n", - "requests-2.31.0 | 55 KB | ##################################### | 100% \n", - "readline-8.2 | 275 KB | | 0% \n", - "\n", - "==> WARNING: A newer version of conda exists. <==\n", - " current version: 4.10.3\n", - " latest version: 23.7.4\n", - "\n", - "Please update conda by running\n", - "\n", - " $ conda update -n base conda\n", - "\n", - "\n", - "readline-8.2 | 275 KB | ##################################### | 100% \n", - "jsonpointer-2.4 | 16 KB | | 0% \n", - "## Package Plan ##\n", - "\n", - " environment location: /home/studio-lab-user/.conda/envs/default\n", - "\n", - " added / updated specs:\n", - " - libglib\n", - "\n", - "\n", - "The following packages will be downloaded:\n", - "\n", - " package | build\n", - " ---------------------------|-----------------\n", - " gettext-0.21.1 | h27087fc_0 4.1 MB conda-forge\n", - " libglib-2.78.0 | hebfc3b9_0 2.6 MB conda-forge\n", - " libiconv-1.17 | h166bdaf_0 1.4 MB conda-forge\n", - " openssl-3.1.3 | hd590300_0 2.5 MB conda-forge\n", - " pcre2-10.40 | hc3806b6_0 2.3 MB conda-forge\n", - " ------------------------------------------------------------\n", - " Total: 12.9 MB\n", - "\n", - "The following NEW packages will be INSTALLED:\n", - "\n", - " gettext conda-forge/linux-64::gettext-0.21.1-h27087fc_0\n", - " libglib conda-forge/linux-64::libglib-2.78.0-hebfc3b9_0\n", - " libiconv conda-forge/linux-64::libiconv-1.17-h166bdaf_0\n", - " pcre2 conda-forge/linux-64::pcre2-10.40-hc3806b6_0\n", - "\n", - "The following packages will be UPDATED:\n", - "\n", - " openssl 3.1.2-hd590300_0 --> 3.1.3-hd590300_0\n", - "\n", - "\n", - "\n", - "Downloading and Extracting Packages\n", - "jsonpointer-2.4 | 16 KB | ##################################### | 100% \n", - "ld_impl_linux-64-2.4 | 688 KB | ##################################### | 100% \n", - "pysocks-1.7.1 | 19 KB | ##################################### | 100% \n", - "cffi-1.15.1 | 231 KB | ##################################### | 100% \n", - "libiconv-1.17 | 1.4 MB | ##################################### | 100% \n", - "zstd-1.5.5 | 532 KB | ##################################### | 100% \n", - "libglib-2.78.0 | 2.6 MB | ##################################### | 100% \n", - "urllib3-2.0.5 | 96 KB | ##################################### | 100% \n", - "ruamel.yaml-0.17.32 | 195 KB | ##################################### | 100% \n", - "pyopenssl-23.2.0 | 126 KB | ##################################### | 100% \n", - "boltons-23.0.0 | 296 KB | ##################################### | 100% \n", - "charset-normalizer-3 | 45 KB | ##################################### | 100% \n", - "ca-certificates-2023 | 146 KB | ##################################### | 100% \n", - "openssl-3.1.3 | 2.5 MB | ##################################### | 100% \n", - "libstdcxx-ng-13.2.0 | 3.7 MB | ##################################### | 100% \n", - "libsqlite-3.43.0 | 821 KB | ##################################### | 100% \n", - "gettext-0.21.1 | 4.1 MB | ##################################### | 100% \n", - "setuptools-68.2.2 | 454 KB | ##################################### | 100% \n", - "conda-package-stream | 19 KB | ##################################### | 100% \n", - "conda-23.7.4 | 995 KB | ##################################### | 100% \n", - "pcre2-10.40 | 2.3 MB | ##################################### | 100% \n", - "openssl-3.1.3 | 2.5 MB | ##################################### | 100% \n", - "python-3.9.18 | 22.7 MB | #################################1 | 90done\n", - "python-3.9.18 | 22.7 MB | ##################################### | 100% \n", - "python_abi-3.9 | 6 KB | ##################################### | 100% \n", - "libnsl-2.0.0 | 31 KB | | 0done\n", - "libnsl-2.0.0 | 31 KB | ##################################### | 100% \n", - "brotli-python-1.1.0 | 343 KB | ##################################### | 100% \n", - "packaging-23.1 | 45 KB | | 0done\n", - "packaging-23.1 | 45 KB | ##################################### | 100% \n", - "pluggy-1.3.0 | 22 KB | ##################################### | 100% \n", - "libuuid-2.38.1 | 33 KB | ##################################### | 100% \n", - "ncurses-6.4 | 860 KB | ##################################### | 100% \n", - "bzip2-1.0.8 | 484 KB | ##################################### | 100% \n", - "certifi-2023.7.22 | 150 KB | ##################################### | 100% \n", - "xz-5.2.6 | 409 KB | ##################################### | 100% \n", - "toolz-0.12.0 | 48 KB | ##################################### | 100% \n", - "conda-package-handli | 249 KB | ##################################### | 100% \n", - "wheel-0.41.2 | 56 KB | ##################################### | 100% \n", - "libgomp-13.2.0 | 411 KB | ##################################### | 100% \n", - "libffi-3.4.2 | 57 KB | ##################################### | 100% \n", - "colorama-0.4.6 | 25 KB | ##################################### | 100% \n", - "tzdata-2023c | 115 KB | ##################################### | 100% \n", - "pycparser-2.21 | 100 KB | ##################################### | 100% \n", - "ruamel.yaml.clib-0.2 | 140 KB | ##################################### | 100% \n", - "_openmp_mutex-4.5 | 23 KB | ##################################### | 100% \n", - "tk-8.6.13 | 3.1 MB | ##################################### | 100% \n", - "pycosat-0.6.4 | 82 KB | ##################################### | 100% \n", - "zstandard-0.21.0 | 395 KB | ##################################### | 100% \n", - "jsonpatch-1.33 | 17 KB | ##################################### | 100% \n", - "tqdm-4.66.1 | 87 KB | ##################################### | 100% \n", - "idna-3.4 | 55 KB | ##################################### | 100% \n", - "libgcc-ng-13.2.0 | 753 KB | ##################################### | 100% \n", - "Preparing transaction: done\n", - "Verifying transaction: done\n", - "Executing transaction: done\n", - "Cloning into 'stable-diffusion-webui'...\n", - "remote: Enumerating objects: 318, done.\u001b[K\n", - "remote: Counting objects: 100% (318/318), done.\u001b[K\n", - "remote: Compressing objects: 100% (290/290), done.\u001b[K\n", - "remote: Total 318 (delta 11), reused 145 (delta 8), pack-reused 0\u001b[K\n", - "Receiving objects: 100% (318/318), 1.69 MiB | 9.48 MiB/s, done.\n", - "Resolving deltas: 100% (11/11), done.\n", - "Encountered 6 file(s) that should have been pointers, but weren't:\n", - "\thtml/card-no-preview.png\n", - "\tmodules/Roboto-Regular.ttf\n", - "\tmodules/textual_inversion/test_embedding.png\n", - "\tscreenshot.png\n", - "\ttest/test_files/img2img_basic.png\n", - "\ttest/test_files/mask_basic.png\n", - "/home/studio-lab-user/stable-diffusion-webui\n", - "Already up to date.\n", - "/home/studio-lab-user/stable-diffusion-webui/embeddings\n", - "Cloning into 'negativekit'...\n", - "remote: Enumerating objects: 34, done.\u001b[K\n", - "remote: Counting objects: 100% (34/34), done.\u001b[K\n", - "remote: Compressing objects: 100% (34/34), done.\u001b[K\n", - "remote: Total 34 (delta 3), reused 0 (delta 0), pack-reused 0\u001b[K\n", - "Unpacking objects: 100% (34/34), 1.46 MiB | 6.83 MiB/s, done.\n", - "/home/studio-lab-user/stable-diffusion-webui/extensions\n", - "Cloning into 'batchlinks-webui'...\n", - "remote: Enumerating objects: 65, done.\u001b[K\n", - "remote: Counting objects: 100% (65/65), done.\u001b[K\n", - "remote: Compressing objects: 100% (60/60), done.\u001b[K\n", - "remote: Total 65 (delta 1), reused 50 (delta 1), pack-reused 0\u001b[K\n", - "Unpacking objects: 100% (65/65), 4.17 MiB | 11.67 MiB/s, done.\n", - "Cloning into 'sd-webui-infinite-image-browsing'...\n", - "remote: Enumerating objects: 179, done.\u001b[K\n", - "remote: Counting objects: 100% (179/179), done.\u001b[K\n", - "remote: Compressing objects: 100% (165/165), done.\u001b[K\n", - "remote: Total 179 (delta 7), reused 108 (delta 2), pack-reused 0\u001b[K\n", - "Receiving objects: 100% (179/179), 1.73 MiB | 8.00 MiB/s, done.\n", - "Resolving deltas: 100% (7/7), done.\n", - "Cloning into 'CN-v11400'...\n", - "remote: Enumerating objects: 1055, done.\u001b[K\n", - "remote: Counting objects: 100% (1055/1055), done.\u001b[K\n", - "remote: Compressing objects: 100% (930/930), done.\u001b[K\n", - "remote: Total 1055 (delta 105), reused 852 (delta 102), pack-reused 0\u001b[K\n", - "Receiving objects: 100% (1055/1055), 8.37 MiB | 35.55 MiB/s, done.\n", - "Resolving deltas: 100% (105/105), done.\n", - "Cloning into 'adetailer'...\n", - "remote: Enumerating objects: 37, done.\u001b[K\n", - "remote: Counting objects: 100% (37/37), done.\u001b[K\n", - "remote: Compressing objects: 100% (34/34), done.\u001b[K\n", - "remote: Total 37 (delta 0), reused 0 (delta 0), pack-reused 0\u001b[K\n", - "Unpacking objects: 100% (37/37), 93.67 KiB | 1.61 MiB/s, done.\n", - "Cloning into 'ultimatesdupscale'...\n", - "remote: Enumerating objects: 7, done.\u001b[K\n", - "remote: Counting objects: 100% (7/7), done.\u001b[K\n", - "remote: Compressing objects: 100% (5/5), done.\u001b[K\n", - "remote: Total 7 (delta 0), reused 6 (delta 0), pack-reused 0\u001b[K\n", - "Unpacking objects: 100% (7/7), 17.82 KiB | 5.94 MiB/s, done.\n", - "Cloning into 'tagcomplete'...\n", - "remote: Enumerating objects: 32, done.\u001b[K\n", - "remote: Counting objects: 100% (32/32), done.\u001b[K\n", - "remote: Compressing objects: 100% (31/31), done.\u001b[K\n", - "remote: Total 32 (delta 4), reused 16 (delta 0), pack-reused 0\u001b[K\n", - "Unpacking objects: 100% (32/32), 1.92 MiB | 8.58 MiB/s, done.\n", - "Cloning into 'sd-webui-regional-prompter'...\n", - "remote: Enumerating objects: 15, done.\u001b[K\n", - "remote: Counting objects: 100% (15/15), done.\u001b[K\n", - "remote: Compressing objects: 100% (15/15), done.\u001b[K\n", - "remote: Total 15 (delta 0), reused 3 (delta 0), pack-reused 0\u001b[K\n", - "Unpacking objects: 100% (15/15), 74.75 KiB | 2.77 MiB/s, done.\n", - "Cloning into 'stable-diffusion-webui-two-shot'...\n", - "remote: Enumerating objects: 13, done.\u001b[K\n", - "remote: Counting objects: 100% (13/13), done.\u001b[K\n", - "remote: Compressing objects: 100% (13/13), done.\u001b[K\n", - "remote: Total 13 (delta 0), reused 6 (delta 0), pack-reused 0\u001b[K\n", - "Unpacking objects: 100% (13/13), 14.23 MiB | 15.44 MiB/s, done.\n", - "Cloning into 'stable-diffusion-webui-composable-lora'...\n", - "remote: Enumerating objects: 30, done.\u001b[K\n", - "remote: Counting objects: 100% (30/30), done.\u001b[K\n", - "remote: Compressing objects: 100% (29/29), done.\u001b[K\n", - "remote: Total 30 (delta 0), reused 24 (delta 0), pack-reused 0\u001b[K\n", - "Unpacking objects: 100% (30/30), 9.54 MiB | 13.15 MiB/s, done.\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 502 0 502 0 0 419 0 --:--:-- 0:00:01 --:--:-- 419\n", - "100 36.1M 100 36.1M 0 0 5291k 0 0:00:06 0:00:06 --:--:-- 6654k\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 496 0 496 0 0 445 0 --:--:-- 0:00:01 --:--:-- 445\n", - "100 111k 100 111k 0 0 80946 0 0:00:01 0:00:01 --:--:-- 80946\n" - ] - } - ], - "source": [ - "#Install all essentials for stable diffusion\n", - "!conda install -c conda-forge libglib -y & conda update -n base conda -y\n", - "!git clone --depth 1 https://github.com/dreamscapeai/stable-diffusion-webui\n", - "%cd ~/stable-diffusion-webui\n", - "!git pull\n", - "\n", - "!mkdir /home/studio-lab-user/stable-diffusion-webui/outputs\n", - "\n", - "%cd /home/studio-lab-user/stable-diffusion-webui/embeddings\n", - "!git clone --depth 1 https://github.com/dreamscapeai/negativekit\n", - "\n", - "%cd /home/studio-lab-user/stable-diffusion-webui/extensions\n", - "!git clone --depth 1 https://github.com/etherealxx/batchlinks-webui\n", - "!git clone --depth 1 https://github.com/zanllp/sd-webui-infinite-image-browsing\n", - "!git clone --depth 1 https://github.com/dreamscapeai/CN-v11400\n", - "!git clone --depth 1 https://github.com/dreamscapeai/adetailer\n", - "!git clone --depth 1 https://github.com/dreamscapeai/ultimatesdupscale\n", - "!git clone --depth 1 https://github.com/dreamscapeai/tagcomplete\n", - "!git clone --depth 1 https://github.com/hako-mikan/sd-webui-regional-prompter\n", - "!git clone --depth 1 https://github.com/ashen-sensored/stable-diffusion-webui-two-shot\n", - "!git clone --depth 1 https://github.com/ashen-sensored/stable-diffusion-webui-composable-lora\n", - "\n", - "#Loras\n", - "!mkdir /home/studio-lab-user/stable-diffusion-webui/models/Lora\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Lora/add_detail.safetensors\" \"https://civitai.com/api/download/models/62833\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/embeddings/UnrealisticDream.pt\" \"https://civitai.com/api/download/models/77173?type=Model&format=PickleTensor\"\n" - ] - }, - { - "cell_type": "markdown", - "id": "0c18d664-3e44-45a6-a25c-8402e590e5b7", - "metadata": {}, - "source": [ - "#lora\n", - "https://civitai.com/models/50847?modelVersionId=55363\n", - "#lora\n", - "https://civitai.com/models/9502/megumin-konosuba" - ] - }, - { - "cell_type": "markdown", - "id": "9c02e956-5769-4be9-96e9-fea479706e91", - "metadata": {}, - "source": [ - "BOOT LAUNCHER " - ] - }, - { - "cell_type": "code", - "execution_count": 8, - "id": "9ea3ea45-056c-4863-a06a-3f7422bf7e20", - "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "/home/studio-lab-user/stable-diffusion-webui\n", - "fatal: No names found, cannot describe anything.\n", - "Python 3.9.16 | packaged by conda-forge | (main, Feb 1 2023, 21:39:03) \n", - "[GCC 11.3.0]\n", - "Version: 1.6.0\n", - "Commit hash: 9f38672ea51e599e63c2b61b383d671815f804a9\n", - "Launching Web UI with arguments: --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --disable-safe-unpickle --ngrok 2PuYOpDmc1VAfpFX8nWrV0wRHAg_kXyGy5pntWhCJyuJ4ViB\n", - "ngrok authtoken detected, trying to connect...\n", - "ngrok connected to localhost:7860! URL: https://6d24-3-136-172-40.ngrok-free.app\n", - "You can use this link after the launch is complete.\n", - "2023-09-25 03:19:27,744 - ControlNet - \u001b[0;32mINFO\u001b[0m - ControlNet v1.1.410\n", - "ControlNet preprocessor location: /home/studio-lab-user/stable-diffusion-webui/extensions/CN-v11400/annotator/downloads\n", - "2023-09-25 03:19:27,939 - ControlNet - \u001b[0;32mINFO\u001b[0m - ControlNet v1.1.410\n", - "\u001b[1m[\u001b[0m-\u001b[1m]\u001b[0m ADetailer initialized. version: \u001b[1;36m23.8\u001b[0m.\u001b[1;36m1\u001b[0m, num models: \u001b[1;36m9\u001b[0m\n", - "Tag Autocomplete: Could not locate model-keyword extension, Lora trigger word completion will be limited to those added through the extra networks menu.\n", - "Loading weights [5b9c870a30] from /home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/counterfeitV30Fp16_30.safetensors\n", - "/home/studio-lab-user/stable-diffusion-webui/extensions/stable-diffusion-webui-two-shot/scripts/two_shot.py:397: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.\n", - " canvas_image = gr.Image(source='upload', mirror_webcam=False, type='numpy', tool='color-sketch',\n", - "/home/studio-lab-user/stable-diffusion-webui/extensions/stable-diffusion-webui-two-shot/scripts/two_shot.py:471: GradioDeprecationWarning: The `style` method is deprecated. Please set these arguments in the constructor instead.\n", - " visual_regions = gr.Gallery(label=\"Regions\").style(grid=(4, 4, 4, 8), height=\"auto\")\n", - "/home/studio-lab-user/stable-diffusion-webui/extensions/stable-diffusion-webui-two-shot/scripts/two_shot.py:471: GradioDeprecationWarning: The 'grid' parameter will be deprecated. Please use 'columns' in the constructor instead.\n", - " visual_regions = gr.Gallery(label=\"Regions\").style(grid=(4, 4, 4, 8), height=\"auto\")\n", - "Running on local URL: http://0.0.0.0:7860\n", - "\n", - "To create a public link, set `share=True` in `launch()`.\n", - "Startup time: 19.5s (prepare environment: 2.9s, import torch: 3.3s, import gradio: 1.0s, setup paths: 1.3s, initialize shared: 0.2s, other imports: 0.9s, load scripts: 8.6s, create ui: 1.0s, gradio launch: 0.2s).\n", - "Creating model from config: /home/studio-lab-user/stable-diffusion-webui/configs/v1-inference.yaml\n", - "Applying attention optimization: xformers... done.\n", - "Model loaded in 7.5s (load weights from disk: 1.4s, create model: 0.5s, apply weights to model: 4.8s, calculate empty prompt: 0.7s).\n", - "[1] [[1.0, 1.0]]\n", - "[1] [[1.0, 1.0]]\n", - "1,1 0.4 Horizontal\n", - "Regional Prompter Active, Pos tokens : [80, 88], Neg tokens : [74]\n", - "\n", - " 0%| | 0/40 [00:00\n", - "\n", - "# Thread: AnyIO worker thread(139974204708608)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 937, in _bootstrap\n", - " self._bootstrap_inner()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 980, in _bootstrap_inner\n", - " self.run()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/site-packages/anyio/_backends/_asyncio.py\", line 797, in run\n", - " item = self.queue.get()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/queue.py\", line 171, in get\n", - " self.not_empty.wait()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 312, in wait\n", - " waiter.acquire()\n", - "\n", - "# Thread: Thread-5(139975488956160)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 937, in _bootstrap\n", - " self._bootstrap_inner()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 980, in _bootstrap_inner\n", - " self.run()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/site-packages/tqdm/_monitor.py\", line 60, in run\n", - " self.was_killed.wait(self.sleep_interval)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 581, in wait\n", - " signaled = self._cond.wait(timeout)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 316, in wait\n", - " gotit = waiter.acquire(True, timeout)\n", - "\n", - "# Thread: asyncio_0(139972940130048)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 937, in _bootstrap\n", - " self._bootstrap_inner()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 980, in _bootstrap_inner\n", - " self.run()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 917, in run\n", - " self._target(*self._args, **self._kwargs)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/concurrent/futures/thread.py\", line 81, in _worker\n", - " work_item = work_queue.get(block=True)\n", - "\n", - "# Thread: Thread-4(139974729004800)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 937, in _bootstrap\n", - " self._bootstrap_inner()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 980, in _bootstrap_inner\n", - " self.run()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 917, in run\n", - " self._target(*self._args, **self._kwargs)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/site-packages/uvicorn/server.py\", line 61, in run\n", - " return asyncio.run(self.serve(sockets=sockets))\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/asyncio/runners.py\", line 44, in run\n", - " return loop.run_until_complete(main)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/asyncio/base_events.py\", line 634, in run_until_complete\n", - " self.run_forever()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/asyncio/base_events.py\", line 601, in run_forever\n", - " self._run_once()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/asyncio/base_events.py\", line 1869, in _run_once\n", - " event_list = self._selector.select(timeout)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/selectors.py\", line 469, in select\n", - " fd_event_list = self._selector.poll(timeout, max_ev)\n", - "\n", - "# Thread: MemMon(139977026516736)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 937, in _bootstrap\n", - " self._bootstrap_inner()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 980, in _bootstrap_inner\n", - " self.run()\n", - "File: \"/home/studio-lab-user/stable-diffusion-webui/modules/memmon.py\", line 41, in run\n", - " self.run_flag.wait()\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 581, in wait\n", - " signaled = self._cond.wait(timeout)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 312, in wait\n", - " waiter.acquire()\n", - "\n", - "# Thread: MainThread(139979647465280)\n", - "File: \"/home/studio-lab-user/stable-diffusion-webui/launch.py\", line 48, in \n", - " main()\n", - "File: \"/home/studio-lab-user/stable-diffusion-webui/launch.py\", line 44, in main\n", - " start()\n", - "File: \"/home/studio-lab-user/stable-diffusion-webui/modules/launch_utils.py\", line 436, in start\n", - " webui.webui()\n", - "File: \"/home/studio-lab-user/stable-diffusion-webui/webui.py\", line 126, in webui\n", - " server_command = shared.state.wait_for_server_command(timeout=5)\n", - "File: \"/home/studio-lab-user/stable-diffusion-webui/modules/shared_state.py\", line 62, in wait_for_server_command\n", - " if self._server_command_signal.wait(timeout):\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 581, in wait\n", - " signaled = self._cond.wait(timeout)\n", - "File: \"/home/studio-lab-user/.conda/envs/default/lib/python3.9/threading.py\", line 316, in wait\n", - " gotit = waiter.acquire(True, timeout)\n", - "File: \"/home/studio-lab-user/stable-diffusion-webui/modules/initialize_util.py\", line 156, in sigint_handler\n", - " dumpstacks()\n", - "File: \"/home/studio-lab-user/stable-diffusion-webui/modules/initialize_util.py\", line 143, in dumpstacks\n", - " for filename, lineno, name, line in traceback.extract_stack(stack):\n" - ] - } - ], - "source": [ - "#Don't forget to paste your NGROK token here\n", - "%cd ~/stable-diffusion-webui\n", - "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --gradio-queue --disable-safe-unpickle --ngrok 2PuYOpDmc1VAfpFX8nWrV0wRHAg_kXyGy5pntWhCJyuJ4ViB" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "066b9af7-9681-411c-a563-28c7b9a7b515", - "metadata": { - "collapsed": true, - "jupyter": { - "outputs_hidden": true - }, - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 515 0 515 0 0 370 0 --:--:-- 0:00:01 --:--:-- 370\n", - " 47 2033M 47 966M 0 0 4728k 0 0:07:20 0:03:29 0:03:51 2898k 0 0:01:25 0:00:05 0:01:20 31.5M 0 0:04:36 0:00:42 0:03:54 2395k 0 0:06:21 0:01:19 0:05:02 3271k9 0:03:28 0:03:51 2815k\n", - "curl: (18) transfer closed with 1119701228 bytes remaining to read\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 513 0 513 0 0 527 0 --:--:-- --:--:-- --:--:-- 527\n", - "100 2193M 100 2193M 0 0 69.3M 0 0:00:31 0:00:31 --:--:-- 62.8M\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 525 0 525 0 0 216 0 --:--:-- 0:00:02 --:--:-- 216\n", - " 57 2033M 57 1171M 0 0 4078k 0 0:08:30 0:04:54 0:03:36 1787k 0:00:47 0:04:13 3487k0 5602k 0 0:06:11 0:01:52 0:04:19 3959k51 0:04:35 2818k 0:03:04 0:04:28 4291k 0 0 4506k 0 0:07:42 0:03:28 0:04:14 3130k\n", - "curl: (18) transfer closed with 904350182 bytes remaining to read\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 528 0 528 0 0 289 0 --:--:-- 0:00:01 --:--:-- 289\n", - "100 2033M 100 2033M 0 0 54.4M 0 0:00:37 0:00:37 --:--:-- 61.4M\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 512 0 512 0 0 383 0 --:--:-- 0:00:01 --:--:-- 382\n", - "100 2033M 100 2033M 0 0 4179k 0 0:08:18 0:08:18 --:--:-- 4595k00:17 0:04:14 3727k 0:04:46 0:00:19 0:04:27 3769k 0 0:05:57 0:01:04 0:04:53 6785k 5792k 0 0:05:59 0:01:11 0:04:48 5209k06:35 0:01:32 0:05:03 2860k 0 0 4340k 0 0:07:59 0:03:39 0:04:20 3967k 0 0:07:40 0:04:55 0:02:45 2281k 0 4394k 0 0:07:53 0:05:21 0:02:32 3884k\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 516 0 516 0 0 352 0 --:--:-- 0:00:01 --:--:-- 352\n", - "100 55.8M 100 55.8M 0 0 20.4M 0 0:00:02 0:00:02 --:--:-- 66.0M\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 491 0 491 0 0 543 0 --:--:-- --:--:-- --:--:-- 543\n", - "100 72.1M 100 72.1M 0 0 32.6M 0 0:00:02 0:00:02 --:--:-- 55.3M\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 527 0 527 0 0 525 0 --:--:-- 0:00:01 --:--:-- 525\n", - "100 9331k 100 9331k 0 0 6110k 0 0:00:01 0:00:01 --:--:-- 284M\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 513 0 513 0 0 757 0 --:--:-- --:--:-- --:--:-- 757\n", - "100 77.7M 100 77.7M 0 0 14.2M 0 0:00:05 0:00:05 --:--:-- 16.9M\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 512 0 512 0 0 256 0 --:--:-- 0:00:01 --:--:-- 256\n", - "100 165M 100 165M 0 0 5839k 0 0:00:29 0:00:29 --:--:-- 2761k\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 487 0 487 0 0 888 0 --:--:-- --:--:-- --:--:-- 888\n", - "100 50106 100 50106 0 0 55673 0 --:--:-- --:--:-- --:--:-- 55673\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 483 0 483 0 0 293 0 --:--:-- 0:00:01 --:--:-- 293\n", - "100 53108 100 53108 0 0 27123 0 0:00:01 0:00:01 --:--:-- 5653k\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 479 0 479 0 0 221 0 --:--:-- 0:00:02 --:--:-- 221\n", - "100 28526 100 28526 0 0 10921 0 0:00:02 0:00:02 --:--:-- 10921\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 483 0 483 0 0 542 0 --:--:-- --:--:-- --:--:-- 541\n", - "100 50036 100 50036 0 0 41906 0 0:00:01 0:00:01 --:--:-- 488k\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 483 0 483 0 0 228 0 --:--:-- 0:00:02 --:--:-- 228\n", - "100 46964 100 46964 0 0 19414 0 0:00:02 0:00:02 --:--:-- 19414\n" - ] - } - ], - "source": [ - "#modelos\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/epicrealism_naturalSin.safetensors\" \"https://civitai.com/api/download/models/160989?type=Model&format=SafeTensor&size=pruned&fp=fp16\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/analogMadness_v60.safetensors\" \"https://civitai.com/api/download/models/160495?type=Model&format=SafeTensor&size=pruned&fp=fp16\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/aZovyaRPGArtistTools_v3.safetensors\" \"https://civitai.com/api/download/models/79290\"\n", - "#!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/uberRealisticPornMerge_urpmv13.safetensors\" \"https://civitai.com/api/download/models/15640\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/chilloutmix_NiPrunedFp16Fix.safetensors\" \"https://civitai.com/api/download/models/11732\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/meinamix_meinaV11.safetensors\" \"https://civitai.com/api/download/models/119057?type=Model&format=SafeTensor&size=pruned&fp=fp16\"\n", - "#!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/counterfeitV30Fp16_30.safetensors\" \"https://civitai.com/api/download/models/125050\"\n", - "\n", - "#Loras\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Lora/epiCRealismHelper.safetensors\" \"https://civitai.com/api/download/models/118945?type=Model&format=SafeTensor\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Lora/LowRA.safetensors\" \"https://civitai.com/api/download/models/63006\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Lora/CthulhuMythosArtbook-06.safetensors\" \"https://civitai.com/api/download/models/154059?type=Model&format=SafeTensor\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Lora/epi_noiseoffset2.safetensors\" \"https://civitai.com/api/download/models/16576?type=Model&format=SafeTensor&size=full&fp=fp16\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Lora/Adventurers_v20.safetensors\" \"https://civitai.com/api/download/models/124691\"\n", - "\n", - "#embeddings\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/embeddings/AS-YoungerV2.pt\" \"https://civitai.com/api/download/models/95275\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/embeddings/AS-YoungV2.pt\" \"https://civitai.com/api/download/models/94703\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/embeddings/AS-Adult.pt\" \"https://civitai.com/api/download/models/75443\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/embeddings/AS-MidAged.pt\" \"https://civitai.com/api/download/models/75557\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/embeddings/AS-Elderly.pt\" \"https://civitai.com/api/download/models/77257\"\n", - "\n", - "\n" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "ba0d235b-08f8-4d36-b8ad-a52ba3773170", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 1187 100 1187 0 0 30435 0 --:--:-- --:--:-- --:--:-- 30435\n", - "100 689M 100 689M 0 0 162M 0 0:00:04 0:00:04 --:--:-- 153M\n" - ] - } - ], - "source": [ - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/extensions/CN-v11400/models/openpose.safetensors\" \"https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_openpose_fp16.safetensors\"" - ] - }, - { - "cell_type": "code", - "execution_count": 4, - "id": "72f11b17-b1f8-4568-bc50-8fd78e4991ed", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Cloning into '/home/studio-lab-user/stable-diffusion-webui/models/ESRGAN/4x'...\n", - "remote: Enumerating objects: 10, done.\u001b[K\n", - "remote: Total 10 (delta 0), reused 0 (delta 0), pack-reused 10\u001b[K\n", - "Unpacking objects: 100% (10/10), 1.27 KiB | 1.27 MiB/s, done.\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - " 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\n", - "100 4580 0 4580 0 0 6034 0 --:--:-- --:--:-- --:--:-- 61891\n", - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - " 0 0 0 0 0 0 0 0 --:--:-- --:--:-- --:--:-- 0\n", - "100 4580 0 4580 0 0 6317 0 --:--:-- --:--:-- --:--:-- 53255\n" - ] - } - ], - "source": [ - "!git clone https://huggingface.co/nolanaatama/ESRGAN /home/studio-lab-user/stable-diffusion-webui/models/ESRGAN/\"4x\"\n", - "\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/ESRGAN/4x_NMKD-Superscale-SP_178000_G.pth\" \"https://icecube-eu-286.icedrive.io/download?p=HQGDvX2ySAj1TLQPFbqGq6Yekz4sZtW9LnSKzuL_sV0S7QejmA6yJAE9WK_uOVx4B.2EQkV2AjhbopISfrZQakFWwg9lsYtqHvDO0zGXZSc622lDGKuL46IGnAeJ1JOIyGzi9rqrnLfp05ZVUngM1zFMVau9IpneqDz4MKIrHLGREUjV1m5KtiayJBEG77OP207Hg_BbwO3MQqFRxHxeLW7KkfYzDnQvJUUDHg_.Q08-\"\n", - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/ESRGAN/8x_NMKD-Superscale_150000_G.pth\" \"https://icecube-eu-286.icedrive.io/download?p=HQGDvX2ySAj1TLQPFbqGq6Yekz4sZtW9LnSKzuL_sV0.hewQ706SaIhk7lSe0y__B.2EQkV2AjhbopISfrZQakFWwg9lsYtqHvDO0zGXZSdcMOwQcUGWT1Zz89h.bzuE6kHnd0AV8ehoUcW7WQlM_M.QgnRsxC6ncOV99qLFVioHdQRr7DXT1YL0MA87LtDCLJqkHZD8rczLen8twcloeuuzUBXdcViipJ5zwAgLHWQ-\"" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "fdeece9b-7e0a-4c93-aec2-6d96b95cdc84", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "#download and compress all outputs. If more than 200mb, it will zip in multiple files.\n", - "import os\n", - "import zipfile\n", - "def zip_folder(input_folder, output_folder, max_size_mb=20):\n", - " # Create the output folder if it doesn't exist\n", - " os.makedirs(output_folder, exist_ok=True)\n", - " zip_number = 1\n", - " current_zip_size = 0\n", - " current_zip_name = os.path.join(output_folder, f\"part_{zip_number}.zip\") \n", - " with zipfile.ZipFile(current_zip_name, 'w', zipfile.ZIP_DEFLATED) as current_zip:\n", - " for root, _, files in os.walk(input_folder):\n", - " for file in files:\n", - " file_path = os.path.join(root, file)\n", - " file_size = os.path.getsize(file_path) \n", - " # Check if adding the current file exceeds the max size\n", - " if current_zip_size + file_size > max_size_mb * 1024 * 1024:\n", - " # Close the current zip file\n", - " current_zip.close() \n", - " # Start a new zip file\n", - " zip_number += 1\n", - " current_zip_name = os.path.join(output_folder, f\"part_{zip_number}.zip\")\n", - " current_zip = zipfile.ZipFile(current_zip_name, 'w', zipfile.ZIP_DEFLATED)\n", - " current_zip_size = 0 \n", - " # Add the file to the current zip\n", - " current_zip.write(file_path, os.path.relpath(file_path, input_folder))\n", - " current_zip_size += file_size\n", - "# Specify the input folder to be zipped\n", - "input_folder = 'stable-diffusion-webui/outputs/txt2img-images' # Replace with the path to your input folder\n", - "# Specify the output folder where zip files will be saved\n", - "output_folder = 'zip folder' # Replace with the path to your output folder\n", - "# Specify the maximum size for each zip file in MB\n", - "max_size_mb = 200\n", - "# Create zip files with a maximum size of 20MB\n", - "zip_folder(input_folder, output_folder, max_size_mb)" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "22a873d7-8992-4155-9d6b-b3bc97e07cd7", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 512 0 512 0 0 250 0 --:--:-- 0:00:02 --:--:-- 250\n", - "100 2033M 100 2033M 0 0 4231k 0 0:08:12 0:08:12 --:--:-- 5425k\n" - ] - } - ], - "source": [ - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/meinamix_meinaV11.safetensors\" \"https://civitai.com/api/download/models/119057?type=Model&format=SafeTensor&size=pruned&fp=fp16\"" - ] - }, - { - "cell_type": "code", - "execution_count": 5, - "id": "439692fe-f99d-4703-aa6d-27a8bcc8a775", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Filesystem Size Used Avail Use% Mounted on\n", - "/dev/nvme2n1 25G 21G 4.5G 83% /home/studio-lab-user\n" - ] - } - ], - "source": [ - "#Checkear Almacenamiento\n", - "!df -h | grep -E 'Avail|home'" - ] - }, - { - "cell_type": "code", - "execution_count": 14, - "id": "b8a56c3a-f0af-4c87-bf83-c99942a3a3b0", - "metadata": {}, - "outputs": [], - "source": [ - "#delete and empty the OUTPUT folder\n", - "!rm -rf /home/studio-lab-user/stable-diffusion-webui/outputs/*" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "8ac13a1e-906a-4da8-b98b-0e300ab5b8b4", - "metadata": {}, - "outputs": [], - "source": [ - "#delete and empty the MODELS folder\n", - "!rm -rf /home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/*" - ] - }, - { - "cell_type": "markdown", - "id": "1c518ead-677f-42f0-a67f-1d30327fec10", - "metadata": {}, - "source": [] - }, - { - "cell_type": "markdown", - "id": "1d0a3313-0c65-44ef-b89e-459fa779e84b", - "metadata": {}, - "source": [ - "START CLEAN EVERYTHING ONLY IF YOU HAVE ERROR" - ] - }, - { - "cell_type": "code", - "execution_count": 6, - "id": "5ad6a08b-34a4-4a73-b618-38715a895bd2", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "Filesystem Size Used Avail Use% Mounted on\n", - "/dev/nvme1n1 25G 20G 5.4G 79% /home/studio-lab-user\n" - ] - } - ], - "source": [ - "#Check the storage available (if storage full, can cause problem)\n", - "!df -h | grep -E 'Avail|home'" - ] - }, - { - "cell_type": "code", - "execution_count": 2, - "id": "aaea3473-1ac6-40d8-98c2-a29386ca147e", - "metadata": { - "tags": [] - }, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - "0\t/home/studio-lab-user/.sagemaker\n", - "24K\t/home/studio-lab-user/.jupyter\n", - "80K\t/home/studio-lab-user/.local\n", - "88K\t/home/studio-lab-user/.ipython\n", - "12K\t/home/studio-lab-user/.ipynb_checkpoints\n", - "4.1G\t/home/studio-lab-user/.conda\n", - "15G\t/home/studio-lab-user/stable-diffusion-webui\n", - "6.1G\t/home/studio-lab-user/.cache\n", - "25G\t/home/studio-lab-user\n" - ] - } - ], - "source": [ - "#List all folders and sizes\n", - "!du -h --max-depth=1 /home/studio-lab-user" - ] - }, - { - "cell_type": "code", - "execution_count": 3, - "id": "ab02c781-46ea-4f07-8c4b-f329069d903b", - "metadata": {}, - "outputs": [], - "source": [ - "#clean remove all env, cache and file\n", - "!rm -r /home/studio-lab-user/.cache\n", - "!rm -r /home/studio-lab-user/.conda\n", - "!conda remove -n \"env_name\" --all\n", - "!rm -rf /home/studio-lab-user/*" - ] - }, - { - "cell_type": "markdown", - "id": "baaf8967-78f3-4b63-9427-313bffa67a93", - "metadata": {}, - "source": [] - }, - { - "cell_type": "markdown", - "id": "bf5499c3-18fb-4325-8c37-5298751e4f97", - "metadata": {}, - "source": [ - "BELOW ONLY FOR TROUBLESHOOTING" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "38f3b678-ce14-47c8-b8ca-5b2295fc628c", - "metadata": {}, - "outputs": [], - "source": [ - "%cd ~/stable-diffusion-webui\n", - "!pip install -r requirements.txt" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6c7131fd-9ce7-4c3c-861c-a3acc252c086", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "%cd ~/stable-diffusion-webui\n", - "!python launch.py --listen --xformers --enable-insecure-extension-access --theme dark --ngrok auth" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5bb61644-e972-402e-aff6-c6445ff99965", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "import torch\n", - "torch.cuda.get_device_name(0)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "d6a8c055-4668-40cd-aa41-8bc6474c9ff0", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "import torch\n", - "print(torch.version.cuda)" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "6b3f9867-000e-43f4-9b04-ae5c0d9166bd", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "!pip uninstall torchvision -y" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "2d990595-7f34-4946-9a21-197306222434", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "!pip install torchvision==0.10.0" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "5b85fa10-c03f-4942-a227-02d1cbe90f4a", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "!pip install torch==1.10.0" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "abc7178a-c5b7-4722-8e9e-728308d83d70", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "!pip install xformers==0.0.20 tomesd==0.1.3 pytorch-lightning==1.9.4 accelerate==0.21.0" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "577b9843-0e8c-4dd8-aa02-8eaf8c51f1d8", - "metadata": { - "tags": [] - }, - "outputs": [], - "source": [ - "!conda install -c conda-forge libglib -y" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "f24321a3-700a-47e9-8995-0893dd2f834f", - "metadata": {}, - "outputs": [ - { - "name": "stdout", - "output_type": "stream", - "text": [ - " % Total % Received % Xferd Average Speed Time Time Time Current\n", - " Dload Upload Total Spent Left Speed\n", - "100 512 0 512 0 0 273 0 --:--:-- 0:00:01 --:--:-- 273\n", - " 40 2033M 40 815M 0 0 4826k 0 0:07:11 0:02:52 0:04:19 3607k9M 0 0 7175k 0 0:04:50 0:00:39 0:04:11 3601k3M 15 314M 0 0 6717k 0 0:05:10 0:00:47 0:04:23 4630k 0 5293k 0 0:06:33 0:02:10 0:04:23 2134k" - ] - } - ], - "source": [ - "!curl -Lo \"/home/studio-lab-user/stable-diffusion-webui/models/Stable-diffusion/meinamix_meinaV11.safetensors\" \"https://civitai.com/api/download/models/119057?type=Model&format=SafeTensor&size=pruned&fp=fp16\"" - ] - }, - { - "cell_type": "code", - "execution_count": null, - "id": "c4ac849a-62bb-4bb9-9b5c-8c9bc68baf1e", - "metadata": {}, - "outputs": [], - "source": [] - } - ], - "metadata": { - "kernelspec": { - "display_name": "default:Python", - "language": "python", - "name": "conda-env-default-py" - }, - "language_info": { - "codemirror_mode": { - "name": "ipython", - "version": 3 - }, - "file_extension": ".py", - "mimetype": "text/x-python", - "name": "python", - "nbconvert_exporter": "python", - "pygments_lexer": "ipython3", - "version": "3.9.16" - } - }, - "nbformat": 4, - "nbformat_minor": 5 -}