-
Notifications
You must be signed in to change notification settings - Fork 6
/
Copy path__init__.py
173 lines (153 loc) · 9.31 KB
/
__init__.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
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
from .Arithmetic import IntMultiplication, IntToFloatMultiplication, FloatMultiplication, IntSubtraction
from .Numeral import NumeralToString, OneFloat, TwoFloats, FourFloats, EightFloats, FloatListInterpreter1, FloatListInterpreter4, FloatListInterpreter8, StepsAndCfg
from .Util import CanvasCreatorAdvanced, CanvasCreatorSimple, CanvasCreatorBasic, RandomTillingLayouts, RandomNestedLayouts, SeedGenerator
from .Util import ImageGrayscale, ImageContrast, ImageSharpness, ImageBrightness, ImageSaturation, ImageHUE, ImageGamma, ImageToneCurve, ImageColorTransfer, ImageRGBChannel, UpscaleImageByModelThenResize
from .Mask import CreateTillingPNGMask, CreateNestedPNGMask, PngColorMasksToString, PngColorMasksToRGB, PngColorMasksToStringList, PngColorMasksToMaskList, PngRectanglesToMask, PngRectanglesToMaskList, CreateMaskWithCanvas, CreateWatermarkRemovalMask, CreateSimpleMask
from .Text import TextBox, TextWithBooleanSwitchAndCommonTextInput, TextCombinerSix, TextCombinerTwo, TextSwitcherTwoWays, TextSwitcherThreeWays, TextLoopCombiner, TextWildcardSeprator
from .Logic import SingleBooleanTrigger, TwoBooleanTrigger, FourBooleanTrigger, SixBooleanTrigger, EightBooleanTrigger, LogicNot, EvenOrOdd, EvenOrOddList, BooleanListInterpreter1, BooleanListInterpreter4, BooleanListInterpreter8, FunctionSwap, FunctionSelectAuto, NoneToZero
from .Logic import SN74LVC1G125, SN74HC1G86, SN74HC86
from .Lora import LoRALoaderWithNameStacker
def __init__(self):
pass
# A dictionary that contains all nodes you want to export with their names
# NOTE: names should be globally unique
NODE_CLASS_MAPPINGS = {
"IntMultiplication" : IntMultiplication,
"IntToFloatMultiplication" : IntToFloatMultiplication,
"FloatMultiplication" : FloatMultiplication,
"IntSubtraction" : IntSubtraction,
"NumeralToString" : NumeralToString,
"OneFloat" : OneFloat,
"TwoFloats" : TwoFloats,
"FourFloats" : FourFloats,
"EightFloats" : EightFloats,
"FloatListInterpreter1" : FloatListInterpreter1,
"FloatListInterpreter4" : FloatListInterpreter4,
"FloatListInterpreter8" : FloatListInterpreter8,
"StepsAndCfg" : StepsAndCfg,
"CanvasCreatorAdvanced" : CanvasCreatorAdvanced,
"CanvasCreatorSimple" : CanvasCreatorSimple,
"CanvasCreatorBasic" : CanvasCreatorBasic,
"RandomTillingLayouts" : RandomTillingLayouts,
"RandomNestedLayouts" : RandomNestedLayouts,
"SeedGeneratorMira" : SeedGenerator,
"ImageGrayscale" : ImageGrayscale,
"ImageContrast" : ImageContrast,
"ImageSharpness" : ImageSharpness,
"ImageBrightness" : ImageBrightness,
"ImageSaturation" : ImageSaturation,
"ImageHUE" : ImageHUE,
"ImageGamma" : ImageGamma,
"ImageToneCurve" : ImageToneCurve,
"ImageColorTransferMira" : ImageColorTransfer,
"ImageRGBChannel" : ImageRGBChannel,
"UpscaleImageByModelThenResize" : UpscaleImageByModelThenResize,
"CreateTillingPNGMask" : CreateTillingPNGMask,
"CreateNestedPNGMask" : CreateNestedPNGMask,
"CreateSimpleMask" : CreateSimpleMask,
"PngColorMasksToString" : PngColorMasksToString,
"PngColorMasksToRGB" : PngColorMasksToRGB,
"PngColorMasksToStringList" : PngColorMasksToStringList,
"PngColorMasksToMaskList" : PngColorMasksToMaskList,
"PngRectanglesToMask" : PngRectanglesToMask,
"PngRectanglesToMaskList" : PngRectanglesToMaskList,
"CreateMaskWithCanvas" : CreateMaskWithCanvas,
"CreateWatermarkRemovalMask": CreateWatermarkRemovalMask,
"SingleBooleanTrigger" : SingleBooleanTrigger,
"TwoBooleanTrigger" : TwoBooleanTrigger,
"FourBooleanTrigger" : FourBooleanTrigger,
"SixBooleanTrigger" : SixBooleanTrigger,
"EightBooleanTrigger" : EightBooleanTrigger,
"LogicNot" : LogicNot,
"EvenOrOdd" : EvenOrOdd,
"EvenOrOddList" : EvenOrOddList,
"BooleanListInterpreter1" : BooleanListInterpreter1,
"BooleanListInterpreter4" : BooleanListInterpreter4,
"BooleanListInterpreter8" : BooleanListInterpreter8,
"FunctionSwap" : FunctionSwap,
"FunctionSelectAuto" : FunctionSelectAuto,
"NoneToZero" : NoneToZero,
"SN74LVC1G125" : SN74LVC1G125,
"SN74HC1G86" : SN74HC1G86,
"SN74HC86" : SN74HC86,
"TextBox" : TextBox,
"TextWithBooleanSwitchAndCommonTextInput" : TextWithBooleanSwitchAndCommonTextInput,
"TextCombinerSix" : TextCombinerSix,
"TextCombinerTwo" : TextCombinerTwo,
"TextSwitcherTwoWays" : TextSwitcherTwoWays,
"TextSwitcherThreeWays" : TextSwitcherThreeWays,
"TextLoopCombiner" : TextLoopCombiner,
"TextWildcardSeprator" : TextWildcardSeprator,
"LoRALoaderWithNameStacker" : LoRALoaderWithNameStacker,
}
# A dictionary that contains the friendly/humanly readable titles for the nodes
NODE_DISPLAY_NAME_MAPPINGS = {
"IntMultiplication" : "Integer Multiplication",
"IntToFloatMultiplication" : "Integer to Float Multiplication",
"FloatMultiplication" : "Float Multiplication",
"IntSubtraction" : "Integer Subtraction",
"NumeralToString" : "Convert Numeral to String",
"OneFloat" : "1 Float",
"TwoFloats" : "2 Floats",
"FourFloats" : "4 Floats",
"EightFloats" : "8 Floats",
"FloatListInterpreter1" : "1 Float from List",
"FloatListInterpreter4" : "4 Floats from List",
"FloatListInterpreter8" : "8 Floats from List",
"StepsAndCfg" : "Steps & Cfg",
"CanvasCreatorAdvanced" : "Create Canvas Advanced",
"CanvasCreatorSimple" : "Create Canvas",
"CanvasCreatorBasic" : "Create Canvas H/W only",
"RandomTillingLayouts" : "Random Tilling Layouts",
"RandomNestedLayouts" : "Random Nested Layouts",
"SeedGeneratorMira" : "Random Seed Generator",
"ImageGrayscale" : "To Grayscale",
"ImageContrast" : "Adjust Contrast",
"ImageSharpness" : "Adjust Sharpness",
"ImageBrightness" : "Adjust Brightness",
"ImageSaturation" : "Adjust Saturation",
"ImageHUE" : "Adjust HUE",
"ImageGamma" : "Adjust Gamma",
"ImageToneCurve" : "Tone Curve",
"ImageColorTransferMira" : "Color Transfer",
"ImageRGBChannel" : "RGB Channel",
"UpscaleImageByModelThenResize" : "Upscale Image By Model Then Resize",
"CreateTillingPNGMask" : "Create Tilling PNG Mask",
"CreateNestedPNGMask" : "Create Nested PNG Mask",
"CreateSimpleMask" : "Create Simple Mask",
"PngColorMasksToString" : "PngColor Mask to HEX String",
"PngColorMasksToRGB" : "PngColor Mask to INT RGB",
"PngColorMasksToStringList" : "PngColor Masks to List",
"PngColorMasksToMaskList" : "PngColor Masks to Masks",
"PngRectanglesToMask" : "PngRectangles to Mask",
"PngRectanglesToMaskList" : "PngRectangles to Masks",
"CreateMaskWithCanvas" : "Create Mask With Canvas",
"CreateWatermarkRemovalMask": "Create Watermark Removal Mask",
"SingleBooleanTrigger" : "1 Bool",
"TwoBooleanTrigger" : "2 Bools",
"FourBooleanTrigger" : "4 Bools",
"SixBooleanTrigger" : "6 Bools",
"EightBooleanTrigger" : "8 Bools",
"LogicNot" : "Not",
"EvenOrOdd" : "Even or Odd",
"EvenOrOddList" : "Even or Odd List",
"BooleanListInterpreter1" : "1 Bool from List",
"BooleanListInterpreter4" : "4 Bools from List",
"BooleanListInterpreter8" : "8 Bools from List",
"FunctionSwap" : "Function Swap",
"FunctionSelectAuto" : "Function Select Auto",
"NoneToZero" : "None To 0",
"SN74LVC1G125" : "SN74LVC1G125",
"SN74HC1G86" : "SN74HC1G86",
"SN74HC86" : "SN74HC86",
"TextBox" : "Text Box",
"TextWithBooleanSwitchAndCommonTextInput" : "Text Switcher",
"TextCombinerSix" : "Text Combiner 6",
"TextCombinerTwo" : "Text Combiner 2",
"TextSwitcherTwoWays" : "Text Switcher Two Ways",
"TextSwitcherThreeWays" : "Text Switcher Three Ways",
"TextLoopCombiner" : "Text Loop Combiner",
"TextWildcardSeprator" : "Text Wildcard Seprator",
"LoRALoaderWithNameStacker" : "LoRA Loader With Name Stacker",
}
__all__ = ["NODE_CLASS_MAPPINGS", "NODE_DISPLAY_NAME_MAPPINGS"]