{
"cells": [
{
"cell_type": "markdown",
"metadata": {
"id": "COlOWoTOMKSP"
},
"source": [
"\n",
" \n",
"
\n",
"\n",
"* get your civitai api key from [here](https://civitai.com/user/account)"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "tQqllRM-MCnT",
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000,
"referenced_widgets": [
"2733fcec246845c3adb5a53910c677fa",
"80d6c073913e4417b2676fc8a4181e69",
"8bc88940dc864ccdbb8cbbb56597a185",
"5fed0bbb70ca4ebab75d7fc54e6eecc1"
]
},
"outputId": "409e6fe0-37ac-471e-9b9e-a04751520d6c"
},
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"Output()"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "2733fcec246845c3adb5a53910c677fa"
}
},
"metadata": {}
},
{
"output_type": "display_data",
"data": {
"text/plain": [
"Output()"
],
"application/vnd.jupyter.widget-view+json": {
"version_major": 2,
"version_minor": 0,
"model_id": "8bc88940dc864ccdbb8cbbb56597a185"
}
},
"metadata": {}
}
],
"source": [
"# @title WebUI Installer {\"display-mode\":\"form\"}\n",
"\n",
"Webui = 'ComfyUI' # @param [\"A1111\", \"Forge\", \"ReForge\", \"Forge-Classic\", \"Forge-Neo\", \"ComfyUI\", \"SwarmUI\"]\n",
"Civitai___Key = '' # @param { type: \"string\", placeholder: \"Your Civitai API Key (required)\" }\n",
"HF_Read_Token = '' # @param { type: \"string\", placeholder: \"Your Huggingface READ Token (optional)\" }\n",
"Mount__GDrive = 'No' # @param [\"Yes\", \"No\"]\n",
"\n",
"mount = Mount__GDrive\n",
"\n",
"if mount == 'Yes':\n",
" from google.colab import drive\n",
" drive.mount('/content/drive')\n",
"\n",
"!curl -sLo /content/setup.py https://github.com/gutris1/segsmaker/raw/main/script/KC/setup.py\n",
"%run /content/setup.py --webui=\"$Webui\" --civitai_key=\"$Civitai___Key\" --hf_read_token=\"$HF_Read_Token\"\n",
"\n",
"if mount == 'Yes':\n",
" from pathlib import Path\n",
"\n",
" d = Path('/content/drive/MyDrive/Segsmaker')\n",
"\n",
" for n, p in {'checkpoint': CKPT, 'lora': LORA, 'vae': VAE, 'embeddings': Embeddings}.items():\n",
" f = d / n\n",
" f.mkdir(parents=True, exist_ok=True)\n",
" s = p / f'drive-{n}'\n",
" s.symlink_to(f, target_is_directory=True)\n",
"\n",
" !rm -rf $WebUI_Output\n",
" o = d / {'ComfyUI': 'comfyui-output', 'SwarmUI': 'swarmui-output'}.get(Webui, 'output')\n",
" o.mkdir(parents=True, exist_ok=True)\n",
" WebUI_Output.symlink_to(o, target_is_directory=True)\n",
"\n",
" if Webui not in {'ComfyUI', 'SwarmUI'}:\n",
" wc = WebUI / 'cache'\n",
" !rm -rf $wc\n",
" c = d / 'cache'\n",
" c.mkdir(parents=True, exist_ok=True)\n",
" wc.symlink_to(c, target_is_directory=True)"
]
},