|
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 = {
|
|
|
|
"CR SD1.5 Aspect Ratio JK": CR_AspectRatioSD15_JK,
|
|
"CR SDXL Aspect Ratio JK": CR_SDXLAspectRatio_JK,
|
|
|
|
"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,
|
|
|
|
"CR Apply ControlNet JK": CR_ApplyControlNet_JK,
|
|
"CR Multi-ControlNet Stack JK": CR_ControlNetStack_JK,
|
|
"CR Apply Multi-ControlNet JK": CR_ApplyControlNetStack_JK,
|
|
|
|
"CR Load LoRA JK": CR_LoraLoader_JK,
|
|
"CR LoRA Stack JK": CR_LoRAStack_JK,
|
|
|
|
"Embedding Picker JK": EmbeddingPicker_JK,
|
|
"Embedding Picker Multi JK": EmbeddingPicker_Multi_JK,
|
|
|
|
"Ckpt Loader JK": CkptLoader_JK,
|
|
"Vae Loader JK": VaeLoader_JK,
|
|
"Sampler Loader JK": SamplerLoader_JK,
|
|
"Upscale Model Loader JK": UpscaleModelLoader_JK,
|
|
|
|
"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,
|
|
|
|
"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 Prompt JK": AnimPrompt_JK,
|
|
"Animation Value JK": AnimValue_JK,
|
|
|
|
"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,
|
|
|
|
"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,
|
|
|
|
"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,
|
|
|
|
"Evaluate Ints JK": EvaluateInts_JK,
|
|
"Evaluate Floats JK": EvaluateFloats_JK,
|
|
"Evaluate Strings JK": EvaluateStrs_JK,
|
|
"Evaluate Examples JK": EvalExamples_JK,
|
|
|
|
|
|
}
|
|
|
|
NODE_DISPLAY_NAME_MAPPINGS = {
|
|
|
|
"CR SD1.5 Aspect Ratio JK": "SD1.5 Aspect Ratio JK๐",
|
|
"CR SDXL Aspect Ratio JK": "SDXL Aspect Ratio JK๐",
|
|
|
|
"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๐",
|
|
|
|
"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๐",
|
|
|
|
"CR Load LoRA JK": "Load LoRA JK๐",
|
|
"CR LoRA Stack JK": "LoRA Stack JK๐",
|
|
|
|
"Embedding Picker JK": "Embedding Picker JK๐",
|
|
"Embedding Picker Multi JK": "Embedding Picker Multi JK๐",
|
|
|
|
"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๐",
|
|
|
|
"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๐",
|
|
|
|
"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 Prompt JK": "Animation Prompt JK๐",
|
|
"Animation Value JK": "Animation Value JK๐",
|
|
|
|
"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๐",
|
|
|
|
"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๐",
|
|
|
|
"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๐",
|
|
|
|
"Evaluate Ints JK": "Evaluate Ints JK๐",
|
|
"Evaluate Floats JK": "Evaluate Floats JK๐",
|
|
"Evaluate Strings JK": "Evaluate String JK๐",
|
|
"Evaluate Examples JK": "Evaluate Examples JK๐",
|
|
|
|
|
|
}
|
|
|
|
__all__ = ['NODE_CLASS_MAPPINGS']
|
|
|
|
print("\033[34mJake Upgrade Nodes: \033[92m123 Nodes Loaded\033[0m")
|
|
|