diff --git a/nodes/text/text_utils_LP.py b/nodes/text/text_utils_LP.py index c7fabfa..a02750e 100644 --- a/nodes/text/text_utils_LP.py +++ b/nodes/text/text_utils_LP.py @@ -83,16 +83,16 @@ class TextTranslate: FUNCTION = "text_translate" CATEGORY = "LevelPixel/Text" - def text_translate(self, prompt): - if prompt.strip(): - detected_lang = detect(prompt) + def text_translate(self, text): + if text.strip(): + detected_lang = detect(text) if detected_lang != 'en': try: translator = GoogleTranslator(source='auto', target='en') - prompt = translator.translate(prompt) + text = translator.translate(text) except Exception as e: print(f"Translation error: {e}") - return (prompt,) + return (text,) NODE_CLASS_MAPPINGS = { "TextChoiceParser|LP": TextChoiceParser, diff --git a/pyproject.toml b/pyproject.toml index eceda66..1542947 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui_level_pixel" description = "Various nodes of the Level Pixel company. Includes convenient advanced nodes for working with images from folders; counting files in a folder; cleaning memory; tag filters. Model Unloader, LLM Unloader (GGUF unloaders), Free memory, Tag Filters, Tag Category Filters, Tag Choice Parser, File counter, Image Loader From Path (with counters), Image Remove Background based on RemBG, Autotagger." -version = "1.1.0" +version = "1.1.1" license = { file = "LICENSE" } dependencies = ["torch>=2.0.1", "torchvision>=0.15.2", "pillow>=9.4.0", "numpy", "matplotlib", "scikit-build-core>=0.10.7", "rembg>=2.0.59", "onnxruntime-gpu>=1.20.0", "onnxruntime>=1.20.0", "googletrans", "langdetect", "httpcore", "deep_translator"]