
{
"cell_type": "code",
"source": [
"#THIS IS MAINLY FOR KRITA AI PLUGIN\n",
"import os\n",
"from google.colab import userdata\n",
"\n",
"# Root directory where all downloads will be stored\n",
"root_dir = \"/content/ComfyUI/models\"\n",
"\n",
"# Ensure the root directory exists\n",
"os.makedirs(root_dir, exist_ok=True)\n",
"\n",
"# List of model URLs and their corresponding output directories\n",
"models_to_download = [\n",
" {\"url\": \"https://huggingface.co/h94/IP-Adapter/resolve/main/models/image_encoder/model.safetensors\", \"dir\": \"clip_vision/sd1.5\"},\n",
" {\"url\": \"https://huggingface.co/gemasai/4x_NMKD-Superscale-SP_178000_G/resolve/main/4x_NMKD-Superscale-SP_178000_G.pth\", \"dir\": \"upscale_models\"},\n",
" {\"url\": \"https://huggingface.co/Acly/Omni-SR/resolve/main/OmniSR_X2_DIV2K.safetensors\", \"dir\": \"upscale_models\"},\n",
" {\"url\": \"https://huggingface.co/Acly/Omni-SR/resolve/main/OmniSR_X3_DIV2K.safetensors\", \"dir\": \"upscale_models\"},\n",
" {\"url\": \"https://huggingface.co/Acly/Omni-SR/resolve/main/OmniSR_X4_DIV2K.safetensors\", \"dir\": \"upscale_models\"},\n",
" {\"url\": \"https://huggingface.co/Acly/MAT/resolve/main/MAT_Places512_G_fp16.safetensors\", \"dir\": \"inpaint\"},\n",
" {\"url\": \"https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_v11p_sd15_inpaint_fp16.safetensors\", \"dir\": \"controlnet\"},\n",
" {\"url\": \"https://huggingface.co/comfyanonymous/ControlNet-v1-1_fp16_safetensors/resolve/main/control_lora_rank128_v11f1e_sd15_tile_fp16.safetensors\", \"dir\": \"controlnet\"},\n",
" {\"url\": \"https://huggingface.co/h94/IP-Adapter/resolve/main/models/ip-adapter_sd15.safetensors\", \"dir\": \"ipadapter\"},\n",
" {\"url\": \"https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-SD15-8steps-CFG-lora.safetensors\", \"dir\": \"loras\"},\n",
" {\"url\": \"https://huggingface.co/h94/IP-Adapter/resolve/main/sdxl_models/ip-adapter_sdxl_vit-h.safetensors\", \"dir\": \"ipadapter\"},\n",
" {\"url\": \"https://huggingface.co/ByteDance/Hyper-SD/resolve/main/Hyper-SDXL-8steps-CFG-lora.safetensors\", \"dir\": \"loras\"},\n",
" {\"url\": \"https://huggingface.co/lllyasviel/fooocus_inpaint/resolve/main/fooocus_inpaint_head.pth\", \"dir\": \"inpaint\"},\n",
" {\"url\": \"https://huggingface.co/lllyasviel/fooocus_inpaint/resolve/main/inpaint_v26.fooocus.patch\", \"dir\": \"inpaint\"},\n",
"]\n",
"\n",
"for item in models_to_download:\n",
" url = item[\"url\"]\n",
" output_dir = os.path.join(root_dir, item[\"dir\"])\n",
" os.makedirs(output_dir, exist_ok=True)\n",
"\n",
" # Switch to the target directory\n",
" %cd -q {output_dir}\n",
"\n",
" # Extract the filename from the URL automatically to avoid \"NoneType\" errors\n",
" filename = url.split('/')[-1]\n",
"\n",
" print(f\"Downloading {filename} to {item['dir']}...\")\n",
"\n",
" # Run the download magic with the correct filename variable\n",
" %download {url} {filename}"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "wB4tC6EySt9m",
"outputId": "19fb9451-82df-4b46-f54b-890a17af097e"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Downloading model.safetensors to clip_vision/sd1.5...\n",
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35mfcd3df\u001b[0m 2.3\u001b[38;5;135mGiB\u001b[0m\u001b[35m/\u001b[0m2.3\u001b[38;5;135mGiB\u001b[0m\u001b[35m(\u001b[0m99%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m1\u001b[0m \u001b[36mDL\u001b[0m:133\u001b[38;5;135mMiB\u001b[0m\u001b[35m】\u001b[0m\n",
" fcd3df|\u001b[38;5;35mOK\u001b[0m | 141MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mclip_vision\u001b[38;5;208m/\u001b[0msd1.5\u001b[38;5;208m/\u001b[0mmodel.safetensors\n",
"Downloading 4x_NMKD-Superscale-SP_178000_G.pth to upscale_models...\n",
" 5c50ca|\u001b[38;5;35mOK\u001b[0m | 97MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mupscale_models\u001b[38;5;208m/\u001b[0m4x_NMKD-Superscale-SP_178000_G.pth\n",
"Downloading OmniSR_X2_DIV2K.safetensors to upscale_models...\n",
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35mbae8f7\u001b[0m 0\u001b[38;5;135mB\u001b[0m\u001b[35m/\u001b[0m1.5\u001b[38;5;135mMiB\u001b[0m\u001b[35m(\u001b[0m0%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m2\u001b[0m \u001b[36mDL\u001b[0m:0\u001b[38;5;135mB\u001b[0m\u001b[35m】\u001b[0m\n",
" bae8f7|\u001b[38;5;35mOK\u001b[0m | 2.3MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mupscale_models\u001b[38;5;208m/\u001b[0mOmniSR_X2_DIV2K.safetensors\n",
"Downloading OmniSR_X3_DIV2K.safetensors to upscale_models...\n",
" 84e6dd|\u001b[38;5;35mOK\u001b[0m | 4.5MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mupscale_models\u001b[38;5;208m/\u001b[0mOmniSR_X3_DIV2K.safetensors\n",
"Downloading OmniSR_X4_DIV2K.safetensors to upscale_models...\n",
" 38b081|\u001b[38;5;35mOK\u001b[0m | 2.2MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mupscale_models\u001b[38;5;208m/\u001b[0mOmniSR_X4_DIV2K.safetensors\n",
"Downloading MAT_Places512_G_fp16.safetensors to inpaint...\n",
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35mb78c84\u001b[0m 62\u001b[38;5;135mMiB\u001b[0m\u001b[35m/\u001b[0m119\u001b[38;5;135mMiB\u001b[0m\u001b[35m(\u001b[0m52%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m16\u001b[0m \u001b[36mDL\u001b[0m:213\u001b[38;5;135mMiB\u001b[0m\u001b[35m】\u001b[0m\n",
" b78c84|\u001b[38;5;35mOK\u001b[0m | 98MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0minpaint\u001b[38;5;208m/\u001b[0mMAT_Places512_G_fp16.safetensors\n",
"Downloading control_v11p_sd15_inpaint_fp16.safetensors to controlnet...\n",
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35m9e2670\u001b[0m 686\u001b[38;5;135mMiB\u001b[0m\u001b[35m/\u001b[0m689\u001b[38;5;135mMiB\u001b[0m\u001b[35m(\u001b[0m99%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m11\u001b[0m \u001b[36mDL\u001b[0m:222\u001b[38;5;135mMiB\u001b[0m\u001b[35m】\u001b[0m\n",
" 9e2670|\u001b[38;5;35mOK\u001b[0m | 187MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mcontrolnet\u001b[38;5;208m/\u001b[0mcontrol_v11p_sd15_inpaint_fp16.safetensors\n",
"Downloading control_lora_rank128_v11f1e_sd15_tile_fp16.safetensors to controlnet...\n",
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35mcf1203\u001b[0m 42\u001b[38;5;135mMiB\u001b[0m\u001b[35m/\u001b[0m129\u001b[38;5;135mMiB\u001b[0m\u001b[35m(\u001b[0m32%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m16\u001b[0m \u001b[36mDL\u001b[0m:188\u001b[38;5;135mMiB\u001b[0m\u001b[35m】\u001b[0m\n",
" cf1203|\u001b[38;5;35mOK\u001b[0m | 109MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mcontrolnet\u001b[38;5;208m/\u001b[0mcontrol_lora_rank128_v11f1e_sd15_tile_fp16.safetensors\n",
"Downloading ip-adapter_sd15.safetensors to ipadapter...\n",
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35m1e4630\u001b[0m 41\u001b[38;5;135mMiB\u001b[0m\u001b[35m/\u001b[0m42\u001b[38;5;135mMiB\u001b[0m\u001b[35m(\u001b[0m97%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m1\u001b[0m \u001b[36mDL\u001b[0m:78\u001b[38;5;135mMiB\u001b[0m\u001b[35m】\u001b[0m\n",
" 1e4630|\u001b[38;5;35mOK\u001b[0m | 50MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mipadapter\u001b[38;5;208m/\u001b[0mip-adapter_sd15.safetensors\n",
"Downloading Hyper-SD15-8steps-CFG-lora.safetensors to loras...\n",
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35m718850\u001b[0m 34\u001b[38;5;135mMiB\u001b[0m\u001b[35m/\u001b[0m256\u001b[38;5;135mMiB\u001b[0m\u001b[35m(\u001b[0m13%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m16\u001b[0m \u001b[36mDL\u001b[0m:126\u001b[38;5;135mMiB\u001b[0m \u001b[36mETA\u001b[0m:\u001b[33m1s\u001b[0m\u001b[35m】\u001b[0m\n",
" 718850|\u001b[38;5;35mOK\u001b[0m | 158MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mloras\u001b[38;5;208m/\u001b[0mHyper-SD15-8steps-CFG-lora.safetensors\n",
"Downloading ip-adapter_sdxl_vit-h.safetensors to ipadapter...\n",
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35m4cc701\u001b[0m 586\u001b[38;5;135mMiB\u001b[0m\u001b[35m/\u001b[0m666\u001b[38;5;135mMiB\u001b[0m\u001b[35m(\u001b[0m88%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m16\u001b[0m \u001b[36mDL\u001b[0m:99\u001b[38;5;135mMiB\u001b[0m\u001b[35m】\u001b[0m\n",
" 4cc701|\u001b[38;5;35mOK\u001b[0m | 91MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mipadapter\u001b[38;5;208m/\u001b[0mip-adapter_sdxl_vit-h.safetensors\n",
"Downloading Hyper-SDXL-8steps-CFG-lora.safetensors to loras...\n",
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35m06800e\u001b[0m 526\u001b[38;5;135mMiB\u001b[0m\u001b[35m/\u001b[0m750\u001b[38;5;135mMiB\u001b[0m\u001b[35m(\u001b[0m70%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m16\u001b[0m \u001b[36mDL\u001b[0m:247\u001b[38;5;135mMiB\u001b[0m\u001b[35m】\u001b[0m\n",
" 06800e|\u001b[38;5;35mOK\u001b[0m | 205MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mloras\u001b[38;5;208m/\u001b[0mHyper-SDXL-8steps-CFG-lora.safetensors\n",
"Downloading fooocus_inpaint_head.pth to inpaint...\n",
" d932a9|\u001b[38;5;35mOK\u001b[0m | 170KiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0minpaint\u001b[38;5;208m/\u001b[0mfooocus_inpaint_head.pth\n",
"Downloading inpaint_v26.fooocus.patch to inpaint...\n",
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35mb00ce8\u001b[0m 1.0\u001b[38;5;135mGiB\u001b[0m\u001b[35m/\u001b[0m1.2\u001b[38;5;135mGiB\u001b[0m\u001b[35m(\u001b[0m83%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m16\u001b[0m \u001b[36mDL\u001b[0m:128\u001b[38;5;135mMiB\u001b[0m \u001b[36mETA\u001b[0m:\u001b[33m1s\u001b[0m\u001b[35m】\u001b[0m\n",
" b00ce8|\u001b[38;5;35mOK\u001b[0m | 131MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0minpaint\u001b[38;5;208m/\u001b[0minpaint_v26.fooocus.patch\n"
]
}
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "9TeZZ9WrOsxS",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "5130648c-d22e-45ff-c94d-2c91a98da281"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"Cloning into 'rgthree-comfy'...\n",
"remote: Enumerating objects: 4678, done.\u001b[K\n",
"remote: Counting objects: 100% (1615/1615), done.\u001b[K\n",
"remote: Compressing objects: 100% (424/424), done.\u001b[K\n",
"remote: Total 4678 (delta 1347), reused 1204 (delta 1191), pack-reused 3063 (from 2)\u001b[K\n",
"Receiving objects: 100% (4678/4678), 4.98 MiB | 22.34 MiB/s, done.\n",
"Resolving deltas: 100% (3467/3467), done.\n",
"Cloning into 'comfyui-vae-reflection'...\n",
"remote: Enumerating objects: 39, done.\u001b[K\n",
"remote: Counting objects: 100% (39/39), done.\u001b[K\n",
"remote: Compressing objects: 100% (26/26), done.\u001b[K\n",
"remote: Total 39 (delta 14), reused 34 (delta 9), pack-reused 0 (from 0)\u001b[K\n",
"Receiving objects: 100% (39/39), 3.87 MiB | 33.31 MiB/s, done.\n",
"Resolving deltas: 100% (14/14), done.\n",
"Cloning into 'ComfyUI_IPAdapter_plus'...\n",
"remote: Enumerating objects: 813, done.\u001b[K\n",
"remote: Counting objects: 100% (429/429), done.\u001b[K\n",
"remote: Compressing objects: 100% (132/132), done.\u001b[K\n",
"remote: Total 813 (delta 404), reused 297 (delta 297), pack-reused 384 (from 2)\u001b[K\n",
"Receiving objects: 100% (813/813), 4.73 MiB | 30.65 MiB/s, done.\n",
"Resolving deltas: 100% (551/551), done.\n",
"Cloning into 'comfyui-tooling-nodes'...\n",
"remote: Enumerating objects: 524, done.\u001b[K\n",
"remote: Counting objects: 100% (264/264), done.\u001b[K\n",
"remote: Compressing objects: 100% (63/63), done.\u001b[K\n",
"remote: Total 524 (delta 218), reused 201 (delta 201), pack-reused 260 (from 1)\u001b[K\n",
"Receiving objects: 100% (524/524), 1.19 MiB | 18.83 MiB/s, done.\n",
"Resolving deltas: 100% (328/328), done.\n",
"Cloning into 'comfyui-inpaint-nodes'...\n",
"remote: Enumerating objects: 266, done.\u001b[K\n",
"remote: Counting objects: 100% (72/72), done.\u001b[K\n",
"remote: Compressing objects: 100% (25/25), done.\u001b[K\n",
"remote: Total 266 (delta 62), reused 55 (delta 47), pack-reused 194 (from 1)\u001b[K\n",
"Receiving objects: 100% (266/266), 3.11 MiB | 26.79 MiB/s, done.\n",
"Resolving deltas: 100% (156/156), done.\n",
"Cloning into 'SDXL-Flux2VAE-ComfyUI-Node'...\n",
"remote: Enumerating objects: 44, done.\u001b[K\n",
"remote: Counting objects: 100% (44/44), done.\u001b[K\n",
"remote: Compressing objects: 100% (35/35), done.\u001b[K\n",
"remote: Total 44 (delta 20), reused 22 (delta 7), pack-reused 0 (from 0)\u001b[K\n",
"Receiving objects: 100% (44/44), 28.92 KiB | 630.00 KiB/s, done.\n",
"Resolving deltas: 100% (20/20), done.\n",
" c11b41|\u001b[38;5;35mOK\u001b[0m | 298KiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mcustom_nodes\u001b[38;5;208m/\u001b[0manina_fp16_patch.py\n",
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35m04181b\u001b[0m 239\u001b[38;5;135mMiB\u001b[0m\u001b[35m/\u001b[0m242\u001b[38;5;135mMiB\u001b[0m\u001b[35m(\u001b[0m98%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m4\u001b[0m \u001b[36mDL\u001b[0m:183\u001b[38;5;135mMiB\u001b[0m\u001b[35m】\u001b[0m\n",
" 04181b|\u001b[38;5;35mOK\u001b[0m | 131MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mvae\u001b[38;5;208m/\u001b[0mqwen_image_vae.safetensors\n",
" missing URL, downloading nothing\n",
" missing URL, downloading nothing\n",
" missing URL, downloading nothing\n",
" missing URL, downloading nothing\n"
]
}
],
"source": [
"''' These are placeholders for commands with empty inputs. '''\n",
"''' Replace them with actual values or skip/delete this cell. '''\n",
"\n",
"\n",
"''' SD Extensions / ComfyUI Custom Nodes '''\n",
"%cd -q $Extensions\n",
"!git clone https://github.com/rgthree/rgthree-comfy.git\n",
"# !git clone https://github.com/Jelosus2/comfyui-vae-reflection.git\n",
"# !git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus.git\n",
"# !git clone https://github.com/Acly/comfyui-tooling-nodes.git\n",
"# !git clone https://github.com/Acly/comfyui-inpaint-nodes.git\n",
"# !git clone https://github.com/Anzhc/SDXL-Flux2VAE-ComfyUI-Node.git\n",
"%download https://huggingface.co/RicemanT/lora-testing/resolve/main/anina_fp16_patch.py\n",
"\n",
"''' VAE '''\n",
"%cd -q $VAE\n",
"%download https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/vae/qwen_image_vae.safetensors\n",
"\n",
"''' Embeddings '''\n",
"%cd -q $Embeddings\n",
"%download\n",
"\n",
"''' Upscalers '''\n",
"%cd -q $Upscalers\n",
"%download\n",
"\n",
"''' FLUX Unet '''\n",
"%cd -q $UNET\n",
"%download\n",
"\n",
"''' FLUX Clip '''\n",
"%cd -q $CLIP\n",
"%download"
]
},