File size: 18,337 Bytes
baa8e90 |
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 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 223 224 225 226 227 228 229 230 231 232 233 234 235 236 237 238 239 240 241 242 243 244 245 246 247 248 249 250 251 252 253 254 255 256 257 258 259 260 261 262 263 264 265 266 267 268 269 270 271 272 273 274 275 276 277 278 279 280 281 282 283 284 285 286 287 288 289 290 291 292 293 294 295 296 297 298 299 300 301 302 303 304 305 306 307 308 309 310 311 312 313 314 315 316 317 318 319 320 321 322 323 324 325 326 327 328 329 330 331 332 333 334 335 336 337 338 339 340 341 342 343 344 345 346 347 348 349 350 351 352 353 354 355 356 357 358 359 360 361 362 363 364 365 366 367 368 369 370 371 372 373 374 375 376 377 378 379 380 381 382 383 384 385 386 387 388 389 390 391 392 393 394 395 396 397 398 399 400 401 402 403 404 405 406 407 408 409 410 411 |
"""
@author: RockOfFire
@title: Comfyroll Custom Nodes
@nickname: Comfyroll Custom Nodes
@description: Custom nodes for SDXL and SD1.5 including Multi-ControlNet, LoRA, Aspect Ratio, Process Switches, and many more nodes.
"""
from .nodes.nodes import *
from .nodes.legacy_nodes import *
from .nodes.lora import *
from .nodes.controlnet import *
from .nodes.pipe import *
from .nodes.sdxl import *
from .nodes.logic import *
from .nodes.model_merge import *
from .nodes.upscale import *
from .nodes.xygrid import *
from .nodes.index import *
from .nodes.conversion import *
from .nodes.matplot import *
from .nodes.pil_text import *
from .nodes.pil_layout import *
from .nodes.pil_filter import *
from .nodes.pil_template import *
from .nodes.pil_pattern import *
from .nodes.nodes_random import *
from .animation_nodes.interpolation import *
from .animation_nodes.io import *
from .animation_nodes.prompt import *
from .animation_nodes.schedulers import *
from .animation_nodes.schedules import *
from .animation_nodes.lists import *
from .animation_nodes.utils import *
from .animation_nodes.cyclers import *
LIVE_NODE_CLASS_MAPPINGS = {
### Misc Nodes
"CR Image Output": CR_ImageOutput,
"CR Integer Multiple": CR_IntegerMultipleOf,
"CR Latent Batch Size": CR_LatentBatchSize,
"CR Seed": CR_Seed,
"CR Prompt Text":CR_PromptText,
"CR Split String":CR_SplitString,
"CR Value": CR_Value,
"CR Conditioning Mixer":CR_ConditioningMixer,
"CR Select Model": CR_SelectModel,
### Aspect Ratio Nodes
"CR SD1.5 Aspect Ratio":CR_AspectRatioSD15,
"CR SDXL Aspect Ratio":CR_SDXLAspectRatio,
"CR Aspect Ratio": CR_AspectRatio,
### Legacy Nodes
"CR Image Size": CR_ImageSize,
"CR Aspect Ratio SDXL": CR_AspectRatio_SDXL,
### ControlNet Nodes
"CR Apply ControlNet": CR_ApplyControlNet,
"CR Multi-ControlNet Stack": CR_ControlNetStack,
"CR Apply Multi-ControlNet": CR_ApplyControlNetStack,
### LoRA Nodes
"CR Load LoRA": CR_LoraLoader,
"CR LoRA Stack": CR_LoRAStack,
"CR Apply LoRA Stack": CR_ApplyLoRAStack,
### Model Merge Nodes
"CR Apply Model Merge": CR_ApplyModelMerge,
"CR Model Merge Stack": CR_ModelMergeStack,
### Pipe Nodes
"CR Module Pipe Loader": CR_ModulePipeLoader,
"CR Module Input": CR_ModuleInput,
"CR Module Output": CR_ModuleOutput,
"CR Image Pipe In": CR_ImagePipeIn,
"CR Image Pipe Edit": CR_ImagePipeEdit,
"CR Image Pipe Out": CR_ImagePipeOut,
"CR Pipe Switch": CR_InputSwitchPipe,
### SDXL Nodes
"CR SDXL Prompt Mix Presets": CR_PromptMixPresets,
"CR SDXL Style Text": CR_SDXLStyleText,
"CR SDXL Base Prompt Encoder": CR_SDXLBasePromptEncoder,
### Upscale Nodes
"CR Multi Upscale Stack": CR_MultiUpscaleStack,
"CR Upscale Image": CR_UpscaleImage,
"CR Apply Multi Upscale": CR_ApplyMultiUpscale,
### XY Grid Nodes
"CR XY List": CR_XYList,
"CR XY Interpolate": CR_XYInterpolate,
"CR XY Index": CR_XYIndex,
"CR XY From Folder": CR_XYFromFolder,
"CR XY Save Grid Image": CR_XYSaveGridImage,
### Graphics Pattern
"CR Halftone Grid": CR_HalftoneGrid,
"CR Color Bars": CR_ColorBars,
"CR Style Bars": CR_StyleBars,
"CR Checker Pattern": CR_CheckerPattern,
"CR Polygons": CR_Polygons,
"CR Color Gradient": CR_ColorGradient,
"CR Radial Gradient": CR_RadialGradient,
"CR Starburst Lines": CR_StarburstLines,
"CR Starburst Colors": CR_StarburstColors,
"CR Simple Binary Pattern": CR_BinaryPatternSimple,
"CR Binary Pattern": CR_BinaryPattern,
### Graphics Text
"CR Overlay Text": CR_OverlayText,
"CR Draw Text": CR_DrawText,
"CR Mask Text": CR_MaskText,
"CR Composite Text": CR_CompositeText,
#"CR Arabic Text RTL": CR_ArabicTextRTL,
"CR Simple Text Watermark": CR_SimpleTextWatermark,
#"CR System TrueType Font": CR_SystemTrueTypeFont,
#"CR Display Font": CR_DisplayFont,
### Graphics Filter
"CR Halftone Filter": CR_HalftoneFilter,
"CR Color Tint": CR_ColorTint,
### Graphics Layout
"CR Page Layout": CR_PageLayout,
"CR Image Panel": CR_ImagePanel,
"CR Image Grid Panel": CR_ImageGridPanel,
"CR Image Border": CR_ImageBorder,
"CR Simple Text Panel": CR_SimpleTextPanel,
"CR Color Panel": CR_ColorPanel,
"CR Overlay Transparent Image": CR_OverlayTransparentImage,
#"CR Simple Titles": CR_SimpleTitles,
### Graphics Template
"CR Simple Meme Template": CR_SimpleMemeTemplate,
"CR Simple Banner": CR_SimpleBanner,
"CR Comic Panel Templates": CR_ComicPanelTemplates,
### Utils Logic Nodes
"CR Image Input Switch": CR_ImageInputSwitch,
"CR Image Input Switch (4 way)": CR_ImageInputSwitch4way,
"CR Latent Input Switch": CR_LatentInputSwitch,
"CR Conditioning Input Switch": CR_ConditioningInputSwitch,
"CR Clip Input Switch": CR_ClipInputSwitch,
"CR Model Input Switch": CR_ModelInputSwitch,
"CR ControlNet Input Switch": CR_ControlNetInputSwitch,
"CR VAE Input Switch": CR_VAEInputSwitch,
"CR Text Input Switch": CR_TextInputSwitch,
"CR Text Input Switch (4 way)": CR_TextInputSwitch4way,
"CR Switch Model and CLIP": CR_ModelAndCLIPInputSwitch,
### Utils Process Nodes
"CR Batch Process Switch": CR_BatchProcessSwitch,
"CR Img2Img Process Switch": CR_Img2ImgProcessSwitch,
"CR Hires Fix Process Switch": CR_HiResFixProcessSwitch,
### Utils Index Nodes
"CR Index": CR_Index,
"CR Index Increment": CR_IncrementIndex,
"CR Index Multiply": CR_MultiplyIndex,
"CR Index Reset": CR_IndexReset,
"CR Trigger": CR_Trigger,
### Utils Conversion Nodes
"CR String To Number": CR_StringToNumber,
"CR String To Combo": CR_StringToCombo,
"CR Float To String": CR_FloatToString,
"CR Float To Integer": CR_FloatToInteger,
"CR Integer To String": CR_IntegerToString,
"CR Text List To String": CR_TextListToString,
"CR Seed to Int": CR_SeedToInt,
### Utils Random Nodes
"CR Random Hex Color": CR_RandomHexColor,
"CR Random RGB": CR_RandomRGB,
"CR Random Multiline Values": CR_RandomMultilineValues,
"CR Random RGB Gradient": CR_RandomRGBGradient,
#------------------------------------------------------
### Animation Nodes
# Schedules
"CR Simple Schedule": CR_SimpleSchedule,
"CR Central Schedule": CR_CentralSchedule,
"CR Combine Schedules": CR_CombineSchedules,
"CR Output Schedule To File": CR_OutputScheduleToFile,
"CR Load Schedule From File": CR_LoadScheduleFromFile,
"CR Schedule Input Switch": Comfyroll_ScheduleInputSwitch,
# Schedulers
"CR Simple Value Scheduler": CR_SimpleValueScheduler,
"CR Simple Text Scheduler": CR_SimpleTextScheduler,
"CR Value Scheduler": CR_ValueScheduler,
"CR Text Scheduler": CR_TextScheduler,
"CR Load Scheduled Models": CR_LoadScheduledModels,
"CR Load Scheduled LoRAs": CR_LoadScheduledLoRAs,
"CR Prompt Scheduler": CR_PromptScheduler,
"CR Simple Prompt Scheduler": CR_SimplePromptScheduler,
# Prompt
"CR Prompt List": CR_PromptList,
"CR Prompt List Keyframes": CR_PromptListKeyframes,
"CR Simple Prompt List": CR_SimplePromptList,
"CR Simple Prompt List Keyframes": CR_SimplePromptListKeyframes,
"CR Keyframe List": CR_KeyframeList,
"CR Prompt Text": CR_PromptText,
#"CR Load Prompt Style": CR_LoadPromptStyle,
"CR Encode Scheduled Prompts": CR_EncodeScheduledPrompts,
# Interpolation
"CR Gradient Float": CR_GradientFloat,
"CR Gradient Integer": CR_GradientInteger,
"CR Increment Float": CR_IncrementFloat,
"CR Increment Integer": CR_IncrementInteger,
"CR Interpolate Latents": CR_InterpolateLatents,
# Lists
"CR Model List": CR_ModelList,
"CR LoRA List": CR_LoRAList,
"CR Text List": CR_TextList,
"CR Text List Simple": CR_TextListSimple,
"CR Image List": CR_ImageList,
"CR Image List Simple": CR_ImageListSimple,
# Cyclers
"CR Cycle Models": CR_CycleModels,
"CR Cycle LoRAs": CR_CycleLoRAs,
"CR Cycle Text": CR_CycleText,
"CR Cycle Text Simple": CR_CycleTextSimple,
"CR Cycle Images": CR_CycleImages,
"CR Cycle Images Simple": CR_CycleImagesSimple,
# Utils
"CR Debatch Frames": CR_DebatchFrames,
"CR Current Frame": CR_CurrentFrame,
"CR Input Text List": CR_InputTextList,
# IO
"CR Load Animation Frames": CR_LoadAnimationFrames,
"CR Load Flow Frames": CR_LoadFlowFrames,
"CR Output Flow Frames": CR_OutputFlowFrames,
}
LIVE_NODE_DISPLAY_NAME_MAPPINGS = {
### Misc Nodes
"CR Image Output": "๐พ CR Image Output",
"CR Integer Multiple": "โ๏ธ CR Integer Multiple",
"CR Latent Batch Size": "โ๏ธ CR Latent Batch Size",
"CR Seed": "๐ฑ CR Seed",
"CR Prompt Text": "๐ CR Prompt Text",
"CR Split String": "โ๏ธ CR Split String",
"CR Value": "โ๏ธ CR Value",
"CR Conditioning Mixer": "โ๏ธ CR Conditioning Mixer",
"CR Select Model": "๐ฎ CR Select Model",
### Aspect Ratio Nodes
"CR SD1.5 Aspect Ratio": "๐ณ CR SD1.5 Aspect Ratio",
"CR SDXL Aspect Ratio": "๐ณ CR SDXL Aspect Ratio",
"CR Aspect Ratio": "๐ณ CR Aspect Ratio",
### Legacy Nodes
"CR Image Size": "CR Image Size (Legacy)",
"CR Aspect Ratio SDXL": "CR Aspect Ratio SDXL (Legacy)",
### ControlNet Nodes
"CR Apply ControlNet": "๐น๏ธ CR Apply ControlNet",
"CR Multi-ControlNet Stack": "๐น๏ธ CR Multi-ControlNet Stack",
"CR Apply Multi-ControlNet": "๐น๏ธ CR Apply Multi-ControlNet",
### LoRA Nodes
"CR Load LoRA": "๐ CR Load LoRA",
"CR LoRA Stack": "๐ CR LoRA Stack",
"CR Apply LoRA Stack": "๐ CR Apply LoRA Stack",
### Model Merge Nodes
"CR Apply Model Merge": "โ๏ธ CR Apply Model Merge",
"CR Model Merge Stack": "โ๏ธ CR Model Merge Stack",
### Pipe Nodes
"CR Module Pipe Loader": "โ๏ธ CR Module Pipe Loader",
"CR Module Input": "โ๏ธ CR Module Input",
"CR Module Output": "โ๏ธ CR Module Output",
"CR Image Pipe In": "๐ฉ CR Image Pipe In",
"CR Image Pipe Edit": "๐ฉ๏ธ CR Image Pipe Edit",
"CR Image Pipe Out": "๐ฉ๏ธ CR Image Pipe Out",
"CR Pipe Switch": "๐๏ธ CR Pipe Switch",
### SDXL Nodes
"CR SDXL Prompt Mix Presets": "๐ CR SDXL Prompt Mix Presets",
"CR SDXL Style Text": "๐ CR SDXL Style Text",
"CR SDXL Base Prompt Encoder": "๐ CR SDXL Base Prompt Encoder",
### Upscale Nodes
"CR Multi Upscale Stack": "๐ CR Multi Upscale Stack",
"CR Upscale Image": "๐ CR Upscale Image",
"CR Apply Multi Upscale": "๐ CR Apply Multi Upscale",
### XY Grid Nodes
"CR XY List": "๐ CR XY List",
"CR XY Interpolate": "๐ CR XY Interpolate",
"CR XY Index": "๐ CR XY Index",
"CR XY From Folder": "๐ CR XY From Folder",
"CR XY Save Grid Image": "๐ CR XY Save Grid Image",
### Graphics Pattern
"CR Halftone Grid" : "๐ซ CR Halftone Grid",
"CR Color Bars" : "๐ซ CR Color Bars",
"CR Style Bars" : "๐ช CR Style Bars",
"CR Checker Pattern": "๐ฆ CR Checker Pattern",
"CR Polygons": "๐ฉ CR Polygons",
"CR Color Gradient": "๐จ CR Color Gradient",
"CR Radial Gradient": "๐จ CR Radial Gradient",
"CR Starburst Lines": "๐ง CR Starburst Lines",
"CR Starburst Colors": "๐ฅ CR Starburst Colors",
"CR Simple Binary Pattern": "๐ฅ CR Simple Binary Pattern",
"CR Binary Pattern": "๐ฅ CR Binary Pattern",
### Graphics Text
"CR Overlay Text": "๐ค CR Overlay Text",
"CR Draw Text": "๐ค๏ธ CR Draw Text",
"CR Mask Text": "๐ค๏ธ CR Mask Text",
"CR Composite Text": "๐ค๏ธ CR Composite Text",
#"CR Arabic Text RTL": "๐ค๏ธ CR Arabic Text RTL",
"CR Simple Text Watermark": "๐ค๏ธ CR Simple Text Watermark",
### Graphics Filter
"CR Halftone Filter": "๐จ Halftone Filter",
"CR Color Tint": "๐จ CR Color Tint",
### Graphics Layout
"CR Image Panel": "๐ CR Image Panel",
"CR Image Grid Panel": "๐ CR Image Grid Panel",
"CR Simple Text Panel": "๐ CR Simple Text Panel",
"CR Color Panel": "๐ CR Color Panel",
"CR Page Layout": "๐ CR Page Layout",
"CR Image Border": "๐ CR Image Border",
"CR Overlay Transparent Image": "๐ CR Overlay Transparent Image",
#"CR Simple Titles": "๐ CR Simple Titles",
### Graphics Template
"CR Simple Meme Template": "๐ฝ CR Simple Meme Template",
"CR Simple Banner": "๐ฝ CR Simple Banner",
"CR Comic Panel Templates": "๐ฝ CR Comic Panel Templates",
### Utils Logic Nodes
"CR Image Input Switch": "๐ CR Image Input Switch",
"CR Image Input Switch (4 way)": "๐ CR Image Input Switch (4 way)",
"CR Latent Input Switch": "๐ CR Latent Input Switch",
"CR Conditioning Input Switch": "๐ CR Conditioning Input Switch",
"CR Clip Input Switch": "๐ CR Clip Input Switch",
"CR Model Input Switch": "๐ CR Model Input Switch",
"CR ControlNet Input Switch": "๐ CR ControlNet Input Switch",
"CR VAE Input Switch": "๐ CR VAE Input Switch",
"CR Text Input Switch": "๐ CR Text Input Switch",
"CR Text Input Switch (4 way)": "๐ CR Text Input Switch (4 way)",
"CR Switch Model and CLIP": "๐ CR Switch Model and CLIP",
### Utils Process Nodes
"CR Batch Process Switch": "๐ CR Batch Process Switch",
"CR Img2Img Process Switch": "๐ CR Img2Img Process Switch",
"CR Hires Fix Process Switch": "๐ CR Hires Fix Process Switch",
### Utils Index Nodes
"CR Index":"๐ข CR Index",
"CR Index Increment": "๐ข CR Index Increment",
"CR Index Multiply": "๐ข CR Index Multiply",
"CR Index Reset": "๐ข CR Index Reset",
"CR Trigger": "๐ข CR Trigger",
### Utils Conversion Nodes
"CR String To Number": "๐ง CR String To Number",
"CR String To Combo": "๐ง CR String To Combo",
"CR Float To String": "๐ง CR Float To String",
"CR Float To Integer": "๐ง CR Float To Integer",
"CR Integer To String": "๐ง CR Integer To String",
"CR Text List To String": "๐ง CR Text List To String",
"CR Seed to Int": "๐ง CR Seed to Int",
### Utils Random Nodes
"CR Random Hex Color": "๐ฒ CR Random Hex Color",
"CR Random RGB": "๐ฒ CR Random RGB",
"CR Random Multiline Values": "๐ฒ CR Random Multiline Values",
"CR Random RGB Gradient": "๐ฒ CR Random RGB Gradient",
#------------------------------------------------------
### Animation Nodes
# Schedules
"CR Simple Schedule": "๐ CR Simple Schedule",
"CR Central Schedule": "๐ CR Central Schedule",
"CR Combine Schedules": "๐ CR Combine Schedules",
"CR Output Schedule To File": "๐ CR Output Schedule To File",
"CR Load Schedule From File": "๐ CR Load Schedule From File",
"CR Schedule Input Switch": "๐ CR Schedule Input Switch",
# Schedulers
"CR Simple Value Scheduler": "๐ CR Simple Value Scheduler",
"CR Simple Text Scheduler": "๐ CR Simple Text Scheduler",
"CR Value Scheduler": "๐ CR Value Scheduler",
"CR Text Scheduler": "๐ CR Text Scheduler",
"CR Load Scheduled Models": "๐ CR Load Scheduled Models",
"CR Load Scheduled LoRAs": "๐ CR Load Scheduled LoRAs",
"CR Prompt Scheduler": "๐ CR Prompt Scheduler",
"CR Simple Prompt Scheduler": "๐ CR Simple Prompt Scheduler",
# Prompt
"CR Prompt List": "๐ CR Prompt List",
"CR Prompt List Keyframes": "๐ CR Prompt List Keyframes",
"CR Simple Prompt List": "๐ CR Simple Prompt List",
"CR Simple Prompt List Keyframes": "๐ CR Simple Prompt List Keyframes",
"CR Keyframe List": "๐ CR Keyframe List",
"CR Prompt Text": "๐ CR Prompt Text",
#"CR Load Prompt Style": "๐ CR Load Prompt Style",
"CR Encode Scheduled Prompts": "๐ CR Encode Scheduled Prompts",
# Interpolation
"CR Gradient Float": "๐ข CR Gradient Float",
"CR Gradient Integer": "๐ข CR Gradient Integer",
"CR Increment Float": "๐ข CR Increment Float",
"CR Increment Integer": "๐ข CR Increment Integer",
"CR Interpolate Latents": "๐ข CR Interpolate Latents",
# Lists
"CR Model List": "๐ CR Model List",
"CR LoRA List": "๐ CR LoRA List",
"CR Text List": "๐ CR Text List",
"CR Text List Simple": "๐ CR Text List Simple",
"CR Image List": "๐ CR Image List",
"CR Image List Simple": "๐ CR Image List Simple",
"CR Input Text List": "๐ CR Input Text List",
# Cyclers
"CR Cycle Models": "โป๏ธ CR Cycle Models",
"CR Cycle LoRAs": "โป๏ธ CR Cycle LoRAs",
"CR Cycle Text": "โป๏ธ CR Cycle Text",
"CR Cycle Text Simple": "โป๏ธ CR Cycle Text Simple",
"CR Cycle Images": "โป๏ธ CR Cycle Images",
"CR Cycle Images Simple": "โป๏ธ CR Cycle Images Simple",
# Utils
"CR Debatch Frames": "๐ ๏ธ CR Debatch Frames",
"CR Current Frame": "๐ ๏ธ CR Current Frame",
# IO
"CR Load Animation Frames": "โจ๏ธ CR Load Animation Frames",
"CR Load Flow Frames": "โจ๏ธ CR Load Flow Frames",
"CR Output Flow Frames": "โจ๏ธ CR Output Flow Frames",
}
INCLUDE_DEV_NODES = False
try:
from .dev_node_mappings import DEV_NODE_CLASS_MAPPINGS, DEV_NODE_DISPLAY_NAME_MAPPINGS
if INCLUDE_DEV_NODES:
NODE_CLASS_MAPPINGS = {**DEV_NODE_CLASS_MAPPINGS, **LIVE_NODE_CLASS_MAPPINGS}
NODE_DISPLAY_NAME_MAPPINGS = {**DEV_NODE_DISPLAY_NAME_MAPPINGS, **LIVE_NODE_DISPLAY_NAME_MAPPINGS}
print("\033[34mComfyroll Custom Nodes: \033[92mDev Nodes Loaded\033[0m")
else:
NODE_CLASS_MAPPINGS = LIVE_NODE_CLASS_MAPPINGS
NODE_DISPLAY_NAME_MAPPINGS = LIVE_NODE_DISPLAY_NAME_MAPPINGS
except ImportError:
NODE_CLASS_MAPPINGS = LIVE_NODE_CLASS_MAPPINGS
NODE_DISPLAY_NAME_MAPPINGS = LIVE_NODE_DISPLAY_NAME_MAPPINGS
print("\033[34mComfyroll Custom Nodes: \033[92mLoaded\033[0m")
|