File size: 795 Bytes
5193146
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
"""Base functionality and nodes are incorporated here.

Primarily contains base class declarations inherited elsewhere.

Also has some global declarations."""


GLOBAL_CATEGORY = "ComfyUI-Helper-Nodes"


class BaseNode:
    """
    Base class for all custom ComfyUI nodes in this repository.

    Mostly done to makes sure that things're defined properly in
    any inherited functions during development.
    """
    def __init__(self, **kwargs) -> None:
        pass

    # noinspection PyPep8Naming
    @classmethod
    def INPUT_TYPES(cls) -> dict:
        raise NotImplementedError

    RETURN_TYPES: tuple = None
    RETURN_NAMES: tuple = None

    CATEGORY: str = GLOBAL_CATEGORY

    FUNCTION: str = "process"

    def process(self, **kwargs) -> tuple:
        raise NotImplementedError