diff --git a/workflows/comfy/dependencies.json b/workflows/comfy/dependencies.json new file mode 100644 index 0000000..9a0ee7f --- /dev/null +++ b/workflows/comfy/dependencies.json @@ -0,0 +1,126 @@ +[ + { + "location": "ComfyUI/models/loras/v3_sd15_adapter.ckpt", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/v3_sd15_adapter.ckpt" + }, + { + "location": "ComfyUI/models/embeddings/badhandv4.pt", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/badhandv4.pt" + }, + { + "location": "ComfyUI/models/embeddings/easynegative.safetensors", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/easynegative.safetensors" + }, + { + "location": "ComfyUI/models/controlnet/v3_sd15_sparsectrl_scribble.ckpt", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/v3_sd15_sparsectrl_scribble.ckpt" + }, + { + "location": "ComfyUI/models/controlnet/control_v11f1e_sd15_tile.bin", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/control_v11f1e_sd15_tile.bin" + }, + { + "location": "ComfyUI/models/controlnet/control_v11p_sd15_softedge.safetensors", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/control_v11p_sd15_softedge.safetensors" + }, + { + "location": "ComfyUI/models/controlnet/control_v11p_sd15s2_lineart_anime.safetensors", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/control_v11p_sd15s2_lineart_anime.safetensors" + }, + { + "location": "ComfyUI/models/controlnet/control_v11p_sd15_lineart.safetensors", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/control_v11p_sd15_lineart.safetensors" + }, + { + "location": "ComfyUI/models/controlnet/control_v11f1p_sd15_depth.safetensors", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/control_v11f1p_sd15_depth.safetensors" + }, + { + "location": "ComfyUI/models/controlnet/control_v11p_sd15_openpose.safetensors", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/control_v11p_sd15_openpose.safetensors" + }, + { + "location": "ComfyUI/models/controlnet/animatediff_controlnet.ckpt", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/animatediff_controlnet.ckpt" + }, + { + "location": "ComfyUI/models/controlnet/control_v2p_sd15_mediapipe_face.safetensors", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/control_v2p_sd15_mediapipe_face.safetensors" + }, + { + "location": "ComfyUI/models/controlnet/ControlNetHED.pth", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/ControlNetHED.pth" + }, + { + "location": "ComfyUI/models/ipadapter/ip-adapter_sd15_light.safetensors", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/ip-adapter_sd15_light.safetensors" + }, + { + "location": "ComfyUI/models/clip_vision/CLIP-ViT-H-14-laion2B-s32B-b79K.safetensors", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/model.safetensors" + }, + { + "location": "ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved/models/v3_sd15_mm.ckpt", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/v3_sd15_mm.ckpt" + }, + { + "location": "ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/hr16/DWPose-TorchScript-BatchSize5/dw-ll_ucoco_384_bs5.torchscript.pt", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/dw-ll_ucoco_384_bs5.torchscript.pt" + }, + { + "location": "ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/yzd-v/DWPose/yolox_l.onnx", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/yolox_l.onnx" + }, + { + "location": "ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/LiheYoung/Depth-Anything/checkpoints/depth_anything_vitl14.pth", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/depth_anything_vitl14.pth" + }, + { + "location": "ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators/sk_model2.pth", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/sk_model2.pth" + }, + { + "location": "ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators/sk_model.pth", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/sk_model.pth" + }, + { + "location": "ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators/netG.pth", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/netG.pth" + }, + { + "location": "ComfyUI/custom_nodes/comfyui_controlnet_aux/ckpts/lllyasviel/Annotators/ControlNetHED.pth", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/ControlNetHED.pth" + }, + { + "location": "ComfyUI/custom_nodes/ComfyUI-Frame-Interpolation/ckpts/rife/rife47.pth", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/rife47.pth" + }, + { + "location": "ComfyUI/input/example.png", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/example.png" + }, + { + "location": "ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved/models/sd15_t2v_beta_motion.ckpt", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/sd15_t2v_beta_motion.ckpt" + }, + { + "location": "ComfyUI/models/loras/LCM_LoRA_Weights_SD15.safetensors", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/LCM_LoRA_Weights_SD15.safetensors" + }, + { + "location": "ComfyUI/models/controlnet/control_v11p_sd15_canny.safetensors", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/control_v11p_sd15_canny.safetensors" + }, + { + "location": "ComfyUI/models/grounding-dino/GroundingDINO_SwinT_OGC.cfg.py", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/GroundingDINO_SwinT_OGC.py" + }, + { + "location": "ComfyUI/models/grounding-dino/groundingdino_swint_ogc.pth", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/groundingdino_swint_ogc.pth" + }, + { + "location": "ComfyUI/models/vae/vae-ft-mse-840000-ema-pruned.ckpt", + "url": "https://storage.googleapis.com/vocodes-public/comfyui-deps/vae-ft-mse-840000-ema-pruned.ckpt" + } +] diff --git a/workflows/comfy/install.py b/workflows/comfy/install.py index 7d5374a..d83139f 100644 --- a/workflows/comfy/install.py +++ b/workflows/comfy/install.py @@ -1,6 +1,9 @@ + import subprocess import json import os +from pathlib import Path +import requests # set cwd to script location os.chdir(os.path.dirname(os.path.realpath(__file__))) @@ -51,6 +54,35 @@ def run_comfyui_setup(): run_command(f"{venv_python} initialize_comfy_extensions.py") +def install_dependencies(json_file_path='dependencies.json'): + # Load the dependency JSON + with open(json_file_path, 'r') as file: + dependencies = json.load(file) + + for dep in dependencies: + # Extract location and URL + location = dep['location'] + url = dep['url'] + + # Convert the location to a Path object and create parent directories if they don't exist + path = Path(location) + path.parent.mkdir(parents=True, exist_ok=True) + + if path.is_file(): + print(f"{path} is already installed") + continue + + # Download the file + response = requests.get(url) + if response.status_code == 200: + # Write the content to the file in the specified location + with open(path, 'wb') as file: + file.write(response.content) + print(f"Installed {path}") + else: + print(f"Failed to download {url}") + + def main(): with open(json_file_path, 'r') as file: repos = json.load(file) @@ -60,6 +92,7 @@ def main(): setup_repo(repo_info) setup_venv_and_install_requirements() + install_dependencies() run_comfyui_setup() diff --git a/workflows/comfy/repos.json b/workflows/comfy/repos.json index 00a1410..d8cf56b 100644 --- a/workflows/comfy/repos.json +++ b/workflows/comfy/repos.json @@ -1,22 +1,22 @@ [ { "url": "https://github.com/comfyanonymous/ComfyUI.git", - "commit": "00425563c07171f478e7809d3b89cc3df770ebbd", + "commit": "eda87043862f743b0a0467735f8531f7c4709b3a", "folder": "ComfyUI" }, { "url": "https://github.com/ltdrdata/ComfyUI-Manager.git", - "commit": "a31c528906759783ef2863c2e1590fd4d61cbbbf", + "commit": "6c553d1228978352767f4914c4dd7787b00f6769", "folder": "ComfyUI/custom_nodes/ComfyUI-Manager" }, { "url": "https://github.com/ltdrdata/ComfyUI-Impact-Pack.git", - "commit": "8b35530cfb3658aaa2715c8619379ca20a94c5a6", + "commit": "e374bd304a4a5b44d0deae2b2afaf4d5faad4810", "folder": "ComfyUI/custom_nodes/ComfyUI-Impact-Pack" }, { "url": "https://github.com/Fannovel16/comfyui_controlnet_aux.git", - "commit": "920a7ff9deac386ff3a3d17782fa876c51554cda", + "commit": "33d6e86b65c40e5f97052262c6900f413684ccde", "folder": "ComfyUI/custom_nodes/comfyui_controlnet_aux" }, { @@ -41,7 +41,7 @@ }, { "url": "https://github.com/melMass/comfy_mtb.git", - "commit": "b7c85824582d2eed994ec1ff451e33d75911595d", + "commit": "54ff6583ded0ed4054f8e5d7fadf0b2350259dce", "folder": "ComfyUI/custom_nodes/comfy_mtb" }, { @@ -51,12 +51,12 @@ }, { "url": "https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet.git", - "commit": "9c0fe542c62b55591253f4bcdd33c34a1b24331e", + "commit": "98768c7c3c45ac1e803071c5ad8e675e360e9e73", "folder": "ComfyUI/custom_nodes/ComfyUI-Advanced-ControlNet" }, { "url": "https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved.git", - "commit": "12c9879ebbbf2cc2a87dae8609ad365384313072", + "commit": "9ccea911a63e2119778fa91b2692a8470a48e9da", "folder": "ComfyUI/custom_nodes/ComfyUI-AnimateDiff-Evolved" }, { @@ -81,7 +81,7 @@ }, { "url": "https://github.com/kijai/ComfyUI-KJNodes.git", - "commit": "e9fcd376a6c06915bb596c189815edef380a98f5", + "commit": "df86fd77ac7f832b35ddaa748e4cf421ce9bf9e1", "folder": "ComfyUI/custom_nodes/ComfyUI-KJNodes" }, { @@ -96,7 +96,7 @@ }, { "url": "https://github.com/cubiq/ComfyUI_essentials.git", - "commit": "85a1937eea238c6e6e59991813656faa0da82fff", + "commit": "0283ce45272fc0737e3420c0aa2c5c30a74f7a36", "folder": "ComfyUI/custom_nodes/ComfyUI_essentials" }, { @@ -118,5 +118,10 @@ "url": "https://github.com/Fannovel16/ComfyUI-Video-Matting.git", "commit": "178bf956ddb817d065b1b073ec04582ad60335bb", "folder": "ComfyUI/custom_nodes/ComfyUI-Video-Matting" + }, + { + "url": "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git", + "commit": "d78b780ae43fcf8c6b7c6505e6ffb4584281ceca", + "folder": "ComfyUI/custom_nodes/ComfyUI_Comfyroll_CustomNodes" } ]