Merge branch 'ltdrdata:main' into dev

This commit is contained in:
John Qiao 2023-11-19 01:42:09 -07:00 committed by GitHub
commit 9c24979417
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
6 changed files with 202 additions and 46 deletions

View File

@ -14,7 +14,7 @@ import concurrent
import ssl import ssl
from urllib.parse import urlparse from urllib.parse import urlparse
version = "V1.0.1" version = "V1.1"
print(f"### Loading: ComfyUI-Manager ({version})") print(f"### Loading: ComfyUI-Manager ({version})")
@ -34,6 +34,10 @@ def handle_stream(stream, prefix):
def run_script(cmd, cwd='.'): def run_script(cmd, cwd='.'):
if len(cmd) > 0 and cmd[0].startswith("#"):
print(f"[ComfyUI-Manager] Unexpected behavior: `{cmd}`")
return 0
process = subprocess.Popen(cmd, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1) process = subprocess.Popen(cmd, cwd=cwd, stdout=subprocess.PIPE, stderr=subprocess.PIPE, text=True, bufsize=1)
stdout_thread = threading.Thread(target=handle_stream, args=(process.stdout, "")) stdout_thread = threading.Thread(target=handle_stream, args=(process.stdout, ""))
@ -236,6 +240,8 @@ def try_install_script(url, repo_path, install_cmd):
pass pass
if code != 0: if code != 0:
if url is None:
url = os.path.dirname(repo_path)
print(f"install script failed: {url}") print(f"install script failed: {url}")
return False return False
@ -328,7 +334,9 @@ def git_repo_has_updates(path, do_fetch=False, do_update=False):
raise ValueError('Not a git repository') raise ValueError('Not a git repository')
if platform.system() == "Windows": if platform.system() == "Windows":
return __win_check_git_update(path, do_fetch, do_update) res = __win_check_git_update(path, do_fetch, do_update)
execute_install_script(None, path, lazy_mode=True)
return res
else: else:
# Fetch the latest commits from the remote repository # Fetch the latest commits from the remote repository
repo = git.Repo(path) repo = git.Repo(path)
@ -352,6 +360,7 @@ def git_repo_has_updates(path, do_fetch=False, do_update=False):
new_commit_hash = repo.head.commit.hexsha new_commit_hash = repo.head.commit.hexsha
if commit_hash != new_commit_hash: if commit_hash != new_commit_hash:
execute_install_script(None, path)
print(f"\x1b[2K\rUpdated: {path}") print(f"\x1b[2K\rUpdated: {path}")
return True return True
else: else:
@ -961,10 +970,14 @@ def copy_set_active(files, is_disable, js_path_name='.'):
return True return True
def execute_install_script(url, repo_path): def execute_install_script(url, repo_path, lazy_mode=False):
install_script_path = os.path.join(repo_path, "install.py") install_script_path = os.path.join(repo_path, "install.py")
requirements_path = os.path.join(repo_path, "requirements.txt") requirements_path = os.path.join(repo_path, "requirements.txt")
if lazy_mode:
install_cmd = ["#LAZY-INSTALL-SCRIPT", sys.executable]
try_install_script(url, repo_path, install_cmd)
else:
if os.path.exists(requirements_path): if os.path.exists(requirements_path):
print("Install: pip packages") print("Install: pip packages")
with open(requirements_path, "r") as requirements_file: with open(requirements_path, "r") as requirements_file:
@ -1166,7 +1179,7 @@ def gitclone_update(files):
repo_path = os.path.join(custom_nodes_path, repo_name) repo_path = os.path.join(custom_nodes_path, repo_name)
git_pull(repo_path) git_pull(repo_path)
if not execute_install_script(url, repo_path): if not execute_install_script(url, repo_path, lazy_mode=True):
return False return False
except Exception as e: except Exception as e:

View File

