1
mirror of https://github.com/comfyanonymous/ComfyUI.git synced 2025-08-03 07:26:31 +08:00

Add comfytype decorator, convert all relevant v3_01 types to follow new convention, make v1 test node have xyz be optional

This commit is contained in:
kosinkadink1@gmail.com
2025-06-13 04:06:06 -07:00
parent cf7312d82c
commit 54e0d6b161
3 changed files with 243 additions and 209 deletions

View File

@@ -9,13 +9,13 @@ class TestNode(ComfyNodeABC):
return {
"required": {
"image": (IO.IMAGE,),
"xyz": ("XYZ",),
"some_int": (IO.INT, {"display_name": "new_name",
"min": 0, "max": 127, "default": 42,
"tooltip": "My tooltip 😎", "display": "slider"}),
"combo": (IO.COMBO, {"options": ["a", "b", "c"], "tooltip": "This is a combo input"}),
},
"optional": {
"xyz": ("XYZ",),
"mask": (IO.MASK,),
}
}
@@ -29,7 +29,7 @@ class TestNode(ComfyNodeABC):
CATEGORY = "v3 nodes"
def do_thing(self, image: torch.Tensor, xyz, some_int: int, combo: str, mask: torch.Tensor=None):
def do_thing(self, image: torch.Tensor, some_int: int, combo: str, xyz=None, mask: torch.Tensor=None):
return (some_int, image)