From 54afdd570235f79e18ffc78e91cfbb6b1e3f1cd9 Mon Sep 17 00:00:00 2001 From: LaVie024 <62406970+LaVie024@users.noreply.github.com> Date: Sun, 18 May 2025 19:25:37 +0000 Subject: [PATCH] Update nodes_types.py Removed StringToBool because it is just too similar to the already existing Compare node. --- comfy_extras/nodes_types.py | 21 --------------------- 1 file changed, 21 deletions(-) diff --git a/comfy_extras/nodes_types.py b/comfy_extras/nodes_types.py index 4c2100961..d68569f5d 100644 --- a/comfy_extras/nodes_types.py +++ b/comfy_extras/nodes_types.py @@ -104,26 +104,6 @@ class BoolToAll: def convert_type(self, value): return (int(value), float(value), str(value),) -class StringToBool: - @classmethod - def INPUT_TYPES(cls): - return {"required": { - "value": ("STRING", {"default": "False", "multiline": False}), - "true_text": ("STRING", {"default": "True", "multiline": False}), - "case_sensitive": ("BOOLEAN", {"default": True}) - }} - - RETURN_TYPES = ("BOOLEAN",) - FUNCTION = "convert_type" - CATEGORY = "utils/type_convert" - - def convert_type(self, value, true_text, case_sensitive) -> bool: - if case_sensitive: - match = (value == true_text) - else: - match = (value.casefold() == true_text.casefold()) - return (match,) - class StringToCombo: '''Converts a string into a combo input that may be used with any node with a list widget. @@ -146,7 +126,6 @@ NODE_CLASS_MAPPINGS = { "Boolean to All": BoolToAll, "Integer to All": IntToAll, "Float to All": FloatToAll, - "String to Boolean": StringToBool, "String to Number": StringToNum, "String to Combo": StringToCombo }