From 8433b3fd5d43240969830563ef1498a7fff2191e Mon Sep 17 00:00:00 2001 From: dseditor Date: Thu, 4 Dec 2025 15:44:32 +0800 Subject: [PATCH] TELLM Update --- nodes.py | 2 +- pyproject.toml | 4 ++-- qwen_inference.py | 22 ++++++++++++++++++---- 3 files changed, 21 insertions(+), 7 deletions(-) diff --git a/nodes.py b/nodes.py index b4dc346..04cd29f 100644 --- a/nodes.py +++ b/nodes.py @@ -949,6 +949,6 @@ NODE_DISPLAY_NAME_MAPPINGS = { "LoadVideoPath": "LoadVideoPath", "SaveVideoPath": "SaveVideoPath", "FrameMatch": "FrameMatch", - "QwenGPUInference": "Qwen GPU Inference", + "QwenGPUInference": "Qwen_TE_LLM", } diff --git a/pyproject.toml b/pyproject.toml index 3b65ee9..9b1f028 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,9 +1,9 @@ [project] name = "Listhelper" description = "The ListHelper collection is a comprehensive set of custom nodes for ComfyUI that provides powerful list manipulation capabilities. This collection includes audio processing, text splitting, and number generation tools for enhanced workflow automation.And OpenRouter API Function" -version = "1.0.8" +version = "1.0.9" license = {file = "LICENSE"} -dependencies = ["regex"] +dependencies = ["regex", "accelerate"] [project.urls] Repository = "https://github.com/dseditor/ComfyUI-ListHelper" diff --git a/qwen_inference.py b/qwen_inference.py index 3cc80c5..401b2bd 100644 --- a/qwen_inference.py +++ b/qwen_inference.py @@ -22,9 +22,10 @@ class QwenGPUInference: @classmethod def _get_safetensors_files(cls): - """Get all safetensors files from text_encoders folder""" + """Get all safetensors files from text_encoders and clip folders""" safetensors_files = [] + # Search in text_encoders folder try: text_encoder_paths = folder_paths.get_folder_paths("text_encoders") for path in text_encoder_paths: @@ -37,6 +38,19 @@ class QwenGPUInference: except: pass + # Search in clip folder + try: + clip_paths = folder_paths.get_folder_paths("clip") + for path in clip_paths: + if os.path.exists(path): + for file in os.listdir(path): + if file.lower().endswith('.safetensors'): + full_path = os.path.join(path, file) + if full_path not in safetensors_files: + safetensors_files.append(full_path) + except: + pass + if not safetensors_files: return ["No safetensors files found"] @@ -444,19 +458,19 @@ class QwenGPUInference: # Auto-find Qwen model model_path = self._find_qwen_model() if model_path is None: - error_msg = "Error: Qwen model file not found.\nPlease place the correct model file (e.g., qwen_3_4b.safetensors) in ComfyUI's models/text_encoders folder." + error_msg = "Error: Qwen model file not found.\nPlease place the correct model file (e.g., qwen_3_4b.safetensors) in ComfyUI's models/text_encoders or models/clip folder." print(error_msg) return (error_msg,) if not os.path.exists(model_path): - error_msg = f"Error: Model file does not exist: {model_path}\nPlease place the correct model file in the text_encoders folder." + error_msg = f"Error: Model file does not exist: {model_path}\nPlease place the correct model file in the text_encoders or clip folder." print(error_msg) return (error_msg,) # Use fixed repo_id repo_id = "Qwen/Qwen3-4B" if not self._load_model(model_path, repo_id): - error_msg = "Error: Model loading failed. Please check the model file and ensure it's properly placed in the text_encoders folder." + error_msg = "Error: Model loading failed. Please check the model file and ensure it's properly placed in the text_encoders or clip folder." print(error_msg) return (error_msg,)