Add PassOrNone including locales and add tooltip/description to existing IsNone node. (#1035)

This commit is contained in:
altoiddealer
2026-09-07 12:49:51 +08:00
committed by GitHub
parent 271685698b
commit 457b3a81e8
3 changed files with 66 additions and 1 deletions
+16
View File
@@ -6271,6 +6271,22 @@
}
}
},
"easy PassOrNone": {
"display_name": "Pass or None",
"inputs": {
"any": {
"name": "anything"
}
},
"outputs": {
"0": {
"name": "output"
},
"1": {
"name": "is_none"
}
}
},
"easy isNone": {
"display_name": "Is None",
"inputs": {
+16
View File
@@ -6321,6 +6321,22 @@
}
}
},
"easy PassOrNone": {
"display_name": "传递或为空",
"inputs": {
"any": {
"name": "任何"
}
},
"outputs": {
"0": {
"name": "输出"
},
"1": {
"name": "是否为空"
}
}
},
"easy isNone": {
"display_name": "是否为空",
"inputs": {
+34 -1
View File
@@ -1000,13 +1000,44 @@ class isMaskEmpty(io.ComfyNode):
return io.NodeOutput(False)
class PassOrNone(io.ComfyNode):
@classmethod
def define_schema(cls):
return io.Schema(
node_id="easy PassOrNone",
description="Passes the input through, or outputs None when input is None/not provided.",
category="EasyUse/Logic",
search_aliases=[
"null",
"nothing",
"empty",
"blank",
],
inputs=[
io.AnyType.Input("anything", tooltip="Passes the input through, or outputs None when no input is provided.", optional=True),
],
outputs=[
io.AnyType.Output("output"),
io.Boolean.Output("is_none"),
],
)
@classmethod
def execute(cls, anything=None):
return io.NodeOutput(
anything,
anything is None,
)
class isNone(io.ComfyNode):
@classmethod
def define_schema(cls):
return io.Schema(
node_id="easy isNone",
description="Returns true if the input is None, an empty string, or zero.",
category="EasyUse/Logic",
inputs=[io.AnyType.Input("any")],
inputs=[io.AnyType.Input("any", tooltip="Returns true if the input is None, an empty string, or zero.")],
outputs=[io.Boolean.Output("boolean")],
)
@@ -1682,6 +1713,7 @@ NODE_CLASS_MAPPINGS = {
"easy blocker": Blocker,
"easy ifElse": IfElse,
"easy isMaskEmpty": isMaskEmpty,
"easy PassOrNone": PassOrNone,
"easy isNone": isNone,
"easy isSDXL": isSDXL,
"easy isFileExist": isFileExist,
@@ -1731,6 +1763,7 @@ NODE_DISPLAY_NAME_MAPPINGS = {
"easy ifElse": "If else",
"easy blocker": "Blocker",
"easy isMaskEmpty": "Is Mask Empty",
"easy PassOrNone": "Pass or None",
"easy isNone": "Is None",
"easy isSDXL": "Is SDXL",
"easy isFileExist": "Is File Exist",