fix __init__.py for argostranslate

+ Add hack checking install argostranslate module (name module
  argostranslate not equal git+https link)
This commit is contained in:
AlekPet
2025-09-21 12:34:00 +03:00
parent bb9085b2b4
commit f75fa7d544
2 changed files with 9 additions and 2 deletions
+8 -1
View File
@@ -178,10 +178,17 @@ def checkModules(nodeElement):
if os.path.exists(file_requir):
log(" -> File 'requirements.txt' found!")
with open(file_requir) as f:
lines = f.readlines()
required_modules = {
module_name_cut_version.split(line.strip())[0] for line in f if not line.startswith("#")
module_name_cut_version.split(line.strip())[0] for line in lines if not line.startswith("#")
}
# [Hack] argostranslate module checking install
if nodeElement == "ArgosTranslateNode" and "argostranslate" in installed_modules and len(lines):
if DEBUG:
printColorInfo("* Argostranslate installed removed from required modules!")
required_modules.remove(lines[0])
modules_to_install = required_modules - installed_modules
if modules_to_install:
+1 -1
View File
@@ -1,7 +1,7 @@
[project]
name = "comfyui_custom_nodes_alekpet"
description = "Nodes: PoseNode, PainterNode, TranslateTextNode, TranslateCLIPTextEncodeNode, DeepTranslatorTextNode, DeepTranslatorCLIPTextEncodeNode, ArgosTranslateTextNode, ArgosTranslateCLIPTextEncodeNode, ChatGLM4TranslateCLIPTextEncodeNode, ChatGLM4TranslateTextNode, ChatGLM4InstructNode, ChatGLM4InstructMediaNode, PreviewTextNode, HexToHueNode, ColorsCorrectNode, IDENode."
version = "1.0.87"
version = "1.0.88"
license = { file = "LICENSE" }
[project.urls]