From 2fa5068047d14e6a11e550ee46ed0b590f3ca91d Mon Sep 17 00:00:00 2001 From: Saifeddine ALOUI Date: Fri, 22 Mar 2024 00:28:16 +0100 Subject: [PATCH] enhanced comfyui --- lollms/services/comfyui/lollms_comfyui.py | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/lollms/services/comfyui/lollms_comfyui.py b/lollms/services/comfyui/lollms_comfyui.py index d0932bc..54e846d 100644 --- a/lollms/services/comfyui/lollms_comfyui.py +++ b/lollms/services/comfyui/lollms_comfyui.py @@ -75,13 +75,30 @@ def install_comfyui(lollms_app:LollmsApplication): subprocess.run(["git", "clone", "https://github.com/ParisNeo/ComfyUI.git", str(comfyui_folder)]) subprocess.run(["git", "clone", "https://github.com/ParisNeo/ComfyUI-Manager.git", str(comfyui_folder/"custom_nodes/ComfyUI-Manager")]) subprocess.run(["git", "clone", "https://github.com/jags111/efficiency-nodes-comfyui.git", str(comfyui_folder/"custom_nodes/efficiency-nodes-comfyui")]) + subprocess.run(["git", "clone", "https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet.git", str(comfyui_folder/"custom_nodes/ComfyUI-Advanced-ControlNet")]) + subprocess.run(["git", "clone", "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git", str(comfyui_folder/"custom_nodes/ComfyUI-VideoHelperSuite")]) + subprocess.run(["git", "clone", "https://github.com/LykosAI/ComfyUI-Inference-Core-Nodes.git", str(comfyui_folder/"custom_nodes/ComfyUI-Inference-Core-Nodes")]) + subprocess.run(["git", "clone", "https://github.com/Fannovel16/comfyui_controlnet_aux.git", str(comfyui_folder/"custom_nodes/comfyui_controlnet_aux")]) + subprocess.run(["git", "clone", "https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved.git", str(comfyui_folder/"custom_nodes/ComfyUI-AnimateDiff-Evolved")]) - if show_yes_no_dialog("warning!","Do you want to install an image model from civitai?\nIsuggest Juggernaut XL."): + if show_yes_no_dialog("warning!","You will need to install an image generation model.\nDo you want to install an image model from civitai?\nI suggest Juggernaut XL.\nIt is a very good model.\nyou can always install more models afterwards in your comfyui folder/models.checkpoints"): download_file("https://civitai.com/api/download/models/357609", comfyui_folder/"models/checkpoints","Juggernaut_XL.safetensors") if show_yes_no_dialog("warning!","Do you want to install a video model from hugging face?\nIsuggest SVD XL."): download_file("https://huggingface.co/stabilityai/stable-video-diffusion-img2vid-xt/blob/main/svd_xt.safetensors", comfyui_folder/"models/checkpoints","svd_xt.safetensors") + + if show_yes_no_dialog("warning!","Do you want to install all control net models?"): + (comfyui_folder/"models/controlnet").mkdir(parents=True, exist_ok=True) + download_file("https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/kohya_controllllite_xl_openpose_anime.safetensors", comfyui_folder/"models/controlnet","kohya_controllllite_xl_openpose_anime.safetensors") + download_file("https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/kohya_controllllite_xl_canny.safetensors", comfyui_folder/"models/controlnet","kohya_controllllite_xl_canny.safetensors") + download_file("https://huggingface.co/lllyasviel/sd_control_collection/resolve/main/kohya_controllllite_xl_depth.safetensors", comfyui_folder/"models/controlnet","kohya_controllllite_xl_depth.safetensors") + + + if show_yes_no_dialog("warning!","Do you want to install all animation models?"): + (comfyui_folder/"models/animatediff_models").mkdir(parents=True, exist_ok=True) + download_file("https://huggingface.co/guoyww/animatediff/resolve/cd71ae134a27ec6008b968d6419952b0c0494cf2/mm_sdxl_v10_beta.ckpt", comfyui_folder/"models/animatediff_models","mm_sdxl_v10_beta.ckpt") + create_conda_env("comfyui","3.10") if lollms_app.config.hardware_mode in ["nvidia", "nvidia-tensorcores"]: run_python_script_in_env("comfyui", "-m pip install --pre torch torchvision torchaudio --index-url https://download.pytorch.org/whl/nightly/cu121")