
{
"cell_type": "code",
"execution_count": null,
"metadata": {
"id": "CuR9tiSnPRBM",
"colab": {
"base_uri": "https://localhost:8080/"
},
"outputId": "f56fb010-c51b-4979-daba-445b9e8d75ac"
},
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
" \u001b[35m【\u001b[0m\u001b[36m#\u001b[0m\u001b[38;5;35mcfe993\u001b[0m 3.7\u001b[38;5;135mGiB\u001b[0m\u001b[35m/\u001b[0m3.8\u001b[38;5;135mGiB\u001b[0m\u001b[35m(\u001b[0m96%\u001b[35m)\u001b[0m \u001b[36mCN\u001b[0m:\u001b[38;5;208m16\u001b[0m \u001b[36mDL\u001b[0m:177\u001b[38;5;135mMiB\u001b[0m\u001b[35m】\u001b[0m\n",
" cfe993|\u001b[38;5;35mOK\u001b[0m | 152MiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mcheckpoints\u001b[38;5;208m/\u001b[0manima-preview.safetensors\n",
" baf0c7|\u001b[38;5;35mOK\u001b[0m | 164KiB/s|\u001b[38;5;208m/\u001b[0mcontent\u001b[38;5;208m/\u001b[0mComfyUI\u001b[38;5;208m/\u001b[0mmodels\u001b[38;5;208m/\u001b[0mcheckpoints\u001b[38;5;208m/\u001b[0manimaFp8_fp16Patch_trainingData.zip\n"
]
}
],
"source": [
"''' Checkpoint '''\n",
"%cd -q $CKPT\n",
"# %download https://huggingface.co/CabalResearch/NoobAI-RectifiedFlow-Experimental/resolve/main/NoobAI-RF-v0.2-Base.safetensors\n",
"# %download https://huggingface.co/CabalResearch/NoobAI-Flux2VAE-RectifiedFlow-0.3/resolve/main/NoobAI%20Flux2VAE%20RF%20v0.3%20-%20Base.safetensors\n",
"# %download https://huggingface.co/ChenkinNoob/ChenkinNoob-XL-V0.2/resolve/main/ChenkinNoob-XL-V0.2.safetensors\n",
"# %download https://huggingface.co/ChenkinRF/Chenkin0.2RF-Experiments/resolve/main/Chenkin-RF-e4.safetensors\n",
"# %download https://huggingface.co/ChenkinRF/Chenkin0.2RF-Experiments/resolve/main/Chenkin-RF-e5-step00025600.safetensors\n",
"%download https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/diffusion_models/anima-preview.safetensors\n",
"''' LoRA '''\n",
"%cd -q $LORA\n",
"# %download https://civitai.com/models/122359/detail-tweaker-xl\n",
"# %download https://civitai.com/models/669571/pony-add-more-details details-add-more-pony.safetensors"
]
},