diff --git a/ComfyUI_+_WAS_Node_Suite_and_ComfyUI_Manager.ipynb b/ComfyUI_+_WAS_Node_Suite_and_ComfyUI_Manager.ipynb
index 9536e88..f9bf91e 100644
--- a/ComfyUI_+_WAS_Node_Suite_and_ComfyUI_Manager.ipynb
+++ b/ComfyUI_+_WAS_Node_Suite_and_ComfyUI_Manager.ipynb
@@ -38,7 +38,7 @@
"OPTIONS = {}\n",
"\n",
"#@markdown Store ComfyUI on Google Drive instead of Colab\n",
- "USE_GOOGLE_DRIVE = False #@param {type:\"boolean\"}\n",
+ "USE_GOOGLE_DRIVE = True #@param {type:\"boolean\"}\n",
"#markdown Update ComfyUI\n",
"UPDATE_COMFY_UI = True #@param {type:\"boolean\"}\n",
"#@markdown Update WAS Node Suite\n",
@@ -61,7 +61,7 @@
" WORKSPACE = \"/content/drive/MyDrive/ComfyUI\"\n",
" %cd /content/drive/MyDrive\n",
"\n",
- "![ ! -d $WORKSPACE ] && echo -= Initial setup ComfyUI =- && git clone https://github.com/comfyanonymous/ComfyUI /content/ComfyUI/\n",
+ "![ ! -d $WORKSPACE ] && echo -= Initial setup ComfyUI =- && git clone https://github.com/comfyanonymous/ComfyUI $WORKSPACE\n",
"%cd $WORKSPACE\n",
"\n",
"if UPDATE_COMFY_UI:\n",
@@ -70,20 +70,20 @@
"\n",
"!echo -= Install dependencies =-\n",
"!pip install xformers -r requirements.txt --extra-index-url https://download.pytorch.org/whl/cu118\n",
- "!git clone https://github.com/WASasquatch/was-node-suite-comfyui /content/ComfyUI/custom_nodes/was-node-suite-comfyui\n",
+ "!git clone https://github.com/WASasquatch/was-node-suite-comfyui $WORKSPACE/custom_nodes/was-node-suite-comfyui\n",
"\n",
"if USE_COMFYUI_MANAGER:\n",
- " !git clone https://github.com/ltdrdata/ComfyUI-Manager.git /content/ComfyUI/custom_nodes/ComfyUI-Manager\n",
+ " !git clone https://github.com/ltdrdata/ComfyUI-Manager.git $WORKSPACE/custom_nodes/ComfyUI-Manager\n",
"\n",
"if UPDATE_WAS_NS:\n",
- " %cd /content/ComfyUI/custom_nodes/was-node-suite-comfyui\n",
+ " %cd $WORKSPACE/custom_nodes/was-node-suite-comfyui\n",
" !git pull\n",
- " %cd /content/ComfyUI\n",
+ " %cd $WORKSPACE\n",
"\n",
"if UPDATE_COMFYUI_MANAGER:\n",
- " %cd /content/ComfyUI/custom_nodes/ComfyUI-Manager\n",
+ " %cd $WORKSPACE/custom_nodes/ComfyUI-Manager\n",
" !git pull\n",
- " %cd /content/ComfyUI\n",
+ " %cd $WORKSPACE\n",
"\n",
"if UPDATE_PILLOW:\n",
" !pip install --upgrade --force-reinstall pillow\n",
@@ -119,8 +119,8 @@
"\n",
"# Checkpoints\n",
"\n",
- "MODEL_OPTION = 'v1-5-pruned-emaonly.ckpt' #@param['None', 'v1-5-pruned-emaonly.ckpt', 'v2-1_512-ema-pruned.safetensors', 'v2-1_768-ema-pruned.safetensors', 'AbyssOrangeMix2_hard.safetensors', 'AOM3A1_orangemixs.safetensors', 'AOM3A3_orangemixs.safetensors', 'wd-1-5-beta2-fp16.safetensors']\n",
- "VAE_OPTION = 'None' #@param['None', 'vae-ft-mse-840000-ema-pruned.safetensors', 'orangemix.vae.pt', 'kl-f8-anime2.ckpt']\n",
+ "MODEL_OPTION = 'stable-diffusion-xl-base-1.0.safetensors' #@param['None', 'stable-diffusion-xl-base-1.0.safetensors', 'sd_xl_base_1.0_0.9vae.safetensors', 'sd_xl_base_0.9.safetensors', 'v1-5-pruned-emaonly.ckpt', 'v2-1_512-ema-pruned.safetensors', 'v2-1_768-ema-pruned.safetensors', 'AbyssOrangeMix2_hard.safetensors', 'AOM3A1_orangemixs.safetensors', 'AOM3A3_orangemixs.safetensors', 'wd-1-5-beta2-fp16.safetensors']\n",
+ "VAE_OPTION = 'vae-ft-mse-840000-ema-pruned.safetensors' #@param['None', 'vae-ft-mse-840000-ema-pruned.safetensors', 'orangemix.vae.pt', 'kl-f8-anime2.ckpt']\n",
"UPSCALE_MODEL_OPTION = 'None' #@param['None', 'RealESRGAN_x2.pth', 'RealESRGAN_x4.pth', '4x-UltraSharp', '4x_RealisticRescaler_100000_G.pth', 'BSRGAN.pth', 'BSRGANx2.pth']\n",
"LORA_OPTION = 'None' #@param['None', 'theovercomer8sContrastFix_sd21768.safetensors', 'theovercomer8sContrastFix_sd15.safetensors']\n",
"T2I_OPTION = 'None' #@param['None', 't2iadapter_depth_sd14v1.pth', 't2iadapter_seg_sd14v1.pth', 't2iadapter_sketch_sd14v1.pth', 't2iadapter_keypose_sd14v1.pth', 't2iadapter_openpose_sd14v1.pth', 't2iadapter_color_sd14v1.pth', 't2iadapter_canny_sd14v1.pth', '/t2iadapter_style_sd14v1.pth']\n",
@@ -133,79 +133,88 @@
"#@markdown **ControlNet Preprocessor Nodes** by Fannovel16:\n",
"INSTALL_CONTROLNET_NODES = False #@param {type:\"boolean\"}\n",
"\n",
+ "# SDXL\n",
+ "if MODEL_OPTION == 'stable-diffusion-xl-base-1.0.safetensors':\n",
+ " !wget -c https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0.safetensors -P $WORKSPACE/models/checkpoints/\n",
+ "if MODEL_OPTION == 'sd_xl_base_1.0_0.9vae.safetensors':\n",
+ " !wget -c https://huggingface.co/stabilityai/stable-diffusion-xl-base-1.0/resolve/main/sd_xl_base_1.0_0.9vae.safetensors -P $WORKSPACE/models/checkpoints/\n",
+ "if MODEL_OPTION == 'sd_xl_base_0.9.safetensors':\n",
+ " !wget -c https://huggingface.co/stabilityai/stable-diffusion-xl-base-0.9/resolve/main/sd_xl_base_0.9.safetensors -P $WORKSPACE/models/checkpoints/\n",
+ "\n",
+ "\n",
"# SD1.5\n",
"if MODEL_OPTION == 'v1-5-pruned-emaonly.ckpt':\n",
- " !wget -c https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt -P ./models/checkpoints/\n",
+ " !wget -c https://huggingface.co/runwayml/stable-diffusion-v1-5/resolve/main/v1-5-pruned-emaonly.ckpt -P $WORKSPACE/models/checkpoints/\n",
"\n",
"# SD2\n",
"if MODEL_OPTION == 'v2-1_512-ema-pruned.safetensors':\n",
- " !wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.safetensors -P ./models/checkpoints/\n",
+ " !wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1-base/resolve/main/v2-1_512-ema-pruned.safetensors -P $WORKSPACE/models/checkpoints/\n",
"if MODEL_OPTION == 'v2-1_768-ema-pruned.safetensors':\n",
- " !wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.safetensors -P ./models/checkpoints/\n",
+ " !wget -c https://huggingface.co/stabilityai/stable-diffusion-2-1/resolve/main/v2-1_768-ema-pruned.safetensors -P $WORKSPACE/models/checkpoints/\n",
"\n",
"# Some SD1.5 anime style\n",
"if MODEL_OPTION == 'AbyssOrangeMix2_hard.safetensors':\n",
- " !wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix2/AbyssOrangeMix2_hard.safetensors -P ./models/checkpoints/\n",
+ " !wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix2/AbyssOrangeMix2_hard.safetensors -P $WORKSPACE/models/checkpoints/\n",
"if MODEL_OPTION == 'AOM3A1_orangemixs.safetensors':\n",
- " !wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A1_orangemixs.safetensors -P ./models/checkpoints/\n",
+ " !wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A1_orangemixs.safetensors -P $WORKSPACE/models/checkpoints/\n",
"if MODEL_OPTION == 'AOM3A3_orangemixs.safetensors':\n",
- " !wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A3_orangemixs.safetensors -P ./models/checkpoints/\n",
+ " !wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/Models/AbyssOrangeMix3/AOM3A3_orangemixs.safetensors -P $WORKSPACE/models/checkpoints/\n",
"if MODEL_OPTION == 'anything-v3-fp16-pruned.safetensors':\n",
- " !wget -c https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/anything-v3-fp16-pruned.safetensors -P ./models/checkpoints/\n",
+ " !wget -c https://huggingface.co/Linaqruf/anything-v3.0/resolve/main/anything-v3-fp16-pruned.safetensors -P $WORKSPACE/models/checkpoints/\n",
"\n",
"# Waifu Diffusion 1.5 (anime style SD2.x 768-v)\n",
"if MODEL_OPTION == 'wd-1-5-beta2-fp16.safetensors':\n",
- " !wget -c https://huggingface.co/waifu-diffusion/wd-1-5-beta2/resolve/main/checkpoints/wd-1-5-beta2-fp16.safetensors -P ./models/checkpoints/\n",
+ " !wget -c https://huggingface.co/waifu-diffusion/wd-1-5-beta2/resolve/main/checkpoints/wd-1-5-beta2-fp16.safetensors -P $WORKSPACE/models/checkpoints/\n",
"\n",
"\n",
"# VAE\n",
"if VAE_OPTION == 'vae-ft-mse-840000-ema-pruned.safetensors':\n",
- " !wget -c https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors -P ./models/vae/\n",
+ " !wget -c https://huggingface.co/stabilityai/sd-vae-ft-mse-original/resolve/main/vae-ft-mse-840000-ema-pruned.safetensors -P $WORKSPACE/models/vae/\n",
"if VAE_OPTION == 'orangemix.vae.pt':\n",
- " !wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/VAEs/orangemix.vae.pt -P ./models/vae/'\n",
+ " !wget -c https://huggingface.co/WarriorMama777/OrangeMixs/resolve/main/VAEs/orangemix.vae.pt -P $WORKSPACE/models/vae/'\n",
"if VAE_OPTION == 'kl-f8-anime2.ckpt':\n",
- " !wget -c https://huggingface.co/hakurei/waifu-diffusion-v1-4/resolve/main/vae/kl-f8-anime2.ckpt -P ./models/vae/\n",
+ " !wget -c https://huggingface.co/hakurei/waifu-diffusion-v1-4/resolve/main/vae/kl-f8-anime2.ckpt -P $WORKSPACE/models/vae/\n",
"\n",
"\n",
"# Loras\n",
"if LORA_OPTION == 'theovercomer8sContrastFix_sd21768.safetensors':\n",
- " !wget -c https://civitai.com/api/download/models/10350 -O ./models/loras/theovercomer8sContrastFix_sd21768.safetensors #theovercomer8sContrastFix SD2.x 768-v\n",
+ " !wget -c https://civitai.com/api/download/models/10350 -O $WORKSPACE/models/loras/theovercomer8sContrastFix_sd21768.safetensors #theovercomer8sContrastFix SD2.x 768-v\n",
"if LORA_OPTION == 'theovercomer8sContrastFix_sd15.safetensors':\n",
- " !wget -c https://civitai.com/api/download/models/10638 -O ./models/loras/theovercomer8sContrastFix_sd15.safetensors #theovercomer8sContrastFix SD1.x\n",
+ " !wget -c https://civitai.com/api/download/models/10638 -O $WORKSPACE/models/loras/theovercomer8sContrastFix_sd15.safetensors #theovercomer8sContrastFix SD1.x\n",
"\n",
"\n",
"# T2I-Adapter\n",
"if T2I_OPTION == 't2iadapter_depth_sd14v1.pth':\n",
- " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_depth_sd14v1.pth -P ./models/controlnet/\n",
+ " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_depth_sd14v1.pth -P $WORKSPACE/models/controlnet/\n",
"if T2I_OPTION == 't2iadapter_seg_sd14v1.pth':\n",
- " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_seg_sd14v1.pth -P ./models/controlnet/\n",
+ " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_seg_sd14v1.pth -P $WORKSPACE/models/controlnet/\n",
"if T2I_OPTION == 't2iadapter_sketch_sd14v1.pth':\n",
- " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_sketch_sd14v1.pth -P ./models/controlnet/\n",
+ " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_sketch_sd14v1.pth -P $WORKSPACE/models/controlnet/\n",
"if T2I_OPTION == 't2iadapter_keypose_sd14v1.pth':\n",
- " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_keypose_sd14v1.pth -P ./models/controlnet/\n",
+ " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_keypose_sd14v1.pth -P $WORKSPACE/models/controlnet/\n",
"if T2I_OPTION == 't2iadapter_openpose_sd14v1.pth':\n",
- " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_openpose_sd14v1.pth -P ./models/controlnet/\n",
+ " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_openpose_sd14v1.pth -P $WORKSPACE/models/controlnet/\n",
"if T2I_OPTION == 't2iadapter_color_sd14v1.pth':\n",
- " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_color_sd14v1.pth -P ./models/controlnet/\n",
+ " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_color_sd14v1.pth -P $WORKSPACE/models/controlnet/\n",
"if T2I_OPTION == 't2iadapter_canny_sd14v1.pth':\n",
- " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_canny_sd14v1.pth -P ./models/controlnet/\n",
+ " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_canny_sd14v1.pth -P $WORKSPACE/models/controlnet/\n",
"\n",
"# T2I Styles Model\n",
"if T2I_OPTION == '/t2iadapter_style_sd14v1.pth':\n",
- " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_style_sd14v1.pth -P ./models/style_models/\n",
+ " !wget -c https://huggingface.co/TencentARC/T2I-Adapter/resolve/main/models/t2iadapter_style_sd14v1.pth -P $WORKSPACE/models/style_models/\n",
"\n",
"# CLIPVision model (needed for styles model)\n",
"if DOWNLOAD_CLIPVISION:\n",
- " !wget -c https://huggingface.co/openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin -O ./models/clip_vision/clip_vit14.bin\n",
+ " !wget -c https://huggingface.co/openai/clip-vit-large-patch14/resolve/main/pytorch_model.bin -O $WORKSPACE/models/clip_vision/clip_vit14.bin\n",
"\n",
"\n",
"# ControlNet\n",
"if CONTROLNET_OPTION == 'control_depth-fp16.safetensors':\n",
- " !wget -c https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_depth-fp16.safetensors -P ./models/controlnet/\n",
+ " !wget -c https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_depth-fp16.safetensors -P $WORKSPACE/models/controlnet/\n",
"if CONTROLNET_OPTION == 'control_scribble-fp16.safetensors':\n",
- " !wget -c https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_scribble-fp16.safetensors -P ./models/controlnet/\n",
+ " !wget -c https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_scribble-fp16.safetensors -P $WORKSPACE/models/controlnet/\n",
"if CONTROLNET_OPTION == 'control_openpose-fp16.safetensors':\n",
- " !wget -c https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_openpose-fp16.safetensors -P ./models/controlnet/\n",
+ " !wget -c https://huggingface.co/webui/ControlNet-modules-safetensors/resolve/main/control_openpose-fp16.safetensors -P $WORKSPACE/models/controlnet/\n",
"\n",
"\n",
"# Controlnet Preprocessor nodes by Fannovel16\n",
@@ -214,20 +223,103 @@
"\n",
"# ESRGAN upscale model\n",
"if UPSCALE_MODEL_OPTION == 'RealESRGAN_x2.pth':\n",
- " !wget -c https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x2.pth -P ./models/upscale_models/\n",
+ " !wget -c https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x2.pth -P $WORKSPACE/models/upscale_models/\n",
"if UPSCALE_MODEL_OPTION == 'RealESRGAN_x4.pth':\n",
- " !wget -c https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth -P ./models/upscale_models/\n",
+ " !wget -c https://huggingface.co/sberbank-ai/Real-ESRGAN/resolve/main/RealESRGAN_x4.pth -P $WORKSPACE/models/upscale_models/\n",
"if UPSCALE_MODEL_OPTION == '4x-UltraSharp':\n",
- " !wget -c https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/4x-UltraSharp.pth -P ./models/upscale_models/\n",
+ " !wget -c https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/4x-UltraSharp.pth -P $WORKSPACE/models/upscale_models/\n",
"if UPSCALE_MODEL_OPTION == '4x_RealisticRescaler_100000_G.pth':\n",
- " !wget -c https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/4x_RealisticRescaler_100000_G.pth -P ./models/upscale_models/\n",
+ " !wget -c https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/4x_RealisticRescaler_100000_G.pth -P $WORKSPACE/models/upscale_models/\n",
"if UPSCALE_MODEL_OPTION == 'BSRGAN.pth':\n",
- " !wget -c https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/BSRGAN.pth -P ./models/upscale_models/\n",
+ " !wget -c https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/BSRGAN.pth -P $WORKSPACE/models/upscale_models/\n",
"if UPSCALE_MODEL_OPTION == 'BSRGANx2.pth':\n",
- " !wget -c https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/BSRGANx2.pth -P ./models/upscale_models/\n",
+ " !wget -c https://huggingface.co/uwg/upscaler/resolve/main/ESRGAN/BSRGANx2.pth -P $WORKSPACE/models/upscale_models/\n",
"\n"
]
},
+ {
+ "cell_type": "code",
+ "source": [
+ "#@title Direct Download Models\n",
+ "\n",
+ "import os\n",
+ "\n",
+ "types = {\n",
+ " 'CHECKPOINTS': os.path.join(WORKSPACE, 'models/checkpoints'),\n",
+ " 'CLIP': os.path.join(WORKSPACE, 'models/clip'),\n",
+ " 'CLIP_VISION': os.path.join(WORKSPACE, 'models/clip_vision'),\n",
+ " 'CONFIGS': os.path.join(WORKSPACE, 'models/configs'),\n",
+ " 'CONTROLNET': os.path.join(WORKSPACE, 'models/controlnet'),\n",
+ " 'DIFFUSERS': os.path.join(WORKSPACE, 'models/diffusers'),\n",
+ " 'EMBEDDINGS': os.path.join(WORKSPACE, 'models/embeddings'),\n",
+ " 'GLIGEN': os.path.join(WORKSPACE, 'models/gligen'),\n",
+ " 'HYPERNETWORKS': os.path.join(WORKSPACE, 'models/hypernetworks'),\n",
+ " 'LORAS': os.path.join(WORKSPACE, 'models/loras'),\n",
+ " 'STYLE_MODEL': os.path.join(WORKSPACE, 'models/style_models'),\n",
+ " 'UNET': os.path.join(WORKSPACE, 'models/unet'),\n",
+ " 'UPSCALE_MODELS': os.path.join(WORKSPACE, 'models/upscale_models'),\n",
+ " 'VAE': os.path.join(WORKSPACE, 'models/vae'),\n",
+ " 'VAE_APPROX': os.path.join(WORKSPACE, 'models/vae_approx')\n",
+ "}\n",
+ "\n",
+ "TYPE = 'CHECKPOINTS' #@param ['CHECKPOINTS', 'CLIP', 'CLIP_VISION', 'CONFIGS', 'CONTROLNET', 'DIFFUSERS', 'EMBEDDINGS', 'GLIGEN', 'HYPERNETWORKS', 'LORAS', 'STYLE_MODEL', 'UNET', 'UPSCALE_MODELS', 'VAE', 'VAE_APPROX']\n",
+ "DIRECT_URL = 'https://civitai.com/api/download/models/141627' #@param {type:\"string\"}\n",
+ "SAVE_AS = 'Differentia_V1.safetensors' #@param {type: 'string'}\n",
+ "#@markdown Direct link to the download. The example URL is Differentia (https://civitai.com/models/129232)\n",
+ "\n",
+ "if TYPE and DIRECT_URL:\n",
+ " target = os.path.join(types[TYPE], SAVE_AS)\n",
+ " !wget -c $DIRECT_URL -O $target"
+ ],
+ "metadata": {
+ "cellView": "form",
+ "id": "Bo0pf4So3tCK"
+ },
+ "execution_count": null,
+ "outputs": []
+ },
+ {
+ "cell_type": "code",
+ "source": [
+ "#@title ComfyUI Cloudfare (Recommended)\n",
+ "#@markdown Running ComfyUI with Cloudfare is now the recommended method.\n",
+ "!wget https://github.com/cloudflare/cloudflared/releases/latest/download/cloudflared-linux-amd64.deb\n",
+ "!dpkg -i cloudflared-linux-amd64.deb\n",
+ "\n",
+ "import subprocess\n",
+ "import threading\n",
+ "import time\n",
+ "import socket\n",
+ "import urllib.request\n",
+ "\n",
+ "def iframe_thread(port):\n",
+ " while True:\n",
+ " time.sleep(0.5)\n",
+ " sock = socket.socket(socket.AF_INET, socket.SOCK_STREAM)\n",
+ " result = sock.connect_ex(('127.0.0.1', port))\n",
+ " if result == 0:\n",
+ " break\n",
+ " sock.close()\n",
+ " print(\"\\nComfyUI finished loading, trying to launch cloudflared (if it gets stuck here cloudflared is having issues)\\n\")\n",
+ "\n",
+ " p = subprocess.Popen([\"cloudflared\", \"tunnel\", \"--url\", \"http://127.0.0.1:{}\".format(port)], stdout=subprocess.PIPE, stderr=subprocess.PIPE)\n",
+ " for line in p.stderr:\n",
+ " l = line.decode()\n",
+ " if \"trycloudflare.com \" in l:\n",
+ " print(\"This is the URL to access ComfyUI:\", l[l.find(\"http\"):], end='')\n",
+ " #print(l, end='')\n",
+ "\n",
+ "threading.Thread(target=iframe_thread, daemon=True, args=(8188,)).start()\n",
+ "\n",
+ "!python main.py --dont-print-server"
+ ],
+ "metadata": {
+ "cellView": "form",
+ "id": "StSynv5tp2nL"
+ },
+ "execution_count": null,
+ "outputs": []
+ },
{
"cell_type": "code",
"execution_count": null,
@@ -237,7 +329,7 @@
},
"outputs": [],
"source": [
- "#@title Run ComfyUI\n",
+ "#@title ComfyUI Localtunnel\n",
"#@markdown Run this cell to start ComfyUI. You'll see a link similar to `your url is: https://slow-yaks-jog-34-72-173-3.loca.lt` (example)\n",
"#@markdown
*If you have trouble with the red screen of death \"reminder\" not letting you generate, use the iFrame version below.*\n",
"!npm install -g localtunnel\n",
@@ -246,6 +338,8 @@
"import threading\n",
"import time\n",
"import socket\n",
+ "import urllib.request\n",
+ "\n",
"def iframe_thread(port):\n",
" while True:\n",
" time.sleep(0.5)\n",
@@ -254,7 +348,9 @@
" if result == 0:\n",
" break\n",
" sock.close()\n",
- " print(\"\\nComfyUI finished loading, trying to launch localtunnel (if it gets stuck here localtunnel is having issues)\")\n",
+ " print(\"\\nComfyUI finished loading, trying to launch localtunnel (if it gets stuck here localtunnel is having issues)\\n\")\n",
+ "\n",
+ " print(\"The password/enpoint ip for localtunnel is:\", urllib.request.urlopen('https://ipv4.icanhazip.com').read().decode('utf8').strip(\"\\n\"))\n",
" p = subprocess.Popen([\"lt\", \"--port\", \"{}\".format(port)], stdout=subprocess.PIPE)\n",
" for line in p.stdout:\n",
" print(line.decode(), end='')\n",
@@ -271,7 +367,7 @@
"id": "gggggggggg"
},
"source": [
- "### Run ComfyUI with colab iframe ***(use only in case the previous way with localtunnel doesn't work)***\n",
+ "### Run ComfyUI with colab iframe ***(use only in case the previous ways don't work)***\n",
"\n",
"You should see the ui appear in an iframe. If you get a 403 error, it's your firefox settings or an extension that's messing things up.\n",
"\n",
diff --git a/README.md b/README.md
index ffb80c7..c011554 100644
--- a/README.md
+++ b/README.md
@@ -1,4 +1,4 @@
-# **WAS** Node Suite [](https://colab.research.google.com/github/WASasquatch/comfyui-colab-was-node-suite/blob/main/ComfyUI_%2B_WAS_Node_Suite.ipynb) [](https://hits.seeyoufarm.com) [](https://paypal.me/ThompsonJordan?country.x=US&locale.x=en_US)
+# **WAS** Node Suite [](https://colab.research.google.com/github/WASasquatch/was-node-suite-comfyui/blob/main/ComfyUI_%2B_WAS_Node_Suite_and_ComfyUI_Manager.ipynb) [](https://hits.seeyoufarm.com) [](https://paypal.me/ThompsonJordan?country.x=US&locale.x=en_US)
@@ -36,6 +36,7 @@
- Bounded Image Blend with Mask: Blend a bounds image by mask
- Bounded Image Crop: Crop a bounds image
- Bounded Image Crop with Mask: Crop a bounds image by mask
+ - Bus Node: condense the 5 common connectors into one, keep your workspace tidy (Model, Clip, VAE, Positive Conditioning, Negative Conditioning)
- Cache Node: Cache Latnet, Tensor Batches (Image), and Conditioning to disk to use later.
- CLIPTextEncode (NSP): Parse noodle soups from the NSP pantry, or parse wildcards from a directory containing A1111 style wildacrds.
- Wildcards are in the style of `__filename__`, which also includes subdirectories like `__appearance/haircolour__` (if you noodle_key is set to `__`)
diff --git a/WAS_Node_Suite.py b/WAS_Node_Suite.py
index 785b780..1723556 100644
--- a/WAS_Node_Suite.py
+++ b/WAS_Node_Suite.py
@@ -11904,6 +11904,60 @@ class WAS_Number_Multiple_Of:
#! MISC
+
+# Bus. Converts the 5 main connectors into one, and back again. You can provide a bus as input
+# or the 5 separate inputs, or a combination. If you provide a bus input and a separate
+# input (e.g. a model), the model will take precedence.
+#
+# The term 'bus' comes from computer hardware, see https://en.wikipedia.org/wiki/Bus_(computing)
+class WAS_Bus:
+ def __init__(self):
+ pass
+
+ @classmethod
+ def INPUT_TYPES(cls):
+ return {
+ "required":{},
+ "optional": {
+ "bus" : ("BUS",),
+ "model": ("MODEL",),
+ "clip": ("CLIP",),
+ "vae": ("VAE",),
+ "positive": ("CONDITIONING",),
+ "negative": ("CONDITIONING",),
+ }
+ }
+ RETURN_TYPES = ("BUS", "MODEL", "CLIP", "VAE", "CONDITIONING", "CONDITIONING",)
+ RETURN_NAMES = ("bus", "model", "clip", "vae", "positive", "negative")
+ FUNCTION = "bus_fn"
+ CATEGORY = "WAS Suite/Utilities"
+
+ def bus_fn(self, bus=(None,None,None,None,None), model=None, clip=None, vae=None, positive=None, negative=None):
+
+ # Unpack the 5 constituents of the bus from the bus tuple.
+ (bus_model, bus_clip, bus_vae, bus_positive, bus_negative) = bus
+
+ # If you pass in specific inputs, they override what comes from the bus.
+ out_model = model or bus_model
+ out_clip = clip or bus_clip
+ out_vae = vae or bus_vae
+ out_positive = positive or bus_positive
+ out_negative = negative or bus_negative
+
+ # Squash all 5 inputs into the output bus tuple.
+ out_bus = (out_model, out_clip, out_vae, out_positive, out_negative)
+
+ if not out_model:
+ raise ValueError('Either model or bus containing a model should be supplied')
+ if not out_clip:
+ raise ValueError('Either clip or bus containing a clip should be supplied')
+ if not out_vae:
+ raise ValueError('Either vae or bus containing a vae should be supplied')
+ # We don't insist that a bus contains conditioning.
+
+ return (out_bus, out_model, out_clip, out_vae, out_positive, out_negative)
+
+
# Image Width and Height to Number
class WAS_Image_Size_To_Number:
@@ -13098,6 +13152,7 @@ class WAS_Integer_Place_Counter:
NODE_CLASS_MAPPINGS = {
"BLIP Model Loader": WAS_BLIP_Model_Loader,
"Blend Latents": WAS_Blend_Latents,
+ "Bus Node": WAS_Bus,
"Cache Node": WAS_Cache,
"Checkpoint Loader": WAS_Checkpoint_Loader,
"Checkpoint Loader (Simple)": WAS_Checkpoint_Loader_Simple,