@ -17,6 +17,7 @@
"files": [ "files": [
"https://github.com/ltdrdata/ComfyUI-Impact-Pack" "https://github.com/ltdrdata/ComfyUI-Impact-Pack"
], ],
"pip": ["ultralytics"],
"install_type": "git-clone", "install_type": "git-clone",
"description": "This extension offers various detector nodes and detailer nodes that allow you to configure a workflow that automatically enhances facial details. And provide iterative upscaler.<BR><p style='background-color: black; color: red;'>NOTE:MMDetDetectorProvider and other legacy nodes are disabled by default. If you want to activate these nodes and use them, please edit the impact-pack.ini file in the ComfyUI-Impact-Pack directory and change 'mmdet_skip = True' to 'mmdet_skip = False.' </p>" "description": "This extension offers various detector nodes and detailer nodes that allow you to configure a workflow that automatically enhances facial details. And provide iterative upscaler.<BR><p style='background-color: black; color: red;'>NOTE:MMDetDetectorProvider and other legacy nodes are disabled by default. If you want to activate these nodes and use them, please edit the impact-pack.ini file in the ComfyUI-Impact-Pack directory and change 'mmdet_skip = True' to 'mmdet_skip = False.' </p>"
}, },
@ -2646,6 +2647,36 @@
"install_type": "git-clone", "install_type": "git-clone",
"description": "Composition nodes like Substance Designer heavily inspired by WAS and MTB Node Suites" "description": "Composition nodes like Substance Designer heavily inspired by WAS and MTB Node Suites"
}, },
{
"author": "Umikaze-job",
"title": "select_folder_path_easy",
"reference": "https://github.com/Umikaze-job/select_folder_path_easy",
"files": [
"https://github.com/Umikaze-job/select_folder_path_easy"
],
"install_type": "git-clone",
"description": "This extension simply connects the nodes and specifies the output path of the generated images to a manageable path."
},
{
"author": "Niutonian",
"title": "ComfyUi-NoodleWebcam",
"reference": "https://github.com/Niutonian/ComfyUi-NoodleWebcam",
"files": [
"https://github.com/Niutonian/ComfyUi-NoodleWebcam"
],
"install_type": "git-clone",
"description": "Nodes:Noodle webcam is a node that records frames and send them to your favourite node."
},
{
"author": "kinfolk0117",
"title": "ComfyUI_GradientDeepShrink",
"reference": "https://github.com/kinfolk0117/ComfyUI_GradientDeepShrink",
"files": [
"https://github.com/kinfolk0117/ComfyUI_GradientDeepShrink"
],
"install_type": "git-clone",
"description": "Nodes:GradientPatchModelAddDownscale (Kohya Deep Shrink)."
},
{ {
"author": "Off-Live", "author": "Off-Live",
"title": "ComfyUI-off-suite", "title": "ComfyUI-off-suite",

View File

@ -58,23 +58,22 @@
], ],
"https://github.com/Amorano/Jovimetrix": [ "https://github.com/Amorano/Jovimetrix": [
[ [
"\u2697\ufe0f Blend Images (jov)", "\u2697\ufe0f Blend (jov)",
"\u2728 Shape Generator (jov)", "\u2728 Shape Generator (jov)",
"\ud83c\udf08 HSV Image (jov)", "\ud83c\udf08 HSV (jov)",
"\ud83c\udf31 Transform Image (jov)", "\ud83c\udf31 Transform (jov)",
"\ud83c\udfad Invert Image (jov)", "\ud83c\udf87 Expand (jov)",
"\ud83d\udd06 Pixel Shader (jov)",
"\ud83d\udd06 Pixel Shader Image (jov)", "\ud83d\udd06 Pixel Shader Image (jov)",
"\ud83d\udd27 Adjust Image (jov)", "\ud83d\udd30 Mirror (jov)",
"\ud83d\udd30 Mirror Image (jov)", "\ud83d\udd33 Tile (jov)",
"\ud83d\udd33 Tile Image (jov)", "\ud83d\udd78\ufe0f Adjust (jov)",
"\ud83d\udd78\ufe0f Filter Image (jov)", "\ud83d\uddfa\ufe0f Projection (jov)",
"\ud83d\uddfa\ufe0f Remap Image (jov)", "\ud83d\udfea Constant (jov)"
"\ud83d\udfea Constant Image (jov)",
"\ud83e\udd7b Gradient (jov)"
], ],
{ {
"author": "amorano", "author": "amorano",
"description": "Shapes and Shaders.", "description": "",
"nickname": "Jovimetrix", "nickname": "Jovimetrix",
"title": "Jovimetrix Composition Pack", "title": "Jovimetrix Composition Pack",
"title_aux": "Jovimetrix Composition Nodes" "title_aux": "Jovimetrix Composition Nodes"
@ -521,7 +520,8 @@
"BatchStringSchedule", "BatchStringSchedule",
"BatchValueSchedule", "BatchValueSchedule",
"BatchValueScheduleLatentInput", "BatchValueScheduleLatentInput",
"CalculateLatentInterpFrameNumber", "CalculateFrameOffset",
"ConcatStringSingle",
"CosWave", "CosWave",
"FizzFrame", "FizzFrame",
"FizzFrameConcatenate", "FizzFrameConcatenate",
@ -539,7 +539,8 @@
"StringConcatenate", "StringConcatenate",
"StringSchedule", "StringSchedule",
"TriangleWave", "TriangleWave",
"ValueSchedule" "ValueSchedule",
"convertKeyframeKeysToBatchKeys"
], ],
{ {
"title_aux": "FizzNodes" "title_aux": "FizzNodes"
@ -873,6 +874,14 @@
"title_aux": "ComfyUI_TravelSuite" "title_aux": "ComfyUI_TravelSuite"
} }
], ],
"https://github.com/Niutonian/ComfyUi-NoodleWebcam": [
[
"WebcamNode"
],
{
"title_aux": "ComfyUi-NoodleWebcam"
}
],
"https://github.com/Nourepide/ComfyUI-Allor": [ "https://github.com/Nourepide/ComfyUI-Allor": [
[ [
"AlphaChanelAdd", "AlphaChanelAdd",
@ -1544,6 +1553,14 @@
"title_aux": "ComfyUI Neural network latent upscale custom node" "title_aux": "ComfyUI Neural network latent upscale custom node"
} }
], ],
"https://github.com/Umikaze-job/select_folder_path_easy": [
[
"SelectFolderPathEasy"
],
{
"title_aux": "select_folder_path_easy"
}
],
"https://github.com/WASasquatch/ASTERR": [ "https://github.com/WASasquatch/ASTERR": [
[ [
"ASTERR", "ASTERR",
@ -2987,6 +3004,7 @@
"CreateGradientMask", "CreateGradientMask",
"CreateShapeMask", "CreateShapeMask",
"CreateTextMask", "CreateTextMask",
"CreateVoronoiMask",
"CrossFadeImages", "CrossFadeImages",
"EmptyLatentImagePresets", "EmptyLatentImagePresets",
"FloatConstant", "FloatConstant",
@ -3011,6 +3029,14 @@
"title_aux": "KJNodes for ComfyUI" "title_aux": "KJNodes for ComfyUI"
} }
], ],
"https://github.com/kinfolk0117/ComfyUI_GradientDeepShrink": [
[
"GradientPatchModelAddDownscale"
],
{
"title_aux": "ComfyUI_GradientDeepShrink"
}
],
"https://github.com/kinfolk0117/ComfyUI_SimpleTiles": [ "https://github.com/kinfolk0117/ComfyUI_SimpleTiles": [
[ [
"TileCalc", "TileCalc",
@ -3277,6 +3303,7 @@
"https://github.com/ltdrdata/ComfyUI-Inspire-Pack": [ "https://github.com/ltdrdata/ComfyUI-Inspire-Pack": [
[ [
"AnimeLineArt_Preprocessor_Provider_for_SEGS //Inspire", "AnimeLineArt_Preprocessor_Provider_for_SEGS //Inspire",
"ApplyRegionalIPAdapters //Inspire",
"BindImageListPromptList //Inspire", "BindImageListPromptList //Inspire",
"CacheBackendData //Inspire", "CacheBackendData //Inspire",
"CacheBackendDataList //Inspire", "CacheBackendDataList //Inspire",

View File

@ -1,5 +1,35 @@
{ {
"custom_nodes": [ "custom_nodes": [
{
"author": "kinfolk0117",
"title": "ComfyUI_GradientDeepShrink",
"reference": "https://github.com/kinfolk0117/ComfyUI_GradientDeepShrink",
"files": [
"https://github.com/kinfolk0117/ComfyUI_GradientDeepShrink"
],
"install_type": "git-clone",
"description": "Nodes:GradientPatchModelAddDownscale (Kohya Deep Shrink)."
},
{
"author": "Niutonian",
"title": "ComfyUi-NoodleWebcam",
"reference": "https://github.com/Niutonian/ComfyUi-NoodleWebcam",
"files": [
"https://github.com/Niutonian/ComfyUi-NoodleWebcam"
],
"install_type": "git-clone",
"description": "Nodes:Noodle webcam is a node that records frames and send them to your favourite node."
},
{
"author": "Umikaze-job",
"title": "select_folder_path_easy",
"reference": "https://github.com/Umikaze-job/select_folder_path_easy",
"files": [
"https://github.com/Umikaze-job/select_folder_path_easy"
],
"install_type": "git-clone",
"description": "This extension simply connects the nodes and specifies the output path of the generated images to a manageable path."
},
{ {
"author": "amorano", "author": "amorano",
"title": "Jovimetrix Composition Nodes", "title": "Jovimetrix Composition Nodes",

View File

@ -58,23 +58,22 @@
], ],
"https://github.com/Amorano/Jovimetrix": [ "https://github.com/Amorano/Jovimetrix": [
[ [
"\u2697\ufe0f Blend Images (jov)", "\u2697\ufe0f Blend (jov)",
"\u2728 Shape Generator (jov)", "\u2728 Shape Generator (jov)",
"\ud83c\udf08 HSV Image (jov)", "\ud83c\udf08 HSV (jov)",
"\ud83c\udf31 Transform Image (jov)", "\ud83c\udf31 Transform (jov)",
"\ud83c\udfad Invert Image (jov)", "\ud83c\udf87 Expand (jov)",
"\ud83d\udd06 Pixel Shader (jov)",
"\ud83d\udd06 Pixel Shader Image (jov)", "\ud83d\udd06 Pixel Shader Image (jov)",
"\ud83d\udd27 Adjust Image (jov)", "\ud83d\udd30 Mirror (jov)",
"\ud83d\udd30 Mirror Image (jov)", "\ud83d\udd33 Tile (jov)",
"\ud83d\udd33 Tile Image (jov)", "\ud83d\udd78\ufe0f Adjust (jov)",
"\ud83d\udd78\ufe0f Filter Image (jov)", "\ud83d\uddfa\ufe0f Projection (jov)",
"\ud83d\uddfa\ufe0f Remap Image (jov)", "\ud83d\udfea Constant (jov)"
"\ud83d\udfea Constant Image (jov)",
"\ud83e\udd7b Gradient (jov)"
], ],
{ {
"author": "amorano", "author": "amorano",
"description": "Shapes and Shaders.", "description": "",
"nickname": "Jovimetrix", "nickname": "Jovimetrix",
"title": "Jovimetrix Composition Pack", "title": "Jovimetrix Composition Pack",
"title_aux": "Jovimetrix Composition Nodes" "title_aux": "Jovimetrix Composition Nodes"
@ -521,7 +520,8 @@
"BatchStringSchedule", "BatchStringSchedule",
"BatchValueSchedule", "BatchValueSchedule",
"BatchValueScheduleLatentInput", "BatchValueScheduleLatentInput",
"CalculateLatentInterpFrameNumber", "CalculateFrameOffset",
"ConcatStringSingle",
"CosWave", "CosWave",
"FizzFrame", "FizzFrame",
"FizzFrameConcatenate", "FizzFrameConcatenate",
@ -539,7 +539,8 @@
"StringConcatenate", "StringConcatenate",
"StringSchedule", "StringSchedule",
"TriangleWave", "TriangleWave",
"ValueSchedule" "ValueSchedule",
"convertKeyframeKeysToBatchKeys"
], ],
{ {
"title_aux": "FizzNodes" "title_aux": "FizzNodes"
@ -873,6 +874,14 @@
"title_aux": "ComfyUI_TravelSuite" "title_aux": "ComfyUI_TravelSuite"
} }
], ],
"https://github.com/Niutonian/ComfyUi-NoodleWebcam": [
[
"WebcamNode"
],
{
"title_aux": "ComfyUi-NoodleWebcam"
}
],
"https://github.com/Nourepide/ComfyUI-Allor": [ "https://github.com/Nourepide/ComfyUI-Allor": [
[ [
"AlphaChanelAdd", "AlphaChanelAdd",
@ -1544,6 +1553,14 @@
"title_aux": "ComfyUI Neural network latent upscale custom node" "title_aux": "ComfyUI Neural network latent upscale custom node"
} }
], ],
"https://github.com/Umikaze-job/select_folder_path_easy": [
[
"SelectFolderPathEasy"
],
{
"title_aux": "select_folder_path_easy"
}
],
"https://github.com/WASasquatch/ASTERR": [ "https://github.com/WASasquatch/ASTERR": [
[ [
"ASTERR", "ASTERR",
@ -2987,6 +3004,7 @@
"CreateGradientMask", "CreateGradientMask",
"CreateShapeMask", "CreateShapeMask",
"CreateTextMask", "CreateTextMask",
"CreateVoronoiMask",
"CrossFadeImages", "CrossFadeImages",
"EmptyLatentImagePresets", "EmptyLatentImagePresets",
"FloatConstant", "FloatConstant",
@ -3011,6 +3029,14 @@
"title_aux": "KJNodes for ComfyUI" "title_aux": "KJNodes for ComfyUI"
} }
], ],
"https://github.com/kinfolk0117/ComfyUI_GradientDeepShrink": [
[
"GradientPatchModelAddDownscale"
],
{
"title_aux": "ComfyUI_GradientDeepShrink"
}
],
"https://github.com/kinfolk0117/ComfyUI_SimpleTiles": [ "https://github.com/kinfolk0117/ComfyUI_SimpleTiles": [
[ [
"TileCalc", "TileCalc",
@ -3277,6 +3303,7 @@
"https://github.com/ltdrdata/ComfyUI-Inspire-Pack": [ "https://github.com/ltdrdata/ComfyUI-Inspire-Pack": [
[ [
"AnimeLineArt_Preprocessor_Provider_for_SEGS //Inspire", "AnimeLineArt_Preprocessor_Provider_for_SEGS //Inspire",
"ApplyRegionalIPAdapters //Inspire",
"BindImageListPromptList //Inspire", "BindImageListPromptList //Inspire",
"CacheBackendData //Inspire", "CacheBackendData //Inspire",
"CacheBackendDataList //Inspire", "CacheBackendDataList //Inspire",

View File

@ -135,6 +135,9 @@ try:
else: else:
original_stderr.flush() original_stderr.flush()
def reconfigure(self, *args, **kwargs):
pass
def close_log(): def close_log():
log_file.close() log_file.close()
@ -249,6 +252,26 @@ if os.path.exists(restore_snapshot_path):
# Perform install # Perform install
script_list_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "startup-scripts", "install-scripts.txt") script_list_path = os.path.join(os.path.dirname(os.path.realpath(__file__)), "startup-scripts", "install-scripts.txt")
def execute_lazy_install_script(repo_path, executable):
install_script_path = os.path.join(repo_path, "install.py")
requirements_path = os.path.join(repo_path, "requirements.txt")
if os.path.exists(requirements_path):
print("Install: pip packages")
with open(requirements_path, "r") as requirements_file:
for line in requirements_file:
package_name = line.strip()
if package_name:
install_cmd = [sys.executable, "-m", "pip", "install", package_name]
process_wrap(install_cmd, repo_path)
if os.path.exists(install_script_path):
print(f"Install: install script")
install_cmd = [sys.executable, "install.py"]
process_wrap(install_cmd, repo_path)
# Check if script_list_path exists # Check if script_list_path exists
if os.path.exists(script_list_path): if os.path.exists(script_list_path):
print("\n#######################################################################") print("\n#######################################################################")
@ -265,7 +288,12 @@ if os.path.exists(script_list_path):
try: try:
script = eval(line) script = eval(line)
if os.path.exists(script[0]):
if script[1].startswith('#'):
if script[1] == "#LAZY-INSTALL-SCRIPT":
execute_lazy_install_script(script[0], script[2])
elif os.path.exists(script[0]):
print(f"\n## ComfyUI-Manager: EXECUTE => {script[1:]}") print(f"\n## ComfyUI-Manager: EXECUTE => {script[1:]}")
print(f"\n## Execute install/(de)activation script for '{script[0]}'") print(f"\n## Execute install/(de)activation script for '{script[0]}'")