From 14430c118d093e68f3e3734e49cbab7b92b58a8f Mon Sep 17 00:00:00 2001 From: kijai <40791699+kijai@users.noreply.github.com> Date: Sun, 23 Feb 2025 17:51:09 +0200 Subject: [PATCH] bump version --- __init__.py | 1 + nodes/nodes.py | 28 ++++++++++++++++++++++++++++ pyproject.toml | 2 +- web/js/jsnodes.js | 1 + 4 files changed, 31 insertions(+), 1 deletion(-) diff --git a/__init__.py b/__init__.py index 20596a9..98049ac 100644 --- a/__init__.py +++ b/__init__.py @@ -165,6 +165,7 @@ NODE_CONFIG = { "DifferentialDiffusionAdvanced": {"class": DifferentialDiffusionAdvanced, "name": "Differential Diffusion Advanced"}, "FluxBlockLoraLoader": {"class": FluxBlockLoraLoader, "name": "Flux Block Lora Loader"}, "FluxBlockLoraSelect": {"class": FluxBlockLoraSelect, "name": "Flux Block Lora Select"}, + "HunyuanVideoBlockLoraSelect": {"class": HunyuanVideoBlockLoraSelect, "name": "Hunyuan Video Block Lora Select"}, "CustomControlNetWeightsFluxFromList": {"class": CustomControlNetWeightsFluxFromList, "name": "Custom ControlNet Weights Flux From List"}, "CheckpointLoaderKJ": {"class": CheckpointLoaderKJ, "name": "CheckpointLoaderKJ"}, "DiffusionModelLoaderKJ": {"class": DiffusionModelLoaderKJ, "name": "Diffusion Model Loader KJ"}, diff --git a/nodes/nodes.py b/nodes/nodes.py index e312a5a..bb90452 100644 --- a/nodes/nodes.py +++ b/nodes/nodes.py @@ -1939,6 +1939,34 @@ class FluxBlockLoraSelect: def load_lora(self, **kwargs): return (kwargs,) +class HunyuanVideoBlockLoraSelect: + def __init__(self): + self.loaded_lora = None + + @classmethod + def INPUT_TYPES(s): + arg_dict = {} + argument = ("FLOAT", {"default": 0.0, "min": 0.0, "max": 1000.0, "step": 0.01}) + + for i in range(20): + arg_dict["double_blocks.{}.".format(i)] = argument + + for i in range(40): + arg_dict["single_blocks.{}.".format(i)] = argument + + return {"required": arg_dict} + + RETURN_TYPES = ("SELECTEDBLOCKS", ) + RETURN_NAMES = ("blocks", ) + OUTPUT_TOOLTIPS = ("The modified diffusion model.",) + FUNCTION = "load_lora" + + CATEGORY = "KJNodes/experimental" + DESCRIPTION = "Select individual block alpha values, value of 0 removes the block altogether" + + def load_lora(self, **kwargs): + return (kwargs,) + class FluxBlockLoraLoader: def __init__(self): self.loaded_lora = None diff --git a/pyproject.toml b/pyproject.toml index d4d5c58..a255ae3 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-kjnodes" description = "Various quality of life -nodes for ComfyUI, mostly just visual stuff to improve usability." -version = "1.0.5" +version = "1.0.6" license = {file = "LICENSE"} dependencies = ["librosa", "numpy", "pillow>=10.3.0", "scipy", "color-matcher", "matplotlib", "huggingface_hub"] diff --git a/web/js/jsnodes.js b/web/js/jsnodes.js index 65b7ed6..1cab81f 100644 --- a/web/js/jsnodes.js +++ b/web/js/jsnodes.js @@ -80,6 +80,7 @@ app.registerExtension({ break; case "FluxBlockLoraSelect": + case "HunyuanVideoBlockLoraSelect": nodeType.prototype.onNodeCreated = function () { this.addWidget("button", "Set all", null, () => { const userInput = prompt("Enter the values to set for widgets (e.g., s0,1,2-7=2.0, d0,1,2-7=2.0, or 1.0):", "");