
{
"cell_type": "code",
"source": [
"# 1. Define the Text Encoder folder path\n",
"TE = '/content/ComfyUI/models/text_encoders'\n",
"\n",
"# 2. Ensure the directory exists (just in case)\n",
"import os\n",
"os.makedirs(TE, exist_ok=True)\n",
"\n",
"# 3. Use wget to download (replace URL with your model link)\n",
"# Example: downloading the T5XXL Encoder\n",
"!wget -c \"# 1. Define the Text Encoder folder path\n",
"TE = '/content/ComfyUI/models/text_encoders'\n",
"\n",
"# 2. Ensure the directory exists (just in case)\n",
"import os\n",
"os.makedirs(TE, exist_ok=True)\n",
"\n",
"# 3. Use wget to download (replace URL with your model link)\n",
"# Example: downloading the T5XXL Encoder\n",
"!wget -c \"https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/text_encoders/qwen_3_06b_base.safetensors\" -P $TE"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/"
},
"id": "3nvLKXf7foSP",
"outputId": "56091f44-b0d1-4aa4-8808-e2e16ec48d0a"
},
"execution_count": null,
"outputs": [
{
"output_type": "stream",
"name": "stdout",
"text": [
"/bin/bash: -c: line 1: unexpected EOF while looking for matching `\"'\n",
"/bin/bash: -c: line 2: syntax error: unexpected end of file\n",
"--2026-02-02 11:09:56-- https://huggingface.co/circlestone-labs/Anima/resolve/main/split_files/text_encoders/qwen_3_06b_base.safetensors\n",
"Resolving huggingface.co (huggingface.co)... 18.239.50.80, 18.239.50.49, 18.239.50.103, ...\n",
"Connecting to huggingface.co (huggingface.co)|18.239.50.80|:443... connected.\n",
"HTTP request sent, awaiting response... 302 Found\n",
"Location: https://us.gcp.cdn.hf.co/xet-bridge-us/697bce851d5f3563e9fe891f/1e48a7f3dfbc9a887e0ec71eef7c3dadd9c5109c6d9b10881f82ade063dbb8c4?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27qwen_3_06b_base.safetensors%3B+filename%3D%22qwen_3_06b_base.safetensors%22%3B&Expires=1770034196&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiRXBvY2hUaW1lIjoxNzcwMDM0MTk2fX0sIlJlc291cmNlIjoiaHR0cHM6Ly91cy5nY3AuY2RuLmhmLmNvL3hldC1icmlkZ2UtdXMvNjk3YmNlODUxZDVmMzU2M2U5ZmU4OTFmLzFlNDhhN2YzZGZiYzlhODg3ZTBlYzcxZWVmN2MzZGFkZDljNTEwOWM2ZDliMTA4ODFmODJhZGUwNjNkYmI4YzRcXD9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSoifV19&Signature=KWwx1Jz1bOaPrsQMoTk7IZtQQ2Gpw3fQXqfiFsNTrNeLI4xAefxgmv5e70Zer1hgTwkRD5zW1DXS-JgIcXsOW%7E9iSH8rUCd%7EbJyc5NLYT77MzyZJWn-b8xMsVVfap8efTBq7a3VQ-mdlzIKSnJ0gingv5md4UOGEFU6Dq6xCLd6GY16KW1E-wHR8UMcSEAPv0gbZcUf8jsIcBZwND3RBBLW6dAwQz8cIfIP%7EEZ6i1UeL6iWFQE6xOcya44Qn1Qd4H18bwWQR15GbsQhEoSYNcFBXPKJipQZ0397mBqCF3uFAUgdsyk1EmPryfTPqsv85ODt0lWBG5PAjDLyYas1DqA__&Key-Pair-Id=KJLH8B0YWU4Y8M [following]\n",
"--2026-02-02 11:09:56-- https://us.gcp.cdn.hf.co/xet-bridge-us/697bce851d5f3563e9fe891f/1e48a7f3dfbc9a887e0ec71eef7c3dadd9c5109c6d9b10881f82ade063dbb8c4?response-content-disposition=inline%3B+filename*%3DUTF-8%27%27qwen_3_06b_base.safetensors%3B+filename%3D%22qwen_3_06b_base.safetensors%22%3B&Expires=1770034196&Policy=eyJTdGF0ZW1lbnQiOlt7IkNvbmRpdGlvbiI6eyJEYXRlTGVzc1RoYW4iOnsiRXBvY2hUaW1lIjoxNzcwMDM0MTk2fX0sIlJlc291cmNlIjoiaHR0cHM6Ly91cy5nY3AuY2RuLmhmLmNvL3hldC1icmlkZ2UtdXMvNjk3YmNlODUxZDVmMzU2M2U5ZmU4OTFmLzFlNDhhN2YzZGZiYzlhODg3ZTBlYzcxZWVmN2MzZGFkZDljNTEwOWM2ZDliMTA4ODFmODJhZGUwNjNkYmI4YzRcXD9yZXNwb25zZS1jb250ZW50LWRpc3Bvc2l0aW9uPSoifV19&Signature=KWwx1Jz1bOaPrsQMoTk7IZtQQ2Gpw3fQXqfiFsNTrNeLI4xAefxgmv5e70Zer1hgTwkRD5zW1DXS-JgIcXsOW%7E9iSH8rUCd%7EbJyc5NLYT77MzyZJWn-b8xMsVVfap8efTBq7a3VQ-mdlzIKSnJ0gingv5md4UOGEFU6Dq6xCLd6GY16KW1E-wHR8UMcSEAPv0gbZcUf8jsIcBZwND3RBBLW6dAwQz8cIfIP%7EEZ6i1UeL6iWFQE6xOcya44Qn1Qd4H18bwWQR15GbsQhEoSYNcFBXPKJipQZ0397mBqCF3uFAUgdsyk1EmPryfTPqsv85ODt0lWBG5PAjDLyYas1DqA__&Key-Pair-Id=KJLH8B0YWU4Y8M\n",
"Resolving us.gcp.cdn.hf.co (us.gcp.cdn.hf.co)... 34.120.165.110\n",
"Connecting to us.gcp.cdn.hf.co (us.gcp.cdn.hf.co)|34.120.165.110|:443... connected.\n",
"HTTP request sent, awaiting response... 200 OK\n",
"Length: 1192135096 (1.1G) [application/octet-stream]\n",
"Saving to: ‘/content/ComfyUI/models/text_encoders/qwen_3_06b_base.safetensors’\n",
"\n",
"qwen_3_06b_base.saf 100%[===================>] 1.11G 97.5MB/s in 17s \n",
"\n",
"2026-02-02 11:10:13 (66.3 MB/s) - ‘/content/ComfyUI/models/text_encoders/qwen_3_06b_base.safetensors’ saved [1192135096/1192135096]\n",
"\n"
]
}
]
},