File size: 14,430 Bytes
1e3b872 |
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 |
import shutil
import folder_paths
import os
from .nodes.jake_upgrade import *
def setup_js():
import nodes
js_dest_path = os.path.join(os.path.dirname(folder_paths.__file__), "web", "extensions", "jake_upgrade")
if not os.path.exists(js_dest_path):
os.makedirs(js_dest_path)
js_src_path = os.path.join(os.path.join(os.path.dirname(__file__)), "js", "jake_upgrade.js")
shutil.copy(js_src_path, js_dest_path)
setup_js()
NODE_CLASS_MAPPINGS = {
### Misc Nodes
"CR SD1.5 Aspect Ratio JK": CR_AspectRatioSD15_JK,
"CR SDXL Aspect Ratio JK": CR_SDXLAspectRatio_JK,
### Reroute Nodes
"Reroute List JK": RerouteList_JK,
"Reroute Ckpt JK": RerouteCkpt_JK,
"Reroute Vae JK": RerouteVae_JK,
"Reroute Sampler JK": RerouteSampler_JK,
"Reroute Upscale JK": RerouteUpscale_JK,
"Reroute Resize JK": RerouteResize_JK,
### ControlNet Nodes
"CR Apply ControlNet JK": CR_ApplyControlNet_JK,
"CR Multi-ControlNet Stack JK": CR_ControlNetStack_JK,
"CR Apply Multi-ControlNet JK": CR_ApplyControlNetStack_JK,
### LoRA Nodes
"CR Load LoRA JK": CR_LoraLoader_JK,
"CR LoRA Stack JK": CR_LoRAStack_JK,
### Embedding Nodes
"Embedding Picker JK": EmbeddingPicker_JK,
"Embedding Picker Multi JK": EmbeddingPicker_Multi_JK,
### Loader Nodes
"Ckpt Loader JK": CkptLoader_JK,
"Vae Loader JK": VaeLoader_JK,
"Sampler Loader JK": SamplerLoader_JK,
"Upscale Model Loader JK": UpscaleModelLoader_JK,
### Pipe Nodes
"NodesState JK": NodesState_JK,
"Ksampler Parameters JK": KsamplerParameters_JK,
"Project Setting JK": ProjectSetting_JK,
"Base Model Parameters JK": BaseModelParameters_JK,
"Base Model Parameters Extract JK": BaseModelParametersExtract_JK,
"Base Image Parameters Extract JK": BaseImageParametersExtract_JK,
"Base Model Pipe JK": BaseModelPipe_JK,
"Base Model Pipe Extract JK": BaseModelPipeExtract_JK,
"Refine Pipe JK": RefinePipe_JK,
"Refine Pipe Extract JK": RefinePipeExtract_JK,
"Noise Injection Parameters JK": NoiseInjectionParameters_JK,
"Refine Model Parameters JK": RefineModelParameters_JK,
"Refine 1 Parameters Extract JK": Refine1ParametersExtract_JK,
"Refine 2 Parameters Extract JK": Refine2ParametersExtract_JK,
"Upscale Model Parameters JK": UpscaleModelParameters_JK,
"Image Upscale Parameters Extract JK": ImageUpscaleParametersExtract_JK,
"Latent Upscale Parameters Extract JK": LatentUpscaleParametersExtract_JK,
"Upscale Model Parameters Extract JK": UpscaleModelParametersExtract_JK,
"Detailer Parameters JK": DetailerParameters_JK,
"Pipe End JK": PipeEnd_JK,
"Metadata Pipe JK": MetadataPipe_JK,
"Metadata Pipe Extract JK": MetadataPipeExtract_JK,
### Image Nodes
"Save Image with Metadata JK": ImageSaveWithMetadata_JK,
"Save Image with Metadata Flow JK": ImageSaveWithMetadata_Flow_JK,
"Load Image With Metadata JK": LoadImageWithMetadata_JK,
"HintImageEnchance JK": HintImageEnchance_JK,
### Animation Nodes
"Animation Prompt JK": AnimPrompt_JK,
"Animation Value JK": AnimValue_JK,
### Logic Switches Nodes
"CR Boolean JK": CR_Boolean_JK,
"CR Int Input Switch JK": CR_IntInputSwitch_JK,
"CR Float Input Switch JK": CR_FloatInputSwitch_JK,
"CR Image Input Switch JK": CR_ImageInputSwitch_JK,
"CR Mask Input Switch JK": CR_MaskInputSwitch_JK,
"CR Latent Input Switch JK": CR_LatentInputSwitch_JK,
"CR Conditioning Input Switch JK": CR_ConditioningInputSwitch_JK,
"CR Clip Input Switch JK": CR_ClipInputSwitch_JK,
"CR Model Input Switch JK": CR_ModelInputSwitch_JK,
"CR ControlNet Input Switch JK": CR_ControlNetInputSwitch_JK,
"CR Text Input Switch JK": CR_TextInputSwitch_JK,
"CR VAE Input Switch JK": CR_VAEInputSwitch_JK,
"CR Switch Model and CLIP JK": CR_ModelAndCLIPInputSwitch_JK,
"CR Pipe Input Switch JK": CR_PipeInputSwitch_JK,
"CR Impact Pipe Input Switch JK": CR_ImpactPipeInputSwitch_JK,
### ComfyMath Fix Nodes
"CM_BoolToInt JK": BoolToInt_JK,
"CM_IntToBool JK": IntToBool_JK,
"CM_BoolUnaryOperation JK": BoolUnaryOperation_JK,
"CM_BoolBinaryOperation JK": BoolBinaryOperation_JK,
"CM_FloatUnaryCondition JK": FloatUnaryCondition_JK,
"CM_FloatBinaryCondition JK": FloatBinaryCondition_JK,
"CM_IntUnaryCondition JK": IntUnaryCondition_JK,
"CM_IntBinaryCondition JK": IntBinaryCondition_JK,
"CM_NumberUnaryCondition JK": NumberUnaryCondition_JK,
"CM_NumberBinaryCondition JK": NumberBinaryCondition_JK,
"CM_Vec2UnaryCondition JK": Vec2UnaryCondition_JK,
"CM_Vec2BinaryCondition JK": Vec2BinaryCondition_JK,
"CM_Vec2ToFloatUnaryOperation JK": Vec2ToFloatUnaryOperation_JK,
"CM_Vec2ToFloatBinaryOperation JK": Vec2ToFloatBinaryOperation_JK,
"CM_Vec2FloatOperation_JK": Vec2FloatOperation_JK,
"CM_Vec3UnaryCondition JK": Vec3UnaryCondition_JK,
"CM_Vec3BinaryCondition JK": Vec3BinaryCondition_JK,
"CM_Vec3ToFloatUnaryOperation JK": Vec3ToFloatUnaryOperation_JK,
"CM_Vec3ToFloatBinaryOperation JK": Vec3ToFloatBinaryOperation_JK,
"CM_Vec3FloatOperation_JK": Vec3FloatOperation_JK,
"CM_Vec4UnaryCondition JK": Vec4UnaryCondition_JK,
"CM_Vec4BinaryCondition JK": Vec4BinaryCondition_JK,
"CM_Vec4ToFloatUnaryOperation JK": Vec4ToFloatUnaryOperation_JK,
"CM_Vec4ToFloatBinaryOperation JK": Vec4ToFloatBinaryOperation_JK,
"CM_Vec4FloatOperation_JK": Vec4FloatOperation_JK,
### ComfyMath Nodes
"CM_FloatToInt JK": FloatToInt_JK,
"CM_IntToFloat JK": IntToFloat_JK,
"CM_IntToNumber JK": IntToNumber_JK,
"CM_NumberToInt JK": NumberToInt_JK,
"CM_FloatToNumber JK": FloatToNumber_JK,
"CM_NumberToFloat JK": NumberToFloat_JK,
"CM_ComposeVec2 JK": ComposeVec2_JK,
"CM_ComposeVec3 JK": ComposeVec3_JK,
"CM_ComposeVec4 JK": ComposeVec4_JK,
"CM_BreakoutVec2 JK": BreakoutVec2_JK,
"CM_BreakoutVec3 JK": BreakoutVec3_JK,
"CM_BreakoutVec4 JK": BreakoutVec4_JK,
"CM_FloatUnaryOperation JK": FloatUnaryOperation_JK,
"CM_FloatBinaryOperation JK": FloatBinaryOperation_JK,
"CM_IntUnaryOperation JK": IntUnaryOperation_JK,
"CM_IntBinaryOperation JK": IntBinaryOperation_JK,
"CM_NumberUnaryOperation JK": NumberUnaryOperation_JK,
"CM_NumberBinaryOperation JK": NumberBinaryOperation_JK,
"CM_Vec2UnaryOperation JK": Vec2UnaryOperation_JK,
"CM_Vec2BinaryOperation JK": Vec2BinaryOperation_JK,
"CM_Vec3UnaryOperation JK": Vec3UnaryOperation_JK,
"CM_Vec3BinaryOperation JK": Vec3BinaryOperation_JK,
"CM_Vec4UnaryOperation JK": Vec4UnaryOperation_JK,
"CM_Vec4BinaryOperation JK": Vec4BinaryOperation_JK,
### Simple Evaluate Nodes
"Evaluate Ints JK": EvaluateInts_JK,
"Evaluate Floats JK": EvaluateFloats_JK,
"Evaluate Strings JK": EvaluateStrs_JK,
"Evaluate Examples JK": EvalExamples_JK,
### 3D Nodes
# "Orbit Poses JK": OrbitPoses_JK,
}
NODE_DISPLAY_NAME_MAPPINGS = {
### Misc Nodes
"CR SD1.5 Aspect Ratio JK": "SD1.5 Aspect Ratio JK๐",
"CR SDXL Aspect Ratio JK": "SDXL Aspect Ratio JK๐",
### Reroute Nodes
"Reroute List JK": "Reroute List JK๐",
"Reroute Ckpt JK": "Reroute Ckpt JK๐",
"Reroute Vae JK": "Reroute Vae JK๐",
"Reroute Sampler JK": "Reroute Sampler JK๐",
"Reroute Upscale JK": "Reroute Upscale JK๐",
"Reroute Resize JK": "Reroute Resize JK๐",
### ControlNet Nodes
"CR Apply ControlNet JK": "Apply ControlNet JK๐",
"CR Multi-ControlNet Stack JK": "Multi-ControlNet Stack JK๐",
"CR Apply Multi-ControlNet JK": "Apply Multi-ControlNet JK๐",
### LoRA Nodes
"CR Load LoRA JK": "Load LoRA JK๐",
"CR LoRA Stack JK": "LoRA Stack JK๐",
### Embedding Nodes
"Embedding Picker JK": "Embedding Picker JK๐",
"Embedding Picker Multi JK": "Embedding Picker Multi JK๐",
### Loader Nodes
"Ckpt Loader JK": "Ckpt Loader JK๐",
"Vae Loader JK": "Vae Loader JK๐",
"Sampler Loader JK": "Sampler Loader JK๐",
"Upscale Model Loader JK": "Upscale Model Loader JK๐",
### Pipe Nodes
"NodesState JK": "Nodes State JK๐",
"Ksampler Parameters JK": "Ksampler Parameters JK๐",
"Project Setting JK": "Project Setting JK๐",
"Base Model Parameters JK": "Base Model Parameters JK๐",
"Base Model Parameters Extract JK": "Base Model Parameters Extract JK๐",
"Base Image Parameters Extract JK": "Base Image Parameters Extract JK๐",
"Base Model Pipe JK": "Base Model Pipe JK๐",
"Base Model Pipe Extract JK": "Base Model Pipe Extract JK๐",
"Refine Pipe JK": "Refine Pipe JK๐",
"Refine Pipe Extract JK": "Refine Pipe Extract JK๐",
"Noise Injection Parameters JK": "Noise Injection Parameters JK๐",
"Refine Model Parameters JK": "Refine Model Parameters JK๐",
"Refine 1 Parameters Extract JK": "Refine 1 Parameters Extract JK๐",
"Refine 2 Parameters Extract JK": "Refine 2 Parameters Extract JK๐",
"Upscale Model Parameters JK":"Upscale Model Parameters JK๐",
"Image Upscale Parameters Extract JK": "Image Upscale Parameters Extract JK๐",
"Latent Upscale Parameters Extract JK": "Latent Upscale Parameters Extract JK๐",
"Upscale Model Parameters Extract JK": "Upscale Model Parameters Extract JK๐",
"Detailer Parameters JK": "Detailer Parameters JK๐",
"Pipe End JK": "Pipe End JK๐",
"Metadata Pipe JK": "Metadata Pipe JK๐",
"Metadata Pipe Extract JK": "Metadata Pipe Extract JK๐",
### Image Nodes
"Save Image with Metadata JK": "Save Image With Metadata JK๐",
"Save Image with Metadata Flow JK": "Save Image With Metadata Flow JK๐",
"Load Image With Metadata JK": "Load Image With Metadata JK๐",
"HintImageEnchance JK": "Enchance And Resize Hint Images JK๐",
### Animation Nodes
"Animation Prompt JK": "Animation Prompt JK๐",
"Animation Value JK": "Animation Value JK๐",
### Logic switches Nodes
"CR Boolean JK": "Boolean JK๐",
"CR Image Input Switch JK": "Image Input Switch JK๐",
"CR Mask Input Switch JK": "Mask Input Switch JK๐",
"CR Int Input Switch JK": "Int Input Switch JK๐",
"CR Float Input Switch JK": "Float Input Switch JK๐",
"CR Latent Input Switch JK": "Latent Input Switch JK๐",
"CR Conditioning Input Switch JK": "Conditioning Input Switch JK๐",
"CR Clip Input Switch JK": "Clip Input Switch JK๐",
"CR Model Input Switch JK": "Model Input Switch JK๐",
"CR ControlNet Input Switch JK": "ControlNet Input Switch JK๐",
"CR Text Input Switch JK": "Text Input Switch JK๐",
"CR VAE Input Switch JK": "VAE Input Switch JK๐",
"CR Switch Model and CLIP JK": "Switch Model and CLIP JK๐",
"CR Pipe Input Switch JK": "Pipe Input Switch JK๐",
"CR Impact Pipe Input Switch JK": "Impact Pipe Input Switch JK๐",
### ComfyMath Fix Nodes
"CM_BoolToInt JK": "BoolToInt JK๐",
"CM_IntToBool JK": "IntToBool JK๐",
"CM_BoolUnaryOperation JK": "BoolUnaryOp JK๐",
"CM_BoolBinaryOperation JK": "BoolBinaryOp JK๐",
"CM_FloatUnaryCondition JK": "FloatUnaryCon JK๐",
"CM_FloatBinaryCondition JK": "FloatBinaryCon JK๐",
"CM_IntUnaryCondition JK": "IntUnaryCon JK๐",
"CM_IntBinaryCondition JK": "IntBinaryCon JK๐",
"CM_NumberUnaryCondition JK": "NumberUnaryCon JK๐",
"CM_NumberBinaryCondition JK": "NumberBinaryCon JK๐",
"CM_Vec2UnaryCondition JK": "Vec2UnaryCon JK๐",
"CM_Vec2BinaryCondition JK": "Vec2BinaryCon JK๐",
"CM_Vec2ToFloatUnaryOperation JK": "Vec2ToFloatUnaryOp JK๐",
"CM_Vec2ToFloatBinaryOperation JK": "Vec2ToFloatBinaryOp JK๐",
"CM_Vec2FloatOperation_JK": "Vec2FloatOp JK๐",
"CM_Vec3UnaryCondition JK": "Vec3UnaryCon JK๐",
"CM_Vec3BinaryCondition JK": "Vec3BinaryCon JK๐",
"CM_Vec3ToFloatUnaryOperation JK": "Vec3ToFloatUnaryOp JK๐",
"CM_Vec3ToFloatBinaryOperation JK": "Vec3ToFloatBinaryOp JK๐",
"CM_Vec3FloatOperation_JK": "Vec3FloatOp JK๐",
"CM_Vec4UnaryCondition JK": "Vec4UnaryCon JK๐",
"CM_Vec4BinaryCondition JK": "Vec4BinaryCon JK๐",
"CM_Vec4ToFloatUnaryOperation JK": "Vec4ToFloatUnaryOp JK๐",
"CM_Vec4ToFloatBinaryOperation JK": "Vec4ToFloatBinaryOp JK๐",
"CM_Vec4FloatOperation_JK": "Vec4FloatOp JK๐",
### ComfyMath Nodes
"CM_FloatToInt JK": "FloatToInt JK๐",
"CM_IntToFloat JK": "IntToFloat JK๐",
"CM_IntToNumber JK": "IntToNumber JK๐",
"CM_NumberToInt JK": "NumberToInt JK๐",
"CM_FloatToNumber JK": "FloatToNumber JK๐",
"CM_NumberToFloat JK": "NumberToFloat JK๐",
"CM_ComposeVec2 JK": "ComposeVec2 JK๐",
"CM_ComposeVec3 JK": "ComposeVec3 JK๐",
"CM_ComposeVec4 JK": "ComposeVec4 JK๐",
"CM_BreakoutVec2 JK": "BreakoutVec2 JK๐",
"CM_BreakoutVec3 JK": "BreakoutVec3 JK๐",
"CM_BreakoutVec4 JK": "BreakoutVec4 JK๐",
"CM_FloatUnaryOperation JK": "FloatUnaryOp JK๐",
"CM_FloatBinaryOperation JK": "FloatBinaryOp JK๐",
"CM_IntUnaryOperation JK": "IntUnaryOp JK๐",
"CM_IntBinaryOperation JK": "IntBinaryOp JK๐",
"CM_NumberUnaryOperation JK": "NumberUnaryOp JK๐",
"CM_NumberBinaryOperation JK": "NumberBinaryOp JK๐",
"CM_Vec2UnaryOperation JK": "Vec2UnaryOp JK๐",
"CM_Vec2BinaryOperation JK": "Vec2BinaryOp JK๐",
"CM_Vec3UnaryOperation JK": "Vec3UnaryOp JK๐",
"CM_Vec3BinaryOperation JK": "Vec3BinaryOp JK๐",
"CM_Vec4UnaryOperation JK": "Vec4UnaryOp JK๐",
"CM_Vec4BinaryOperation JK": "Vec4BinaryOp JK๐",
### Simple Evaluate Nodes
"Evaluate Ints JK": "Evaluate Ints JK๐",
"Evaluate Floats JK": "Evaluate Floats JK๐",
"Evaluate Strings JK": "Evaluate String JK๐",
"Evaluate Examples JK": "Evaluate Examples JK๐",
### 3D Nodes
# "Orbit Poses JK": "Orbit Poses JK๐",
}
__all__ = ['NODE_CLASS_MAPPINGS']
print("\033[34mJake Upgrade Nodes: \033[92m123 Nodes Loaded\033[0m")
|