From 918d803de4cd3c9ef6aec99fe38c9d3c58e4d1c2 Mon Sep 17 00:00:00 2001 From: LaVie024 <62406970+LaVie024@users.noreply.github.com> Date: Mon, 19 May 2025 19:21:20 +0000 Subject: [PATCH] Simplified handling of any input --- comfy_extras/nodes_convert_type.py | 11 ++--------- 1 file changed, 2 insertions(+), 9 deletions(-) diff --git a/comfy_extras/nodes_convert_type.py b/comfy_extras/nodes_convert_type.py index 301cbcbc8..88a49c7da 100644 --- a/comfy_extras/nodes_convert_type.py +++ b/comfy_extras/nodes_convert_type.py @@ -2,14 +2,7 @@ import re from comfy.comfy_types.node_typing import IO # Portions of this code is derived from Itdrdata/ComfyUI-Impact-Pack, -# specifically the handling of anytype and parts of the ConvertDataType -# node. - -class AnyType(str): - def __ne__(self, __value: object) -> bool: - return False - -any_typ = AnyType("*") +# specifically the implementation of ConvertDataType. class ConvertDataType: def __init__(self): @@ -17,7 +10,7 @@ class ConvertDataType: @classmethod def INPUT_TYPES(cls): - return {"required": {"value": (any_typ,), + return {"required": {"value": ("*"), "int_mode": (["truncate","round","bankers_rounding"],), "string_round_value": ("BOOLEAN", {"default": True}), "string_round_to": ("INT", {"default": 2, "min": 0})