From 5d7012e8acbfee2b6aebbe761db497293c301927 Mon Sep 17 00:00:00 2001 From: Jedrzej Kosinski Date: Tue, 4 Mar 2025 20:38:38 -0600 Subject: [PATCH 1/2] version bump --- pyproject.toml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/pyproject.toml b/pyproject.toml index f04a8ac..add2432 100644 --- a/pyproject.toml +++ b/pyproject.toml @@ -1,7 +1,7 @@ [project] name = "comfyui-advanced-controlnet" description = "Nodes for scheduling ControlNet strength across timesteps and batched latents, as well as applying custom weights and attention masks." -version = "1.5.3" +version = "1.5.4" license = { file = "LICENSE" } dependencies = [] From f980ae7c7b74eefc93a6cf67e4623e5c63f3a80f Mon Sep 17 00:00:00 2001 From: German Chaverri Date: Tue, 5 Aug 2025 11:00:08 -0600 Subject: [PATCH 2/2] Apply fix for ControlNet conditioning to match changes from ComfyUI 140ffc7fdc53e810030f060e421c1f528c2d2ab9 --- adv_control/control.py | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/adv_control/control.py b/adv_control/control.py index 3da9c0e..623038a 100644 --- a/adv_control/control.py +++ b/adv_control/control.py @@ -3,6 +3,7 @@ from torch import Tensor import torch import os +import comfy.model_base import comfy.ops import comfy.utils import comfy.model_management @@ -108,13 +109,13 @@ class ControlNetAdvanced(ControlNet, AdvancedControlBase): for c in self.extra_conds: temp = cond.get(c, None) if temp is not None: - extra[c] = temp.to(dtype) + extra[c] = comfy.model_base.convert_tensor(temp, dtype, x_noisy.device) timestep = self.model_sampling_current.timestep(t) x_noisy = self.model_sampling_current.calculate_input(t, x_noisy) self.x_noisy_shape = x_noisy.shape - control = self.control_model(x=x_noisy.to(dtype), hint=self.cond_hint, timesteps=timestep.to(dtype), context=context.to(dtype), **extra) + control = self.control_model(x=x_noisy.to(dtype), hint=self.cond_hint, timesteps=timestep.to(dtype), context=comfy.model_management.cast_to_device(context, x_noisy.device, dtype), **extra) return self.control_merge(control, control_prev, output_dtype=None) def pre_run_advanced(self, *args, **kwargs):