
{
"cell_type": "code",
"source": [
"#FOR TESTING LORAS, DONT NEED TO TOUCH\n",
"from huggingface_hub import snapshot_download, login\n",
"import os\n",
"import shutil\n",
"\n",
"# 1. Login\n",
"login()\n",
"\n",
"# 2. Setup ComfyUI Paths\n",
"# Based on your sidebar: /content/models/loras\n",
"dest_folder = \"/content/ComfyUI/models/loras\"\n",
"temp_download = \"/content/ComfyUI/models/loras/tmp_lora\"\n",
"\n",
"# 3. Download from HF\n",
"print(f\"Downloading folders to {temp_download}...\")\n",
"snapshot_download(\n",
" repo_id=\"RicemanT/lora-testing\",\n",
" local_dir=temp_download,\n",
" allow_patterns=[\"jacknife-LoCon-ChenkinNoobRectifiedFlowV0.2/*\"]\n",
")\n",
"\n",
"# 4. Move and Flatten Files\n",
"if not os.path.exists(dest_folder):\n",
" os.makedirs(dest_folder, exist_ok=True)\n",
"\n",
"for root, dirs, files in os.walk(temp_download):\n",
" for file in files:\n",
" # Check for model weights\n",
" if file.endswith(('.safetensors', '.pt', '.ckpt')):\n",
" source_path = os.path.join(root, file)\n",
" target_path = os.path.join(dest_folder, file)\n",
"\n",
" # Move file directly to /models/loras/\n",
" shutil.move(source_path, target_path)\n",
" print(f\"✅ Moved to ComfyUI: {file}\")\n",
"\n",
"# 5. Cleanup\n",
"shutil.rmtree(temp_download)\n",
"print(f\"\\n✨ Success! Files are ready in {dest_folder}\")"
],
"metadata": {
"colab": {
"base_uri": "https://localhost:8080/",
"height": 1000,
"referenced_widgets": [
"731ee0fccf814cd9acc1ad21d078008a",
"38810fa0a1f34538abc7eb32e7c658e2",
"b1c06239f8e14b9eb4316d68c6a2dd0f",
"46557e494736430cbd5d7ccacf0e00aa",
"c5e58baaa7a5454d995df0fe1c60575d",
"2693ccc877774367bf0947e4854e9dc2",
"a4790f125c344329a3313cee0b4315ad",
"882041d7837f40d68e9eccbe9dbf378b",
"43f957bf015c4c1c8a3168bdc91defe4",
"991cb58f685346fd8cd7b57c387bb3a5",
"bfc4aa90f185419c8f3d741d0b5fe1d1",
"1d1ab525b02e47ef9580e28a45283c1a",
"5500afc93cc04c1182994d41379ce6f5",
"b51babdb602243f983a9780724590a94",
"fb8842f8f8c545f68615c10511219276",
"6307aff16e94424e82e9763502cf6271",
"ea1c6a748bbb4a8492b567ef06180387",
"0011b5e8770646079ac97f2d8ccae717",
"408de66dc3e74621a13a02416fee885c",
"8655e63967b54ea89d43e5055ebb8b5e",
"e0a4300295e3467ca08c74b96b2ef674",
"0ec0a6b756af4ab7a8f986070b81e582",
"2f145316a0be4b17a7da269e52aefa29",
"86d978e9b5c840cba12138dc78cba085",
"f282a48a426a40eea78ce3e0196511a8",
"5d4c596b428f43409352082cf4aef897",
"6d655b9edccf49328825909313e17752",
"30abcc4b0fed4d0b9c0f26bd5b3089d2",
"bd738aa73a2541e7bd3b112b94d383d6",
"9b2293dce2e2458887526938975e1662",
"0e7f705163ec4f70bed2f5b1273afbdb",
"da3c0e22e7344d40906934f4f0142c13",
"09618daa1114447fa8b209af7c7dfa15",
"8bfb4b83974e4ec2b37ef4ab96afdcd0",
"5bbdf52df4b44ff2a25bc5ef99a2e706",
"92aabacf98e84bcbb0cc815238341a8b",
"3ce5ac929feb46a29640d3f142d0d52c",
"48cddeb612594a3dac5f45ece93075f9",
"a1c1ea26dee64ed7aeec227bab600bb3",
"441e270504cd4cab90256504dfd4da48",
"ebc1b1fdad2f41b7be76b0fb2ead0f69",
"60b44a20442447e29e7adad95b4745c6",
"fbd2fe9880a148089318998a96571e45",
"106776b0ed1847e380b6cc3fc27b37d5",
"b353f108ba70468e91f6c44c6922e1af",
"02028ac2871347e28a2d9999f0852c36",
"0f51bc4778dd4d8baa0974fca96deb1d",
"2d6e9e874de04c938bae1b6798a9a308",
"366d073f6b0d42cd8e98473d0b5a543b",
"fc91c7702fec4604a9b16c7207d98831",
"8b16cde4eaf6465dbc8e16021d57635c",
"bc992a879bea449a8c5b681b1a78f8da",
"7fa22627ec9b4b5e964a7d1ee0a1ff53",
"27f2ddf9a07f478cb43538212fb08f0c",
"93eb1dfa25154748822e41c4fa632614",
"4ab64b3443ca4ded8dacc083c6ed354a",
"0cb71826f30b487b986476f8320e1cff",
"933791d6b9d4432581150d8d6f9a1849",
"36b923661a3d4681aa137d9ed6082a97",
"9554d9985b5e425e9e5236b8b99a620f",
"e1dc07cf3621487c9d48b167e865552e",
"4cc666876cb74ede98fd83f17c0e7503",
"0dc145aec27c409295a26f5a4db4aa94",
"0103a8e3ebad4fdcb8f79f5e65aa3649",
"ef42a2c1e370404c986337db0f7058a6",
"c115fb4344f34c3f902640ab851355ed",
"3036fce0556745e292bf31777e9aea37",
"143481eff1b244f19eb332a21ae4a8e4",
"432092381be642d1b17041c64afcf8f2",
"7153a03f1ea4489cb8ea89c83f28d7e2",
"0a36c3764d9f4e74983ebf42fa9539ed",
"fa3f750938c44c1b95f6fcf441f2538e",
"40031cc816074f978e316e22eb362247",
"866366e8ae6d4fb495f49c681023f528",
"dc72ebbc4cab44f2896e9b87bc5feaed",
"cf64ed9263a84e62aef16eadf88ca06f",
"1fef5c3751e14523a2258b66fc10d73f",
"c2499ffdb9b2486e9a7abc59c9a28f4b",
"9908c62f49dc49cfa74f636cfc5ed93f",
"ff3773f00eeb4b7daddd88f26b840c86",
"b0f9261e6c494d00b38e6370d18c2a25",
"2ff81430c90746149fa25d76e2ce840f",
"36e69035dca94032be6883e5d75861d3",
"ed4dce67f0fc4cefb1c270625fc6225c",
"dce6f55cda004e69b269bf220fea6eca",
"43575e9a1d324089a57285c2783c814c",
"2695277206184937a3a12ce598f05db9",
"c4e11d87a6a84ce8a09c819f59bad67c",
"994bd210504c40669e6c98888fa1d47d",
"50f63dfa6dd1403abd161a22e7134042",
"9634d6b52b04442aaf12869c5f829156",
"3659448765b74e99ba895e984b4e5242",
"5e42ec6ba8c249bea2b48b63ef64dac3",
"58720afe144d426195b6f91645b52dd7",
"22eb66f0992c4f4e9b5ab998c8261dbb",
"9d3ca3f4b24549e1aeeddc3d121ddc45",
"58c45a19d0024d04a1bbc4ee6d4f84cb",
"544e0d6674f34935a343b30ee16d8922",
"6bb0c9589778428b903b7f4549ae7e27",
"1cf4f6a71d0a4f3b80dce0e530b08a9c",
"0e66cc1af930429093c8331f6719728e",
"e072394242784910954bc9681577c744",
"8742ccc0db1648f889ec611217d2c056",
"9b42835421b6422eb94de48ef9f8dacf",
"5fb0071b431a4204a903036c66ea12a6",
"b88a16128f194eb6a0823ded555ef986",
"81f42902a3904ef4ba310f25390b594e",
"71c5db28b9694c64a01bbe0d0dbf04eb",
"645c87c7d2d64cdaacd77703f1715226",
"017ce8d9c5184fe8a5453cf274b64b4c",
"e8f77e8bc1804ae495f99e8c99d91f1f",
"6f0a2528f7754d00b69bd8791f751d14",
"61b1725be6df49f0af013615184e68df",
"5c47dee894e6443f86ca2dd20b8f5fbc",
"8ae37cc9e40a4eeb884e1977a490fbfa",
"bfe9d7a79d214812bdf98aa5633a3596"
]
},
"id": "JjYQWyWZSA0U",
"outputId": "f6d1d141-2707-442b-d4cc-76a87c03caa8"
},
"execution_count": null,
"outputs": [
{
"output_type": "display_data",
"data": {
"text/plain": [
"VBox(children=(HTML(value='