From da9ccc8597fc4d7c0c1a631c3b039cb97ec9f5dc Mon Sep 17 00:00:00 2001 From: Fictiverse <111762798+Fictiverse@users.noreply.github.com> Date: Tue, 13 Jan 2026 00:45:52 +0100 Subject: [PATCH] Add files via upload fix empty text error --- nodes.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/nodes.py b/nodes.py index ea02be5..e1a0dc1 100644 --- a/nodes.py +++ b/nodes.py @@ -25,6 +25,9 @@ class TranslateLocallyNode: return None def translate(self, text, model): + if not text or not text.strip(): + return ("",) + binary_path = self.find_binary() if not binary_path or not os.path.isfile(binary_path): return (f"ERROR: translateLocally.exe not found. Checked path: {binary_path}",) @@ -46,6 +49,7 @@ class TranslateLocallyNode: return (f"ERROR: Python exception: {e}",) + class SelectOrDownloadTranslateModelNode: # List of all official models MODELS = [