mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-07-27 16:26:39 +00:00
Fix recognizing ComfyNodeV3 class by using issubclass, removed override decorator as it was only introduced in py3.12
This commit is contained in:
parent
fce43e1312
commit
cef73c75fb
@ -1,5 +1,5 @@
|
||||
from __future__ import annotations
|
||||
from typing import Any, Literal, TYPE_CHECKING, TypeVar, Callable, Optional, cast, override
|
||||
from typing import Any, Literal, TYPE_CHECKING, TypeVar, Callable, Optional, cast
|
||||
from enum import Enum
|
||||
from abc import ABC, abstractmethod
|
||||
from dataclasses import dataclass, asdict
|
||||
@ -561,7 +561,6 @@ class MultiType:
|
||||
str_types.insert(0, self.input_override.get_io_type_V1())
|
||||
return ",".join(list(dict.fromkeys(str_types)))
|
||||
|
||||
@override
|
||||
def as_dict_V1(self):
|
||||
if self.input_override is not None:
|
||||
return self.input_override.as_dict_V1() | super().as_dict_V1()
|
||||
|
@ -36,7 +36,7 @@ class V3TestNode(io.ComfyNodeV3):
|
||||
io.Image.Input("image", display_name="new_image"),
|
||||
XYZ.Input("xyz", optional=True),
|
||||
io.Custom("JKL").Input("jkl", optional=True),
|
||||
io.Mask.Input("mask", optional=True),
|
||||
io.Mask.Input("mask", display_name="mask haha", optional=True),
|
||||
io.Int.Input("some_int", display_name="new_name", min=0, max=127, default=42,
|
||||
tooltip="My tooltip 😎", display_mode=io.NumberDisplay.slider),
|
||||
io.Combo.Input("combo", options=["a", "b", "c"], tooltip="This is a combo input"),
|
||||
|
@ -555,7 +555,7 @@ class PromptServer():
|
||||
|
||||
def node_info(node_class):
|
||||
obj_class = nodes.NODE_CLASS_MAPPINGS[node_class]
|
||||
if isinstance(obj_class, ComfyNodeV3):
|
||||
if issubclass(obj_class, ComfyNodeV3):
|
||||
return obj_class.GET_NODE_INFO_V1()
|
||||
info = {}
|
||||
info['input'] = obj_class.INPUT_TYPES()
|
||||
|
Loading…
x
Reference in New Issue
Block a user