mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-04 16:37:12 +08:00
Simplified handling of any input
This commit is contained in:
parent
630ded22a9
commit
918d803de4
@ -2,14 +2,7 @@ import re
|
|||||||
from comfy.comfy_types.node_typing import IO
|
from comfy.comfy_types.node_typing import IO
|
||||||
|
|
||||||
# Portions of this code is derived from Itdrdata/ComfyUI-Impact-Pack,
|
# Portions of this code is derived from Itdrdata/ComfyUI-Impact-Pack,
|
||||||
# specifically the handling of anytype and parts of the ConvertDataType
|
# specifically the implementation of ConvertDataType.
|
||||||
# node.
|
|
||||||
|
|
||||||
class AnyType(str):
|
|
||||||
def __ne__(self, __value: object) -> bool:
|
|
||||||
return False
|
|
||||||
|
|
||||||
any_typ = AnyType("*")
|
|
||||||
|
|
||||||
class ConvertDataType:
|
class ConvertDataType:
|
||||||
def __init__(self):
|
def __init__(self):
|
||||||
@ -17,7 +10,7 @@ class ConvertDataType:
|
|||||||
|
|
||||||
@classmethod
|
@classmethod
|
||||||
def INPUT_TYPES(cls):
|
def INPUT_TYPES(cls):
|
||||||
return {"required": {"value": (any_typ,),
|
return {"required": {"value": ("*"),
|
||||||
"int_mode": (["truncate","round","bankers_rounding"],),
|
"int_mode": (["truncate","round","bankers_rounding"],),
|
||||||
"string_round_value": ("BOOLEAN", {"default": True}),
|
"string_round_value": ("BOOLEAN", {"default": True}),
|
||||||
"string_round_to": ("INT", {"default": 2, "min": 0})
|
"string_round_to": ("INT", {"default": 2, "min": 0})
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user