forked from TinyTerra/ComfyUI_tinyterraNodes
-
Notifications
You must be signed in to change notification settings - Fork 0
/
ttNdev.py
100 lines (80 loc) · 2.3 KB
/
ttNdev.py
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
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
import folder_paths
import comfy.samplers
MAX_RESOLUTION=8192
# in_dev - likely broken
class ttN_debugInput:
@classmethod
def INPUT_TYPES(s):
return {"required": {"console_title": ("STRING", {"default": "ttN INPUT DEBUG"}),},
"optional": {"debug": ("", {"default": None}),}
}
RETURN_TYPES = tuple()
RETURN_NAMES = tuple()
FUNCTION = "debug"
CATEGORY = "ttN/dev"
OUTPUT_NODE = True
def debug(_, **kwargs):
for key, value in kwargs.items():
if key == "console_title":
print(value)
else:
print(f"{key}: {value}")
return tuple()
class ttN_busIN:
@classmethod
def INPUT_TYPES(s):
return {"required": {
"lane_0": ("",),
}}
RETURN_TYPES = ("BUS_LINE",)
RETURN_NAMES = ("bus_line",)
FUNCTION = "roundnround"
CATEGORY = "ttN/dev"
@staticmethod
def roundnround(*args, **kwargs):
bus_line = []
for key, value in kwargs.items():
bus_line.append(value)
print("busIN + kw:--",tuple(bus_line))
return (tuple(bus_line),)
class ttN_busOUT:
@classmethod
def INPUT_TYPES(s):
return {"required": {
"bus_line": ("BUS_LINE",),
}}
RETURN_TYPES = ()
FUNCTION = "roundnround"
CATEGORY = "ttN/dev"
@staticmethod
def roundnround(bus_line):
print("busOUT:--",bus_line)
return (bus_line,)
class ttN_seedDebug:
@classmethod
def INPUT_TYPES(s):
return {"required": {
"ttNseed": ("INT", {"default": 0, "min": 0, "max": 0xffffffffffffffff}),
}}
RETURN_TYPES = ("INT",)
RETURN_NAMES = ("seed",)
FUNCTION = "plant"
CATEGORY = "ttN/dev"
@staticmethod
def plant(ttNseed, *args, **kwargs):
print('Seed:', ttNseed)
print('args:', args)
print('kwargs:',kwargs)
return (ttNseed,)
NODE_CLASS_MAPPINGS = {
"ttN debugInput": ttN_debugInput,
"ttN busIN": ttN_busIN,
"ttN busOUT": ttN_busOUT,
"ttN seedDebug": ttN_seedDebug,
}
NODE_DISPLAY_NAME_MAPPINGS = {
"ttN debugInput": "debugInput",
"ttN busIN": "busIN",
"ttN busOUT": "busOUT",
"ttN seedDebug": "seedDebug",
}