From ab6526fa35144f4b1f70fe16771579cf7f00c707 Mon Sep 17 00:00:00 2001 From: Jedrzej Kosinski Date: Sun, 5 Jan 2025 15:32:51 -0600 Subject: [PATCH] Fixed backwards compatibility for new KF scheduling behavior, changes "sigmas" to "sample_sigmas" to match incoming ComfyUI PR --- adv_control/utils.py | 3 ++- pyproject.toml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/adv_control/utils.py b/adv_control/utils.py index bd9629e..4dc7363 100644 --- a/adv_control/utils.py +++ b/adv_control/utils.py @@ -18,6 +18,7 @@ from .logger import logger BIGMIN = -(2**53-1) BIGMAX = (2**53-1) +BIGMAX_TENSOR = torch.tensor(BIGMAX) ORIG_PREVIOUS_CONTROLNET = "_orig_previous_controlnet" CONTROL_INIT_BY_ACN = "_control_init_by_ACN" @@ -562,7 +563,7 @@ class AdvancedControlBase: # get current step percent curr_t: float = self.t prev_index = self._current_timestep_index - max_sigma = torch.max(transformer_options.get("sigmas", BIGMAX)) + max_sigma = torch.max(transformer_options.get("sample_sigmas", BIGMAX_TENSOR)) # if met guaranteed steps (or no current keyframe), look for next keyframe in case need to switch if self._current_timestep_keyframe is None or self._current_used_steps >= self._current_timestep_keyframe.get_effective_guarantee_steps(max_sigma): # if has next index, loop through and see if need to switch diff --git a/pyproject.toml b/pyproject.toml index 0477348..df7d31c 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.0" +version = "1.5.1" license = { file = "LICENSE" } dependencies = []