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[
|
| 6 |
+
"Custom từ [StableDiffusionVN](https://colab.research.google.com/drive/1OZ65HKpSqsL9w8NojIiYi3Jx9gee-jtB#scrollTo=tKU6gPdMVWh4), [StableDiffusionEliAI](https://colab.research.google.com/drive/1YemACibtvgaF2upx9dbMG5lA79v6hIJx?usp=sharing) và [StableDiffusion.edu.vn](https://colab.research.google.com/drive/1pNTA9OIY3kJOTza4kQDNPUQi-PIxuEbD#scrollTo=tKU6gPdMVWh4)"
|
| 7 |
+
],
|
| 8 |
+
"metadata": {
|
| 9 |
+
"id": "M2_0vfmzXkEw"
|
| 10 |
+
}
|
| 11 |
+
},
|
| 12 |
+
{
|
| 13 |
+
"cell_type": "code",
|
| 14 |
+
"execution_count": null,
|
| 15 |
+
"metadata": {
|
| 16 |
+
"id": "tKU6gPdMVWh4",
|
| 17 |
+
"cellView": "form"
|
| 18 |
+
},
|
| 19 |
+
"outputs": [],
|
| 20 |
+
"source": [
|
| 21 |
+
"#@title # 🤖 1. TẢI MÔI TRƯỜNG\n",
|
| 22 |
+
"import os\n",
|
| 23 |
+
"from google.colab import drive\n",
|
| 24 |
+
"drive.mount('/content/drive')\n",
|
| 25 |
+
"hf_token = \"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\"\n",
|
| 26 |
+
"user_header = f'\"Authorization: Bearer {hf_token}\"'\n",
|
| 27 |
+
"%cd /content\n",
|
| 28 |
+
"\n",
|
| 29 |
+
"# Cai dat tcmalloc\n",
|
| 30 |
+
"!apt -y update -qq\n",
|
| 31 |
+
"!wget http://launchpadlibrarian.net/367274644/libgoogle-perftools-dev_2.5-2.2ubuntu3_amd64.deb\n",
|
| 32 |
+
"!wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/google-perftools_2.5-2.2ubuntu3_all.deb\n",
|
| 33 |
+
"!wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/libtcmalloc-minimal4_2.5-2.2ubuntu3_amd64.deb\n",
|
| 34 |
+
"!wget https://launchpad.net/ubuntu/+source/google-perftools/2.5-2.2ubuntu3/+build/14795286/+files/libgoogle-perftools4_2.5-2.2ubuntu3_amd64.deb\n",
|
| 35 |
+
"!apt install -qq libunwind8-dev\n",
|
| 36 |
+
"!dpkg -i *.deb\n",
|
| 37 |
+
"!rm *.deb\n",
|
| 38 |
+
"!apt -y install -qq aria2\n",
|
| 39 |
+
"%env LD_PRELOAD=libtcmalloc_minimal.so.4.5.9\n",
|
| 40 |
+
"\n",
|
| 41 |
+
"# Giao diện\n",
|
| 42 |
+
"\n",
|
| 43 |
+
"mode = 'dark'\n",
|
| 44 |
+
"!aria2c --continue --console-log-level=error -c -x 16 -s 16 -k 1M https://raw.githubusercontent.com/Rendai09/config-clone/main/sdvnconfig.json -d /content -o links.txt\n",
|
| 45 |
+
"with open(\"/content/links.txt\") as file:\n",
|
| 46 |
+
" links = file.readlines()\n",
|
| 47 |
+
"\n",
|
| 48 |
+
"url = links[0]\n",
|
| 49 |
+
"repo_name_start_index = url.rfind(\"/\") + 1\n",
|
| 50 |
+
"repo_name = url[repo_name_start_index:].strip()\n",
|
| 51 |
+
"\n",
|
| 52 |
+
"gitUrl = url\n",
|
| 53 |
+
"gitFolder = repo_name\n",
|
| 54 |
+
"\n",
|
| 55 |
+
"!git clone $gitUrl\n",
|
| 56 |
+
"#Extension\n",
|
| 57 |
+
"%cd $gitFolder/extensions\n",
|
| 58 |
+
"for link in links:\n",
|
| 59 |
+
" !git clone $link\n",
|
| 60 |
+
"\n",
|
| 61 |
+
"control_net_folder_name = links[1][(links[1].rfind(\"/\") + 1):].strip()\n",
|
| 62 |
+
"print(control_net_folder_name)\n",
|
| 63 |
+
"\n",
|
| 64 |
+
"%cd ..\n",
|
| 65 |
+
"\n",
|
| 66 |
+
"#Controlnet install Preprocessor\n",
|
| 67 |
+
"\n",
|
| 68 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/150_16_swin_l_oneformer_coco_100ep.pth -d /content/$gitFolder/models/oneformer -o 150_16_swin_l_oneformer_coco_100ep.pth\n",
|
| 69 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/250_16_swin_l_oneformer_ade20k_160k.pth -d /content/$gitFolder/models/oneformer -o 250_16_swin_l_oneformer_ade20k_160k.pth\n",
|
| 70 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/ZoeD_M12_N.pt -d /content/$gitFolder/models/zoedepth -o ZoeD_M12_N.pt\n",
|
| 71 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/dpt_beit_large_512.pt -d /content/$gitFolder/models/midas -o dpt_beit_large_512.pt\n",
|
| 72 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/dpt_hybrid-midas-501f0c75.pt -d /content/$gitFolder/models/midas -o dpt_hybrid-midas-501f0c75.pt\n",
|
| 73 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/dpt_large-midas-2f21e586.pt -d /content/$gitFolder/models/midas -o dpt_large-midas-2f21e586.pt\n",
|
| 74 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/facenet.pth -d /content/$gitFolder/models/openpose -o facenet.pth\n",
|
| 75 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/hand_pose_model.pth -d /content/$gitFolder/models/openpose -o hand_pose_model.pth\n",
|
| 76 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/body_pose_model.pth -d /content/$gitFolder/models/openpose -o body_pose_model.pth\n",
|
| 77 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth -d /content/$gitFolder/models/keypose -o faster_rcnn_r50_fpn_1x_coco_20200130-047c8118.pth\n",
|
| 78 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/hrnet_w48_coco_256x192-b9e0b3ab_20200708.pth -d /content/$gitFolder/models/keypose -o hrnet_w48_coco_256x192-b9e0b3ab_20200708.pth\n",
|
| 79 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/latest_net_G.pth -d /content/$gitFolder/models/leres -o latest_net_G.pth\n",
|
| 80 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/res101.pth -d /content/$gitFolder/models/leres -o res101.pth\n",
|
| 81 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/mlsd_large_512_fp32.pth -d /content/$gitFolder/models/mlsd -o mlsd_large_512_fp32.pth\n",
|
| 82 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/netG.pth -d /content/$gitFolder/models/lineart_anime -o netG.pth\n",
|
| 83 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/network-bsds500.pth -d /content/$gitFolder/models/hed -o network-bsds500.pth\n",
|
| 84 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/scannet.pt -d /content/$gitFolder/models/normal_bae -o scannet.pt\n",
|
| 85 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/sk_model.pth -d /content/$gitFolder/models/lineart -o sk_model.pth\n",
|
| 86 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/sk_model2.pth -d /content/$gitFolder/models/lineart -o sk_model2.pth\n",
|
| 87 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/table5_pidinet.pth -d /content/$gitFolder/models/pidinet -o table5_pidinet.pth\n",
|
| 88 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/upernet_global_small.pth -d /content/$gitFolder/models/uniformer -o upernet_global_small.pth\n",
|
| 89 |
+
"\n",
|
| 90 |
+
"#ControlNet Model\n",
|
| 91 |
+
"\n",
|
| 92 |
+
"!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/$gitFolder/extensions/$control_net_folder_name/models -o control_v11p_sd15_canny.safetensors\n",
|
| 93 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11p_sd15_depth_fp16.safetensors -d /content/$gitFolder/extensions/$control_net_folder_name/models -o control_v11f1p_sd15_depth.safetensors\n",
|
| 94 |
+
"!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/$gitFolder/extensions/$control_net_folder_name/models -o control_v11p_sd15_lineart.safetensors\n",
|
| 95 |
+
"!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/$gitFolder/extensions/$control_net_folder_name/models -o control_v11p_sd15_mlsd.safetensors\n",
|
| 96 |
+
"!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/$gitFolder/extensions/$control_net_folder_name/models -o control_v11p_sd15_openpose.safetensors\n",
|
| 97 |
+
"!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/$gitFolder/extensions/$control_net_folder_name/models -o control_v11p_sd15_scribble.safetensors\n",
|
| 98 |
+
"!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/$gitFolder/extensions/$control_net_folder_name/models -o control_v11p_sd15_seg_fp16.safetensors\n",
|
| 99 |
+
"!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/$gitFolder/extensions/$control_net_folder_name/models -o control_v11p_sd15s2_lineart_anime.safetensors\n",
|
| 100 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/ckpt/ControlNet-v1-1/resolve/main/control_v11u_sd15_tile_fp16.safetensors -d /content/$gitFolder/extensions/$control_net_folder_name/models -o control_v11u_sd15_tile.safetensors\n",
|
| 101 |
+
"!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/$gitFolder/extensions/$control_net_folder_name/models -o control_v11p_sd15_inpaint_fp16.safetensors\n",
|
| 102 |
+
"\n",
|
| 103 |
+
"# VAE FILE\n",
|
| 104 |
+
"\n",
|
| 105 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.ckpt -d /content/$gitFolder/models/Stable-diffusion -o VAE84.vae.pt\n",
|
| 106 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/sd-vae-ft-ema-original/resolve/main/vae-ft-ema-560000-ema-pruned.safetensors -d /content/$gitFolder/models/Stable-diffusion -o VAE56.vae.pt\n",
|
| 107 |
+
"!aria2c --continue --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/phamhungd/GuoZovya/resolve/main/Anime-fp16.vae.pt -d /content/$gitFolder/models/Stable-diffusion -o Anime.vae.pt\n",
|
| 108 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/xyn-ai/anything-v4.0/resolve/main/anything-v4.0.vae.pt -d /content/$gitFolder/models/Stable-diffusion -o anything-v4.0.vae.pt\n",
|
| 109 |
+
"\n",
|
| 110 |
+
"#Custom\n",
|
| 111 |
+
"\n",
|
| 112 |
+
"!mkdir /content/drive/MyDrive/SD-Data\n",
|
| 113 |
+
"!mkdir /content/drive/MyDrive/SD-Data/Model\n",
|
| 114 |
+
"!mkdir /content/drive/MyDrive/SD-Data/Setting15\n",
|
| 115 |
+
"!mkdir /content/drive/MyDrive/SD-Data/Lora\n",
|
| 116 |
+
"!mkdir /content/drive/MyDrive/SD-Data/Embeddings\n",
|
| 117 |
+
"!mkdir /content/drive/MyDrive/SD-Data/wildcards\n",
|
| 118 |
+
"!mkdir /content/drive/MyDrive/SD-Data/Hypernetworks\n",
|
| 119 |
+
"!mkdir /content/drive/MyDrive/SD-Data/Outputs\n",
|
| 120 |
+
"!mkdir /content/$gitFolder/outputs\n",
|
| 121 |
+
"\n",
|
| 122 |
+
"!ln -s /content/drive/MyDrive/SD-Data/wildcards /content/$gitFolder/extensions/sd-dynamic-prompts\n",
|
| 123 |
+
"\n",
|
| 124 |
+
"!aria2c --auto-file-renaming=false -c -x 16 -s 16 -k 1M https://raw.githubusercontent.com/minhnhat0709/sd-colab-config/main/config.json -d /content/drive/MyDrive/SD-Data/Setting15 -o config.json\n",
|
| 125 |
+
"\n",
|
| 126 |
+
"\n",
|
| 127 |
+
"checkpointpatch = \"/content/SDVN/models/Stable-diffusion\"\n",
|
| 128 |
+
"\n",
|
| 129 |
+
"#@markdown ## ⚡️ Custom Model\n",
|
| 130 |
+
"\n",
|
| 131 |
+
"SaveFromMyDrive = False #@param {type:\"boolean\"}\n",
|
| 132 |
+
"\n",
|
| 133 |
+
"CheckpointDownloadLink = \"\" #@param {type:\"string\"}\n",
|
| 134 |
+
"if CheckpointDownloadLink != \"\" :\n",
|
| 135 |
+
" %cd {checkpointpatch}\n",
|
| 136 |
+
"\n",
|
| 137 |
+
"sdvnmodelUrl = [\"\",\n",
|
| 138 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/109869 -d {checkpointpatch} -o SDVN1-Real.safetensors\",\n",
|
| 139 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/110396 -d {checkpointpatch} -o SDVN2-RealRPG.safetensors\",\n",
|
| 140 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/110538 -d {checkpointpatch} -o SDVN3-RealArt-plus.safetensors\",\n",
|
| 141 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/110442 -d {checkpointpatch} -o SDVN4-3DCuteVN.safetensors\",\n",
|
| 142 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/110455 -d {checkpointpatch} -o SDVN5-3DCuteWave.safetensors\",\n",
|
| 143 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/130249 -d {checkpointpatch} -o SDVN6-RealXL.safetensors\",\n",
|
| 144 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/155870 -d {checkpointpatch} -o SDVN7-NijiStyle.safetensors\"]\n",
|
| 145 |
+
"sdvnmodelList = [\"\",\n",
|
| 146 |
+
" \"SDVN1-Real\",\n",
|
| 147 |
+
" \"SDVN2-RealRPG\",\n",
|
| 148 |
+
" \"SDVN3-RealArt-plus\",\n",
|
| 149 |
+
" \"SDVN4-3DCuteVN\",\n",
|
| 150 |
+
" \"SDVN5-3DCuteWave\",\n",
|
| 151 |
+
" \"SDVN6-RealXL\",\n",
|
| 152 |
+
" \"SDVN7-NijiStyle\"]\n",
|
| 153 |
+
"#@markdown ## 👨🏻💻 SDVN Model\n",
|
| 154 |
+
"sdvnmodel = \"\" #@param [\"\", \"SDVN1-Real\", \"SDVN2-RealRPG\", \"SDVN3-RealArt-plus\", \"SDVN4-3DCuteVN\", \"SDVN5-3DCuteWave\", \"SDVN6-RealXL\", \"SDVN7-NijiStyle\"]\n",
|
| 155 |
+
"\n",
|
| 156 |
+
"!{sdvnmodelUrl[sdvnmodelList.index(sdvnmodel)]}\n",
|
| 157 |
+
"baseUrl = [\"\",\n",
|
| 158 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/CompVis/stable-diffusion-v-1-4-original/resolve/main/sd-v1-4.ckpt -d {checkpointpatch} -o StableDiffusion-v14.ckpt\",\n",
|
| 159 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned.safetensors -d {checkpointpatch} -o StableDiffusion-v15.safetensors\",\n",
|
| 160 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-nonema-pruned.safetensors -d {checkpointpatch} -o StableDiffusion-v21-512.safetensors\",\n",
|
| 161 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-nonema-pruned.safetensors -d {checkpointpatch} -o StableDiffusion-v21-768.safetensors\",\n",
|
| 162 |
+
" f\"aria2c --console-log-level=error --summary-interval=10 --header={user_header} -c -x 16 -s 16 -k 1M https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors -d {checkpointpatch} -o SDXL-1.0.safetensors\"]\n",
|
| 163 |
+
"baseList = [\"\",\n",
|
| 164 |
+
" \"StableDiffusion-v14\",\n",
|
| 165 |
+
" \"StableDiffusion-v15\",\n",
|
| 166 |
+
" \"StableDiffusion-v21-512\",\n",
|
| 167 |
+
" \"StableDiffusion-v21-768\",\n",
|
| 168 |
+
" \"SDXL-Base-1.0\"]\n",
|
| 169 |
+
"#@markdown ## 🎇 Base Model\n",
|
| 170 |
+
"basemodelName = \"\" #@param [\"\", \"StableDiffusion-v14\",\"StableDiffusion-v15\", \"StableDiffusion-v21-512\", \"StableDiffusion-v21-768\", \"SDXL-Base-1.0\"]\n",
|
| 171 |
+
"\n",
|
| 172 |
+
"!{sdvnmodelUrl[sdvnmodelList.index(sdvnmodel)]}\n",
|
| 173 |
+
"sdxlmodelUrl = [\"\",\n",
|
| 174 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/136754 -d {checkpointpatch} -o DucHaiten-AIart-SDXL.safetensors\",\n",
|
| 175 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/149020 -d {checkpointpatch} -o Lah-Mysterious-SDXL.safetensors\",\n",
|
| 176 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/150238 -d {checkpointpatch} -o Copax-TimeLessXL-v5.safetensors\",\n",
|
| 177 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/154625 -d {checkpointpatch} -o Niji-SpecialEdition.safetensors\",\n",
|
| 178 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/146761 -d {checkpointpatch} -o CounterfeitXL.safetensors\",\n",
|
| 179 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/133832 -d {checkpointpatch} -o CrystalClearXL.safetensors\",\n",
|
| 180 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/152076 -d {checkpointpatch} -o JuggernautXL.safetensors\",\n",
|
| 181 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/133462 -d {checkpointpatch} -o AnimagineXL.safetensors\",\n",
|
| 182 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/131579 -d {checkpointpatch} -o RunDiffusionXL.safetensors\"\n",
|
| 183 |
+
" ]\n",
|
| 184 |
+
"sdxlmodelList = [\"\",\n",
|
| 185 |
+
" \"DucHaiten-AIart-SDXL\",\n",
|
| 186 |
+
" \"Lah-Mysterious-SDXL\",\n",
|
| 187 |
+
" \"Copax-TimeLessXL-v5\",\n",
|
| 188 |
+
" \"Niji-SpecialEdition\",\n",
|
| 189 |
+
" \"CounterfeitXL\",\n",
|
| 190 |
+
" \"CrystalClearXL\",\n",
|
| 191 |
+
" \"JuggernautXL\",\n",
|
| 192 |
+
" \"AnimagineXL\",\n",
|
| 193 |
+
" \"RunDiffusionXL\"\n",
|
| 194 |
+
" ]\n",
|
| 195 |
+
"#@markdown ## 🎨 SDXLModel\n",
|
| 196 |
+
"sdxlmodel = \"\" #@param [\"\", \"DucHaiten-AIart-SDXL\", \"Lah-Mysterious-SDXL\",\"Copax-TimeLessXL-v5\",\"Niji-SpecialEdition\",\"CounterfeitXL\",\"CrystalClearXL\",\"JuggernautXL\",\"AnimagineXL\", \"RunDiffusionXL\"]\n",
|
| 197 |
+
"!{sdxlmodelUrl[sdxlmodelList.index(sdxlmodel)]}\n",
|
| 198 |
+
"\n",
|
| 199 |
+
"modelUrl = [\"\",\n",
|
| 200 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/9474 -d {checkpointpatch} -o Chilloutmix.safetensors\",\n",
|
| 201 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/130072 -d {checkpointpatch} -o RealisticVision51.safetensors\",\n",
|
| 202 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/15236 -d {checkpointpatch} -o Deliberate.safetensors\",\n",
|
| 203 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/128713 -d {checkpointpatch} -o DreamShaperv8.safetensors\",\n",
|
| 204 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/79290 -d {checkpointpatch} -o A-ZovyaRPGv3.safetensors\",\n",
|
| 205 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/70458 -d {checkpointpatch} -o HenmixRealv4.safetensors\",\n",
|
| 206 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/77784 -d {checkpointpatch} -o Fantasticv65.safetensors\",\n",
|
| 207 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/77903 -d {checkpointpatch} -o XXMix_9realisticv3.safetensors\",\n",
|
| 208 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/94640 -d {checkpointpatch} -o MajicmixRealv6.safetensors\",\n",
|
| 209 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/46846 -d {checkpointpatch} -o ReVAnimatedv122.safetensors\",\n",
|
| 210 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/88158 -d {checkpointpatch} -o RunDiffusionFXv1.safetensors\",\n",
|
| 211 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/113479 -d {checkpointpatch} -o RBeautifulRealAsiansv6.safetensors\",\n",
|
| 212 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/113623 -d {checkpointpatch} -o LEOSAM-MoonFilm-v2.safetensors\"]\n",
|
| 213 |
+
"modelList = [\"\",\n",
|
| 214 |
+
" \"Chilloutmix\",\n",
|
| 215 |
+
" \"RealisticVision51\",\n",
|
| 216 |
+
" \"Deliberate\",\n",
|
| 217 |
+
" \"DreamShaperv8\",\n",
|
| 218 |
+
" \"A-ZovyaRPGv3\",\n",
|
| 219 |
+
" \"HenmixRealv4\",\n",
|
| 220 |
+
" \"Fantasticv65\",\n",
|
| 221 |
+
" \"XXMix_9realisticv3\",\n",
|
| 222 |
+
" \"MajicmixRealv6\",\n",
|
| 223 |
+
" \"ReVAnimatedv122\",\n",
|
| 224 |
+
" \"RunDiffusionFXv1\",\n",
|
| 225 |
+
" \"RBeautifulRealAsiansv6\",\n",
|
| 226 |
+
" \"LEOSAM-MoonFilm-v2\"]\n",
|
| 227 |
+
"#@markdown ## 🏞️ Realistic model 1\n",
|
| 228 |
+
"modelName = \"\" #@param [\"\", \"Chilloutmix\", \"RealisticVision51\", \"Deliberate\", \"DreamShaperv8\", \"A-ZovyaRPGv3\", \"HenmixRealv4\", \"Fantasticv65\", \"XXMix_9realisticv3\", \"MajicmixRealv6\", \"ReVAnimatedv122\", \"RunDiffusionFXv1\", \"RBeautifulRealAsiansv6\", \"LEOSAM-MoonFilm-v2\"]\n",
|
| 229 |
+
"!{modelUrl[modelList.index(modelName)]}\n",
|
| 230 |
+
"\n",
|
| 231 |
+
"\n",
|
| 232 |
+
"model2Url = [\"\",\n",
|
| 233 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/7425 -d {checkpointpatch} -o Counterfeit.safetensors\",\n",
|
| 234 |
+
" f\"aria2c --console-log-level=error --summary-interval=10 --header={user_header} -c -x 16 -s 16 -k 1M https://huggingface.co/phamhungd/OtakupastelwaveMixPro/resolve/main/OtakuMix.safetensors -d {checkpointpatch} -o OtakupastelwaveMixPro.safetensors\",\n",
|
| 235 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/xyn-ai/anything-v4.0/resolve/main/anything-v4.5-pruned-fp16.ckpt -d {checkpointpatch} -o AnythingV45.ckpt\",\n",
|
| 236 |
+
" f\"aria2c --console-log-level=error --summary-interval=10 --header={user_header} -c -x 16 -s 16 -k 1M https://huggingface.co/phamhungd/StableDiffusionVN/resolve/main/Dalcefov4.safetensors -d {checkpointpatch} -o Dalcefov4.safetensors\",\n",
|
| 237 |
+
" f\"aria2c --console-log-level=error --summary-interval=10 --header={user_header} -c -x 16 -s 16 -k 1M https://huggingface.co/phamhungd/StableDiffusionVN/resolve/main/Camelliamix.safetensors -d {checkpointpatch} -o Camelliamix.safetensors\",\n",
|
| 238 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/27424 -d {checkpointpatch} -o FishMix.safetensors\",\n",
|
| 239 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/19348 -d {checkpointpatch} -o OrientalMix.safetensors\",\n",
|
| 240 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/36473 -d {checkpointpatch} -o ThreeDelicacyv2.safetensors\",\n",
|
| 241 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/50765 -d {checkpointpatch} -o GODofSIMP.safetensors\",\n",
|
| 242 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/17028 -d {checkpointpatch} -o TheoldfishSpread.safetensors\",\n",
|
| 243 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/40101 -d {checkpointpatch} -o Theoldfish.safetensors\",\n",
|
| 244 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/14835 -d {checkpointpatch} -o NightSkyYOZORA.safetensors\",\n",
|
| 245 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/76907 -d {checkpointpatch} -o GhostMixv2.safetensors\",\n",
|
| 246 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/125771 -d {checkpointpatch} -o ToonYou-beta6.safetensors\",\n",
|
| 247 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/88516 -d {checkpointpatch} -o ComicsArthemyv3.safetensors\",\n",
|
| 248 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/88516 -d {checkpointpatch} -o MeinaMix-v11.safetensors\",\n",
|
| 249 |
+
" f\"aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://civitai.com/api/download/models/116017 -d {checkpointpatch} -o ManmaruMix-v2.safetensors\"]\n",
|
| 250 |
+
"model2List = [\"\",\n",
|
| 251 |
+
" \"Counterfeit\",\n",
|
| 252 |
+
" \"OtakupastelwaveMix\",\n",
|
| 253 |
+
" \"AnythingV45\",\n",
|
| 254 |
+
" \"Dalcefov4\",\n",
|
| 255 |
+
" \"Camelliamix\",\n",
|
| 256 |
+
" \"OrientalMix\",\n",
|
| 257 |
+
" \"FishMix\",\n",
|
| 258 |
+
" \"ThreeDelicacyv2\",\n",
|
| 259 |
+
" \"GODofSIMP\",\n",
|
| 260 |
+
" \"TheoldfishSpread\",\n",
|
| 261 |
+
" \"Theoldfish\",\n",
|
| 262 |
+
" \"NightSkyYOZORA\",\n",
|
| 263 |
+
" \"GhostMixv2\",\n",
|
| 264 |
+
" \"ToonYou-beta6\",\n",
|
| 265 |
+
" \"ComicsArthemyv3\",\n",
|
| 266 |
+
" \"MeinaMix-v11\",\n",
|
| 267 |
+
" \"ManmaruMix-v2\"]\n",
|
| 268 |
+
"#@markdown ## 🌇 Anime/Paint model 2\n",
|
| 269 |
+
"model2Name = \"\" #@param [\"\", \"Counterfeit\", \"OtakupastelwaveMix\", \"AnythingV45\", \"Dalcefov4\", \"Camelliamix\", \"OrientalMix\", \"FishMix\", \"ThreeDelicacyv2\", \"GODofSIMP\", \"TheoldfishSpread\", \"Theoldfish\", \"NightSkyYOZORA\", \"GhostMixv2\", \"ToonYou-beta6\", \"ComicsArthemyv3\", \"MeinaMix-v11\", \"ManmaruMix-v2\"]\n",
|
| 270 |
+
"!{model2Url[model2List.index(model2Name)]}\n",
|
| 271 |
+
"\n",
|
| 272 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/datasets/BlodyTraveler/4x-UltraSharp/resolve/main/4x-UltraSharp.pth -d /content/$gitFolder/models/ESRGAN -o 4x-UltraSharp.pth\n",
|
| 273 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/konohashinobi4/4xAnimesharp/resolve/main/4x-AnimeSharp.pth -d /content/$gitFolder/models/ESRGAN -o 4x-AnimeSharp.pth\n",
|
| 274 |
+
"!aria2c --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/gemasai/4x_NMKD-Superscale-SP_178000_G/resolve/main/4x_NMKD-Superscale-SP_178000_G.pth -d /content/$gitFolder/models/ESRGAN -o 4x_NMKD-Superscale-SP_178000_G.pth\n",
|
| 275 |
+
"!aria2c --continue --console-log-level=error -c -x 16 -s 16 -k 1M https://huggingface.co/phamhungd/GuoZovya/resolve/main/inswapper_128.onnx -d /content/SDVN/models/RoopSD -o inswapper_128.onnx"
|
| 276 |
+
]
|
| 277 |
+
},
|
| 278 |
+
{
|
| 279 |
+
"cell_type": "code",
|
| 280 |
+
"execution_count": null,
|
| 281 |
+
"metadata": {
|
| 282 |
+
"cellView": "form",
|
| 283 |
+
"id": "gRDfOcqM1S0B"
|
| 284 |
+
},
|
| 285 |
+
"outputs": [],
|
| 286 |
+
"source": [
|
| 287 |
+
"#@title # 🤖 2. CHẠY STABLE DIFFUSION\n",
|
| 288 |
+
"#@markdown <br> [](https://dashboard.ngrok.com/get-started/your-authtoken)\n",
|
| 289 |
+
"Ngroktoken = \"\" #@param {type:\"string\"}\n",
|
| 290 |
+
"\n",
|
| 291 |
+
"\n",
|
| 292 |
+
"if Ngroktoken != \"\":\n",
|
| 293 |
+
" !python launch.py --api --share --listen --theme dark --xformers --enable-insecure-extension-access --multiple --ui-config-file /content/drive/MyDrive/SD-Data/Setting15/ui-config.json --ui-settings-file /content/drive/MyDrive/SD-Data/Setting15/config.json --ckpt-dir /content/drive/MyDrive/SD-Data/Model/ --lora-dir /content/drive/MyDrive/SD-Data/Lora/ --embeddings-dir /content/drive/MyDrive/SD-Data/Embeddings --styles-file /content/drive/MyDrive/SD-Data/Setting15/styles.csv --hypernetwork-dir /content/drive/MyDrive/SD-Data/Hypernetworks --ngrok {Ngroktoken}\n",
|
| 294 |
+
"else:\n",
|
| 295 |
+
" !python launch.py --api --share --listen --theme dark --xformers --enable-insecure-extension-access --multiple --ui-config-file /content/drive/MyDrive/SD-Data/Setting15/ui-config.json --ui-settings-file /content/drive/MyDrive/SD-Data/Setting15/config.json --ckpt-dir /content/drive/MyDrive/SD-Data/Model/ --lora-dir /content/drive/MyDrive/SD-Data/Lora/ --embeddings-dir /content/drive/MyDrive/SD-Data/Embeddings --styles-file /content/drive/MyDrive/SD-Data/Setting15/styles.csv --hypernetwork-dir /content/drive/MyDrive/SD-Data/Hypernetworks"
|
| 296 |
+
]
|
| 297 |
+
}
|
| 298 |
+
],
|
| 299 |
+
"metadata": {
|
| 300 |
+
"accelerator": "GPU",
|
| 301 |
+
"colab": {
|
| 302 |
+
"provenance": []
|
| 303 |
+
},
|
| 304 |
+
"kernelspec": {
|
| 305 |
+
"display_name": "Python 3",
|
| 306 |
+
"name": "python3"
|
| 307 |
+
},
|
| 308 |
+
"language_info": {
|
| 309 |
+
"name": "python"
|
| 310 |
+
}
|
| 311 |
+
},
|
| 312 |
+
"nbformat": 4,
|
| 313 |
+
"nbformat_minor": 0
|
| 314 |
+
}
|