Disabled DeepLX nodes by default, run_deeplx equal false.

This commit is contained in:
AlekPet
2025-06-29 15:51:05 +03:00
parent 2c1f510df4
commit 8eb941e1b0
3 changed files with 23 additions and 10 deletions
+5 -2
View File
@@ -109,7 +109,10 @@ You can also call the automatic installer by running shell `run_install_deeplx_w
### Note
On first launch, a `config.json` file will be created where you can specify the initial values ​​from which language to translate and to which language. You can also disable DeepLXTranslate nodes using the 'run_deeplx' property.
On first launch, a `config.json` file will be created where you can specify the initial values ​​from which language to translate and to which language.
**Warning:** DeepLX nodes are disabled by default. **At the moment, the DeepLX module is not working and the executable file is being compiled. Use at your own risk.**
If you still want to use these nodes, change the `"run_deeplx"` parameter to `true` in `config.js`.
**Default config.json values:**
```json
@@ -118,7 +121,7 @@ On first launch, a `config.json` file will be created where you can specify the
"__commnet": "Please check the list of available languages ​​before specifying, especially target_lang! Property run_deeplx disable DeepLXTranslate nodes. See README file",
"source_lang": "Russian",
"target_lang": "English",
"run_deeplx": true
"run_deeplx": false
}
}
```
+4 -4
View File
@@ -109,10 +109,10 @@ if not os.path.exists(config_path):
with open(config_path, "w", encoding="utf-8") as f:
defaultJSON = {
"settings": {
"__commnet": "Please check the list of available languages ​​before specifying, especially target_lang! Property run_deeplx disable DeepLXTranslate nodes. See README file",
"__commnet": "Please check the list of available languages ​​before specifying, especially target_lang! Property run_deeplx enable or disable DeepLXTranslate nodes. See README file",
"source_lang": "Russian",
"target_lang": "English",
"run_deeplx": True
"run_deeplx": False
}
}
json.dump(defaultJSON, f, ensure_ascii=False, indent=4)
@@ -153,9 +153,9 @@ PATH_TO_DEEPLX_SERVER = os.path.join(NODE_DIR, "DeepLX")
PATH_TO_GO = os.path.join(NODE_DIR, "go", "bin")
# We check whether the user has disabled the launch of the DeepLX server.
if not SETTINGS.get("run_deeplx", True): # Setting whether to run DeepLX server
if not SETTINGS.get("run_deeplx", False): # Setting whether to run DeepLX server
DEEPLX_SERVER_RUNNING = False
raise Exception("User disabled DeepLX server startup in config.json (proprety: 'run_deeplx')")
raise Exception("DeepLX nodes are disabled by default, read README: https://github.com/AlekPet/ComfyUI_Custom_Nodes_AlekPet/tree/master/DeepLXTranslateNode#note", "warning")
### Automatical install Golang (Go) and DeepLX ###
+14 -4
View File
@@ -499,19 +499,29 @@ failed_nodes_text = ""
len_nodes = len(nodes_list_dict)
for key, node in enumerate(nodes_list_dict):
currentNode = nodes_list_dict[node]
if currentNode.get("error", None) is None:
currentNodeVals = currentNode.get("error")
if currentNodeVals is None:
status = "\033[92m[Loading]"
else:
status = "\033[1;31;40m[Failed]"
color_error = "\033[1;31;40m"
status = color_error + " [Failed]"
error_message = currentNode.get("error", "Error")
failed_nodes_text += f"\033[93m{node} -> \033[1;31;40m{error_message}\033[0m\n"
if(len(currentNodeVals.args) == 2 and currentNodeVals.args[1] == "warning"):
color_error = "\033[33m"
status = color_error + "[Warning]"
error_message = currentNodeVals.args[0]
failed_nodes_text += f"\033[93m{node} -> {color_error}{error_message}\033[0m\n"
message = currentNode.get("message", "No message available")
printColorInfo(f"{message}{status}\033[0m")
if key == len_nodes - 1 and failed_nodes_text:
printColorInfo(
f"\n\033[1;31;40m* Nodes have been temporarily disabled due to the error *\033[0m\n{failed_nodes_text}"
f"\n\033[1;31;40m* Nodes have been temporarily disabled due to the error or specially *\033[0m\n{failed_nodes_text}"
)
printColorInfo(f"### [END] ComfyUI AlekPet Nodes ###", "\033[1;35m")