From 568ce3a883cc065c683c2168915d1c41350e47fd Mon Sep 17 00:00:00 2001 From: billwuhao Date: Mon, 7 Jul 2025 16:48:26 +0800 Subject: [PATCH] string split from right --- OneButtonPrompt.py | 12 +++++++++--- pyproject.toml | 2 +- 2 files changed, 10 insertions(+), 4 deletions(-) diff --git a/OneButtonPrompt.py b/OneButtonPrompt.py index b7d7b4f..78dab65 100644 --- a/OneButtonPrompt.py +++ b/OneButtonPrompt.py @@ -384,7 +384,7 @@ class StringEditNodeOBP: RETURN_TYPES = ("STRING", "STRING", "STRING", "STRING", "STRING") RETURN_NAMES = ("text", "split_1", "split_2", "edited_text", "merged_text") FUNCTION = "edit_text" - CATEGORY = "🎤MW/MW-Audio-Tools" + CATEGORY = "🎤MW/MW-OneButtonPrompt" OUTPUT_NODE = False def edit_text(self, text, split_tag="", paste_edit_text="", form_right=False): @@ -399,8 +399,14 @@ class StringEditNodeOBP: parts = text.split(split_tag, 1) str_2, str_3 = parts[0].strip(), parts[1].strip() - return (str_1, str_2, str_3, str_4, str_5) - + return (str_1, str_2, str_3, str_4, str_5) + + @classmethod + def IS_CHANGED(cls, text, **kwargs): + import hashlib + m = hashlib.sha256() + m.update(text.encode('utf-8')) + return m.digest().hex() NODE_CLASS_MAPPINGS = { "LoadPrompt": LoadPrompt, diff --git a/pyproject.toml b/pyproject.toml index 44f1584..08553ce 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "onebuttonprompt-mw" description = "A node that assists in one click generation of prompts (for image and video generation, etc.) in Comfyui." -version = "1.0.2" +version = "1.0.3" license = {file = "LICENSE"} [project.urls]