Add Anima-2.9B/3.8B loraPatch custom nodes.
Browse files- comfy_integration/setup.py +30 -8
comfy_integration/setup.py
CHANGED
|
@@ -20,7 +20,7 @@ def initialize_comfyui():
|
|
| 20 |
|
| 21 |
print("--- Cloning ComfyUI Repository ---")
|
| 22 |
if not os.path.exists(COMFYUI_TEMP_DIR):
|
| 23 |
-
os.system(f"git clone https://github.com/comfy-Org/ComfyUI {COMFYUI_TEMP_DIR}")
|
| 24 |
print("β
ComfyUI repository cloned.")
|
| 25 |
else:
|
| 26 |
print("β
ComfyUI repository already exists.")
|
|
@@ -45,7 +45,7 @@ def initialize_comfyui():
|
|
| 45 |
# 1. ComfyUI_IPAdapter_plus
|
| 46 |
ipadapter_plus_path = os.path.join(APP_DIR, "custom_nodes", "ComfyUI_IPAdapter_plus")
|
| 47 |
if not os.path.exists(ipadapter_plus_path):
|
| 48 |
-
os.system(f"git clone https://github.com/cubiq/ComfyUI_IPAdapter_plus.git {ipadapter_plus_path}")
|
| 49 |
print("β
ComfyUI_IPAdapter_plus extension cloned.")
|
| 50 |
else:
|
| 51 |
print("β
ComfyUI_IPAdapter_plus extension already exists.")
|
|
@@ -53,7 +53,7 @@ def initialize_comfyui():
|
|
| 53 |
# 2. ComfyUI-InstantX-IPAdapter-SD3
|
| 54 |
ipadapter_plus_path = os.path.join(APP_DIR, "custom_nodes", "ComfyUI-InstantX-IPAdapter-SD3")
|
| 55 |
if not os.path.exists(ipadapter_plus_path):
|
| 56 |
-
os.system(f"git clone https://github.com/Slickytail/ComfyUI-InstantX-IPAdapter-SD3.git {ipadapter_plus_path}")
|
| 57 |
print("β
ComfyUI-InstantX-IPAdapter-SD3 extension cloned.")
|
| 58 |
else:
|
| 59 |
print("β
ComfyUI-InstantX-IPAdapter-SD3 extension already exists.")
|
|
@@ -61,13 +61,13 @@ def initialize_comfyui():
|
|
| 61 |
# 3. ComfyUI-IPAdapter-Flux
|
| 62 |
ipadapter_flux_path = os.path.join(APP_DIR, "custom_nodes", "ComfyUI-IPAdapter-Flux")
|
| 63 |
if not os.path.exists(ipadapter_flux_path):
|
| 64 |
-
os.system(f"git clone https://github.com/Shakker-Labs/ComfyUI-IPAdapter-Flux.git {ipadapter_flux_path}")
|
| 65 |
print("β
ComfyUI-IPAdapter-Flux extension cloned.")
|
| 66 |
else:
|
| 67 |
print("β
ComfyUI-IPAdapter-Flux extension already exists.")
|
| 68 |
try:
|
| 69 |
print("--- [Setup] Applying PR #108 compatibility patch for ComfyUI-IPAdapter-Flux ---")
|
| 70 |
-
os.system(f"git -C {ipadapter_flux_path} fetch origin pull/108/head && git -C {ipadapter_flux_path} checkout -f FETCH_HEAD")
|
| 71 |
print("β
Successfully applied PR #108 compatibility patch.")
|
| 72 |
except Exception as e:
|
| 73 |
print(f"β οΈ Warning: Could not apply PR #108 compatibility patch for ComfyUI-IPAdapter-Flux: {e}")
|
|
@@ -75,15 +75,21 @@ def initialize_comfyui():
|
|
| 75 |
# 4. comfyui-krea2-controlnet
|
| 76 |
krea2_controlnet_nodes_path = os.path.join(APP_DIR, "custom_nodes", "comfyui-krea2-controlnet")
|
| 77 |
if not os.path.exists(krea2_controlnet_nodes_path):
|
| 78 |
-
os.system(f"git clone https://github.com/facok/comfyui-krea2-controlnet.git {krea2_controlnet_nodes_path}")
|
| 79 |
print("β
comfyui-krea2-controlnet extension cloned.")
|
| 80 |
else:
|
| 81 |
print("β
comfyui-krea2-controlnet extension already exists.")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 82 |
|
| 83 |
# 5. comfyui-krea2edit
|
| 84 |
krea2edit_nodes_path = os.path.join(APP_DIR, "custom_nodes", "comfyui-krea2edit")
|
| 85 |
if not os.path.exists(krea2edit_nodes_path):
|
| 86 |
-
os.system(f"git clone https://github.com/lbouaraba/comfyui-krea2edit.git {krea2edit_nodes_path}")
|
| 87 |
print("β
comfyui-krea2edit extension cloned.")
|
| 88 |
else:
|
| 89 |
print("β
comfyui-krea2edit extension already exists.")
|
|
@@ -91,11 +97,27 @@ def initialize_comfyui():
|
|
| 91 |
# 6. comfyui-anima-3-8B
|
| 92 |
anima_38b_nodes_path = os.path.join(APP_DIR, "custom_nodes", "comfyui-anima-3-8B")
|
| 93 |
if not os.path.exists(anima_38b_nodes_path):
|
| 94 |
-
os.system(f"git clone https://github.com/GumGum10/comfyui-anima-3-8B.git {anima_38b_nodes_path}")
|
| 95 |
print("β
comfyui-anima-3-8B extension cloned.")
|
| 96 |
else:
|
| 97 |
print("β
comfyui-anima-3-8B extension already exists.")
|
| 98 |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 99 |
print(f"β
Current working directory is: {os.getcwd()}")
|
| 100 |
|
| 101 |
import comfy.model_management
|
|
|
|
| 20 |
|
| 21 |
print("--- Cloning ComfyUI Repository ---")
|
| 22 |
if not os.path.exists(COMFYUI_TEMP_DIR):
|
| 23 |
+
os.system(f"git clone --depth 1 https://github.com/comfy-Org/ComfyUI {COMFYUI_TEMP_DIR}")
|
| 24 |
print("β
ComfyUI repository cloned.")
|
| 25 |
else:
|
| 26 |
print("β
ComfyUI repository already exists.")
|
|
|
|
| 45 |
# 1. ComfyUI_IPAdapter_plus
|
| 46 |
ipadapter_plus_path = os.path.join(APP_DIR, "custom_nodes", "ComfyUI_IPAdapter_plus")
|
| 47 |
if not os.path.exists(ipadapter_plus_path):
|
| 48 |
+
os.system(f"git clone --depth 1 https://github.com/cubiq/ComfyUI_IPAdapter_plus.git {ipadapter_plus_path}")
|
| 49 |
print("β
ComfyUI_IPAdapter_plus extension cloned.")
|
| 50 |
else:
|
| 51 |
print("β
ComfyUI_IPAdapter_plus extension already exists.")
|
|
|
|
| 53 |
# 2. ComfyUI-InstantX-IPAdapter-SD3
|
| 54 |
ipadapter_plus_path = os.path.join(APP_DIR, "custom_nodes", "ComfyUI-InstantX-IPAdapter-SD3")
|
| 55 |
if not os.path.exists(ipadapter_plus_path):
|
| 56 |
+
os.system(f"git clone --depth 1 https://github.com/Slickytail/ComfyUI-InstantX-IPAdapter-SD3.git {ipadapter_plus_path}")
|
| 57 |
print("β
ComfyUI-InstantX-IPAdapter-SD3 extension cloned.")
|
| 58 |
else:
|
| 59 |
print("β
ComfyUI-InstantX-IPAdapter-SD3 extension already exists.")
|
|
|
|
| 61 |
# 3. ComfyUI-IPAdapter-Flux
|
| 62 |
ipadapter_flux_path = os.path.join(APP_DIR, "custom_nodes", "ComfyUI-IPAdapter-Flux")
|
| 63 |
if not os.path.exists(ipadapter_flux_path):
|
| 64 |
+
os.system(f"git clone --depth 1 https://github.com/Shakker-Labs/ComfyUI-IPAdapter-Flux.git {ipadapter_flux_path}")
|
| 65 |
print("β
ComfyUI-IPAdapter-Flux extension cloned.")
|
| 66 |
else:
|
| 67 |
print("β
ComfyUI-IPAdapter-Flux extension already exists.")
|
| 68 |
try:
|
| 69 |
print("--- [Setup] Applying PR #108 compatibility patch for ComfyUI-IPAdapter-Flux ---")
|
| 70 |
+
os.system(f"git -C {ipadapter_flux_path} fetch --depth 1 origin pull/108/head && git -C {ipadapter_flux_path} checkout -f FETCH_HEAD")
|
| 71 |
print("β
Successfully applied PR #108 compatibility patch.")
|
| 72 |
except Exception as e:
|
| 73 |
print(f"β οΈ Warning: Could not apply PR #108 compatibility patch for ComfyUI-IPAdapter-Flux: {e}")
|
|
|
|
| 75 |
# 4. comfyui-krea2-controlnet
|
| 76 |
krea2_controlnet_nodes_path = os.path.join(APP_DIR, "custom_nodes", "comfyui-krea2-controlnet")
|
| 77 |
if not os.path.exists(krea2_controlnet_nodes_path):
|
| 78 |
+
os.system(f"git clone --depth 1 https://github.com/facok/comfyui-krea2-controlnet.git {krea2_controlnet_nodes_path}")
|
| 79 |
print("β
comfyui-krea2-controlnet extension cloned.")
|
| 80 |
else:
|
| 81 |
print("β
comfyui-krea2-controlnet extension already exists.")
|
| 82 |
+
try:
|
| 83 |
+
print("--- [Setup] Applying PR #12 compatibility patch for comfyui-krea2-controlnet ---")
|
| 84 |
+
os.system(f"git -C {krea2_controlnet_nodes_path} fetch --depth 1 origin pull/12/head && git -C {krea2_controlnet_nodes_path} checkout -f FETCH_HEAD")
|
| 85 |
+
print("β
Successfully applied PR #12 compatibility patch.")
|
| 86 |
+
except Exception as e:
|
| 87 |
+
print(f"β οΈ Warning: Could not apply PR #12 compatibility patch for comfyui-krea2-controlnet: {e}")
|
| 88 |
|
| 89 |
# 5. comfyui-krea2edit
|
| 90 |
krea2edit_nodes_path = os.path.join(APP_DIR, "custom_nodes", "comfyui-krea2edit")
|
| 91 |
if not os.path.exists(krea2edit_nodes_path):
|
| 92 |
+
os.system(f"git clone --depth 1 https://github.com/lbouaraba/comfyui-krea2edit.git {krea2edit_nodes_path}")
|
| 93 |
print("β
comfyui-krea2edit extension cloned.")
|
| 94 |
else:
|
| 95 |
print("β
comfyui-krea2edit extension already exists.")
|
|
|
|
| 97 |
# 6. comfyui-anima-3-8B
|
| 98 |
anima_38b_nodes_path = os.path.join(APP_DIR, "custom_nodes", "comfyui-anima-3-8B")
|
| 99 |
if not os.path.exists(anima_38b_nodes_path):
|
| 100 |
+
os.system(f"git clone --depth 1 https://github.com/GumGum10/comfyui-anima-3-8B.git {anima_38b_nodes_path}")
|
| 101 |
print("β
comfyui-anima-3-8B extension cloned.")
|
| 102 |
else:
|
| 103 |
print("β
comfyui-anima-3-8B extension already exists.")
|
| 104 |
|
| 105 |
+
# 7. ComfyUI-Anima-2.9B-loraPatch
|
| 106 |
+
anima_29b_lora_path = os.path.join(APP_DIR, "custom_nodes", "ComfyUI-Anima-2.9B-loraPatch")
|
| 107 |
+
if not os.path.exists(anima_29b_lora_path):
|
| 108 |
+
os.system(f"git clone --depth 1 https://github.com/sparklingcoffee777/ComfyUI-Anima-2.9B-loraPatch.git {anima_29b_lora_path}")
|
| 109 |
+
print("β
ComfyUI-Anima-2.9B-loraPatch extension cloned.")
|
| 110 |
+
else:
|
| 111 |
+
print("β
ComfyUI-Anima-2.9B-loraPatch extension already exists.")
|
| 112 |
+
|
| 113 |
+
# 8. ComfyUI-Anima-3.8B-loraPatch
|
| 114 |
+
anima_38b_lora_path = os.path.join(APP_DIR, "custom_nodes", "ComfyUI-Anima-3.8B-loraPatch")
|
| 115 |
+
if not os.path.exists(anima_38b_lora_path):
|
| 116 |
+
os.system(f"git clone --depth 1 https://github.com/KitagawaCoding/ComfyUI-Anima-3.8B-loraPatch.git {anima_38b_lora_path}")
|
| 117 |
+
print("β
ComfyUI-Anima-3.8B-loraPatch extension cloned.")
|
| 118 |
+
else:
|
| 119 |
+
print("β
ComfyUI-Anima-3.8B-loraPatch extension already exists.")
|
| 120 |
+
|
| 121 |
print(f"β
Current working directory is: {os.getcwd()}")
|
| 122 |
|
| 123 |
import comfy.model_management
|