iRedHat commited on
Commit
218340e
·
verified ·
1 Parent(s): 6e1d9ce

Delete all_nodes.py

Browse files
Files changed (1) hide show
  1. all_nodes.py +0 -176
all_nodes.py DELETED
@@ -1,176 +0,0 @@
1
- import os
2
- import subprocess
3
-
4
- def colored(text, color):
5
- """
6
- Функция для вывода цветного текста в консоль.
7
- """
8
- colors = {
9
- 'red': '\033[91m',
10
- 'green': '\033[92m',
11
- 'yellow': '\033[93m',
12
- 'blue': '\033[94m',
13
- 'magenta': '\033[95m',
14
- 'cyan': '\033[96m',
15
- 'white': '\033[97m',
16
- }
17
- return colors.get(color, '') + text + '\033[0m'
18
-
19
- # Путь к папке ComfyUI (относительный путь)
20
- comfyui_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "ComfyUI"))
21
-
22
- # Путь к папке python_embeded (относительный путь)
23
- python_embeded_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "python_embeded"))
24
-
25
- # Создание полного пути к папке Scripts
26
- python_scripts_path = os.path.join(python_embeded_path, "Scripts")
27
-
28
- # Путь к папке с git (относительный путь)
29
- git_path = os.path.abspath(os.path.join(os.path.dirname(__file__), "git"))
30
- git_bin_path = os.path.join(git_path, "bin")
31
- git_libexec_path = os.path.join(git_path, "libexec")
32
-
33
- # Обновление переменной PATH
34
- os.environ['PATH'] = f"{git_path};{git_bin_path};{git_libexec_path};{python_embeded_path};{python_scripts_path}"
35
- # os.environ['PATH'] = f"{git_path};{git_bin_path};{git_libexec_path};{os.environ['PATH']}"
36
-
37
- # Словарь с вариантами установки и их репозиториями
38
- install_options = {
39
- "Базовые узлы": [
40
- "https://github.com/ltdrdata/ComfyUI-Manager.git",
41
- "https://github.com/crystian/ComfyUI-Crystools.git",
42
- "https://github.com/hayden-fr/ComfyUI-Model-Manager.git"
43
- ],
44
- "Расширенные узлы": [
45
- "https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet.git",
46
- "https://github.com/cubiq/ComfyUI_InstantID.git",
47
- "https://github.com/cubiq/ComfyUI_IPAdapter_plus.git",
48
- "https://github.com/jags111/efficiency-nodes-comfyui.git",
49
- "https://github.com/rgthree/rgthree-comfy.git",
50
- "https://github.com/11cafe/comfyui-workspace-manager.git",
51
- "https://github.com/talesofai/comfyui-browser.git",
52
- "https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet.git",
53
- "https://github.com/Fannovel16/comfyui_controlnet_aux.git",
54
- "https://github.com/Extraltodeus/ComfyUI-AutomaticCFG.git",
55
- "https://github.com/yolain/ComfyUI-Easy-Use.git",
56
- "https://github.com/ltdrdata/ComfyUI-Impact-Pack.git",
57
- "https://github.com/ltdrdata/ComfyUI-Inspire-Pack.git",
58
- "https://github.com/pythongosssss/ComfyUI-Custom-Scripts",
59
- "https://github.com/ZHO-ZHO-ZHO/ComfyUI-InstantID.git",
60
- "https://github.com/nosiu/comfyui-instantId-faceswap.git",
61
- "https://github.com/WASasquatch/was-node-suite-comfyui.git",
62
- "https://github.com/MinusZoneAI/ComfyUI-Kolors-MZ.git",
63
- "https://github.com/kijai/ComfyUI-KwaiKolorsWrapper.git",
64
- "https://github.com/city96/ComfyUI_ExtraModels.git",
65
- "https://github.com/cubiq/ComfyUI_essentials.git",
66
- "https://github.com/giriss/comfy-image-saver.git",
67
- "https://github.com/Suzie1/ComfyUI_Comfyroll_CustomNodes.git",
68
- "https://github.com/ssitu/ComfyUI_UltimateSDUpscale.git",
69
- "https://github.com/pythongosssss/ComfyUI-WD14-Tagger.git",
70
- "https://github.com/shadowcz007/comfyui-mixlab-nodes.git",
71
- "https://github.com/sipherxyz/comfyui-art-venture.git",
72
- "https://github.com/SeargeDP/SeargeSDXL.git",
73
- "https://github.com/Acly/comfyui-inpaint-nodes.git",
74
- "https://github.com/chrisgoringe/cg-use-everywhere.git",
75
- "https://github.com/chflame163/ComfyUI_LayerStyle.git",
76
- "https://github.com/EllangoK/ComfyUI-post-processing-nodes.git",
77
- "https://github.com/Gourieff/comfyui-reactor-node.git",
78
- "https://github.com/GavChap/ComfyUI-SD3LatentSelectRes.git",
79
- "https://github.com/kijai/ComfyUI-SUPIR.git",
80
- "https://github.com/kadirnar/ComfyUI-YOLO.git",
81
- "https://github.com/cdb-boop/ComfyUI-Bringing-Old-Photos-Back-to-Life.git"
82
- ],
83
- "Все узлы": [
84
- "https://github.com/coolzilj/ComfyUI-Photopea.git",
85
- "https://github.com/twri/sdxl_prompt_styler.git",
86
- "https://github.com/ArtVentureX/comfyui-animatediff.git",
87
- "https://github.com/Kosinkadink/ComfyUI-AnimateDiff-Evolved.git",
88
- "https://github.com/lquesada/ComfyUI-Inpaint-CropAndStitch.git",
89
- "https://github.com/liusida/ComfyUI-AutoCropFaces.git",
90
- "https://github.com/shiimizu/ComfyUI-TiledDiffusion.git",
91
- "https://github.com/MaraScott/ComfyUI_MaraScott_Nodes.git",
92
- "https://github.com/kijai/ComfyUI-Marigold.git",
93
- "https://github.com/Kosinkadink/ComfyUI-VideoHelperSuite.git",
94
- "https://github.com/shiimizu/ComfyUI-PhotoMaker-Plus.git",
95
- "https://github.com/ZHO-ZHO-ZHO/ComfyUI-PhotoMaker-ZHO.git",
96
- "https://github.com/ZHO-ZHO-ZHO/comfyui-portrait-master-zh-cn.git",
97
- "https://github.com/florestefano1975/comfyui-portrait-master.git",
98
- "https://github.com/kijai/ComfyUI-LivePortraitKJ.git",
99
- "https://github.com/nullquant/ComfyUI-BrushNet.git",
100
- "https://github.com/lquesada/ComfyUI-Inpaint-CropAndStitch.git",
101
- "https://github.com/AIrjen/OneButtonPrompt.git",
102
- "https://github.com/banodoco/steerable-motion.git",
103
- "https://github.com/huchenlei/ComfyUI-layerdiffuse.git",
104
- "https://github.com/AIGODLIKE/AIGODLIKE-COMFYUI-TRANSLATION.git",
105
- "https://github.com/mcmonkeyprojects/sd-dynamic-thresholding.git",
106
- "https://github.com/ZHO-ZHO-ZHO/ComfyUI-PixArt-alpha-Diffusers.git",
107
- "https://github.com/cdb-boop/comfyui-image-round.git"
108
- ],
109
- }
110
- # Добавьте сюда ссылки на другие репозитории
111
-
112
- # Проверка наличия папки с custom_nodes
113
- custom_nodes_path = os.path.join(comfyui_path, "custom_nodes")
114
- if not os.path.exists(custom_nodes_path):
115
- os.makedirs(custom_nodes_path)
116
-
117
- # Меню выбора варианта установки
118
- while True:
119
- print("Выберите вариант установки:")
120
- for i, option in enumerate(install_options.keys()):
121
- print(f"{i+1}. {option}")
122
- choice = input("Введите номер варианта: ")
123
-
124
- # Проверка ввода
125
- try:
126
- choice = int(choice)
127
- if 1 <= choice <= len(install_options):
128
- break
129
- else:
130
- print("Неверный номер варианта. Пожалуйста, введите число от 1 до", len(install_options))
131
- except ValueError:
132
- print("Неверный ввод. Пожалуйста, введите число.")
133
-
134
- # Получение списка репозиториев для выбранного варианта
135
- selected_repos = []
136
- if choice == 2: # Выбран вариант 2
137
- selected_repos.extend(install_options["Базовые узлы"])
138
- selected_repos.extend(install_options["Расширенные узлы"])
139
- elif choice == 3: # Выбран вариант 3
140
- selected_repos.extend(install_options["Базовые узлы"])
141
- selected_repos.extend(install_options["Расширенные узлы"])
142
- selected_repos.extend(install_options["Все узлы"])
143
- else:
144
- selected_repos.extend(install_options[list(install_options.keys())[choice - 1]])
145
-
146
- # Скачивание custom_nodes
147
- for repo_url in selected_repos:
148
- repo_name = repo_url.split("/")[-1].split(".")[0]
149
- repo_path = os.path.join(custom_nodes_path, repo_name)
150
-
151
- # Проверка, была ли уже скачана репозитория
152
- if os.path.exists(repo_path):
153
- print(f"Репозитория {repo_name} уже скачана.")
154
- continue
155
-
156
- # Скачивание репозитории
157
- print(colored(f"Скачивание {repo_name}...", 'cyan'))
158
- # print(f"Скачивание {repo_name}...")
159
- try:
160
- subprocess.run([os.path.join(git_bin_path, "git"), "clone", repo_url, repo_path], check=True)
161
- except subprocess.CalledProcessError as e:
162
- print(f"Ошибка при скачивании {repo_name}: {e}")
163
- continue
164
-
165
- # Проверка наличия requirements.txt
166
- requirements_path = os.path.join(repo_path, "requirements.txt")
167
- if os.path.exists(requirements_path):
168
- print(colored(f"Установка зависимостей для {repo_name}...", 'blue'))
169
- # print(f"Установка зависимостей для {repo_name}...")
170
- try:
171
- subprocess.run([os.path.join(python_embeded_path, "python"), "-m", "pip", "install", "-r", requirements_path], check=True)
172
- except subprocess.CalledProcessError as e:
173
- print(f"Ошибка при установке зависимостей: {e}")
174
-
175
- print(colored("Скачивание custom_nodes завершено...", 'green'))
176
- # print("Скачивание custom_nodes завершено.")