From 2a11597a6734825405144d9a19714560363ee6a9 Mon Sep 17 00:00:00 2001 From: mcDandy Date: Sun, 18 Oct 2026 12:55:15 +0200 Subject: [PATCH] Remove unused length_mismatch argument of get_v_variable Co-Authored-By: Claude Opus 5.5 --- more_math/AudioMathNode.py | 2 +- more_math/ConditioningMathNode.py | 4 ++-- more_math/ImageMathNode.py | 2 +- more_math/LatentMathNode.py | 2 +- more_math/MaskMathNode.py | 2 +- more_math/StringMathNode.py | 2 +- more_math/VideoMathNode.py | 8 ++++---- more_math/helper_functions.py | 2 +- 8 files changed, 12 insertions(+), 12 deletions(-) diff --git a/more_math/AudioMathNode.py b/more_math/AudioMathNode.py index 0312840..6229c19 100644 --- a/more_math/AudioMathNode.py +++ b/more_math/AudioMathNode.py @@ -135,7 +135,7 @@ class AudioMathNode(io.ComfyNode): "batch_count": float(a_w.shape[0]), } | generate_dim_variables(a_w) | V_norm_waveforms | sample_rates - v_stacked, v_cnt = get_v_variable(V_norm_waveforms, length_mismatch=length_mismatch) + v_stacked, v_cnt = get_v_variable(V_norm_waveforms) if v_stacked is not None: variables["V"] = v_stacked variables["Vcnt"] = float(v_cnt) diff --git a/more_math/ConditioningMathNode.py b/more_math/ConditioningMathNode.py index 8f4ba3b..20b4c3a 100644 --- a/more_math/ConditioningMathNode.py +++ b/more_math/ConditioningMathNode.py @@ -147,7 +147,7 @@ class ConditioningMathNode(io.ComfyNode): "batch_count": a.shape[0], } | generate_dim_variables(a) | V_norm_tensors - v_stacked, v_cnt = get_v_variable(V_norm_tensors, length_mismatch=length_mismatch) + v_stacked, v_cnt = get_v_variable(V_norm_tensors) if v_stacked is not None: variables["V"] = v_stacked variables["Vcnt"] = float(v_cnt) @@ -193,7 +193,7 @@ class ConditioningMathNode(io.ComfyNode): "batch_count": a_p.shape[0] if a_p.numel() > 0 else 0, } | generate_dim_variables(a_p) | V_norm_pooled - v_stacked, v_cnt = get_v_variable(V_norm_pooled, length_mismatch=length_mismatch) + v_stacked, v_cnt = get_v_variable(V_norm_pooled) if v_stacked is not None: variables_pi["V"] = v_stacked variables_pi["Vcnt"] = float(v_cnt) diff --git a/more_math/ImageMathNode.py b/more_math/ImageMathNode.py index 1bd9875..2ab1fb4 100644 --- a/more_math/ImageMathNode.py +++ b/more_math/ImageMathNode.py @@ -129,7 +129,7 @@ class ImageMathNode(io.ComfyNode): # Add all dynamic inputs variables.update(V_norm) - v_stacked, v_cnt = get_v_variable(V_norm, length_mismatch=length_mismatch) + v_stacked, v_cnt = get_v_variable(V_norm) if v_stacked is not None: variables["V"] = v_stacked variables["Vcnt"] = float(v_cnt) diff --git a/more_math/LatentMathNode.py b/more_math/LatentMathNode.py index fccc66f..a6a4c18 100644 --- a/more_math/LatentMathNode.py +++ b/more_math/LatentMathNode.py @@ -215,7 +215,7 @@ class LatentMathNode(io.ComfyNode): # Add all dynamic inputs variables.update(V_norm_samples) - v_stacked, v_cnt = get_v_variable(V_norm_samples, length_mismatch=length_mismatch) + v_stacked, v_cnt = get_v_variable(V_norm_samples) if v_stacked is not None: variables["V"] = v_stacked variables["Vcnt"] = float(v_cnt) diff --git a/more_math/MaskMathNode.py b/more_math/MaskMathNode.py index 8f2fc38..1696d3d 100644 --- a/more_math/MaskMathNode.py +++ b/more_math/MaskMathNode.py @@ -108,7 +108,7 @@ class MaskMathNode(io.ComfyNode): "batch_count": float(ae.shape[0]), } | generate_dim_variables(ae) - v_stacked, v_cnt = get_v_variable(V_norm, length_mismatch=length_mismatch) + v_stacked, v_cnt = get_v_variable(V_norm) if v_stacked is not None: variables["V"] = v_stacked variables["Vcnt"] = float(v_cnt) diff --git a/more_math/StringMathNode.py b/more_math/StringMathNode.py index 358f5d6..6287c20 100644 --- a/more_math/StringMathNode.py +++ b/more_math/StringMathNode.py @@ -69,7 +69,7 @@ class StringMathNode(io.ComfyNode): "z": F.get("F3", 0.0) if F.get("F3") is not None else 0.0 } - v_stacked, v_cnt = get_v_variable(V, length_mismatch="do nothing") + v_stacked, v_cnt = get_v_variable(V) if v_stacked is not None: variables["V"] = v_stacked variables["Vcnt"] = float(v_cnt) diff --git a/more_math/VideoMathNode.py b/more_math/VideoMathNode.py index f912841..697af42 100644 --- a/more_math/VideoMathNode.py +++ b/more_math/VideoMathNode.py @@ -169,10 +169,10 @@ class VideoMathNode(io.ComfyNode): variables[v_name].is_lazy_var = True def lazy_v_stack(): - return get_v_variable(V_norm, length_mismatch=length_mismatch)[0] + return get_v_variable(V_norm)[0] lazy_v_stack.is_lazy_var = True def lazy_v_count(): - return float(get_v_variable(V_norm, length_mismatch=length_mismatch)[1]) + return float(get_v_variable(V_norm)[1]) lazy_v_count.is_lazy_var = True variables["V"] = lazy_v_stack variables["Vcnt"] = lazy_v_count @@ -251,10 +251,10 @@ class VideoMathNode(io.ComfyNode): variables[v_name].is_lazy_var = True def lazy_v_stack(): - return get_v_variable(V_norm_waveforms, length_mismatch=length_mismatch)[0] + return get_v_variable(V_norm_waveforms)[0] lazy_v_stack.is_lazy_var = True def lazy_v_count(): - return float(get_v_variable(V_norm_waveforms, length_mismatch=length_mismatch)[1]) + return float(get_v_variable(V_norm_waveforms)[1]) lazy_v_count.is_lazy_var = True variables["V"] = lazy_v_stack variables["Vcnt"] = lazy_v_count diff --git a/more_math/helper_functions.py b/more_math/helper_functions.py index aa1a96a..c90e19b 100644 --- a/more_math/helper_functions.py +++ b/more_math/helper_functions.py @@ -303,7 +303,7 @@ def normalize_to_common_shape(*tensors, mode="pad"): result.append(t.contiguous()) return tuple(result) -def get_v_variable(v_norm_dict, length_mismatch="error"): +def get_v_variable(v_norm_dict): """ Collects V0, V1, ... from the dict (ignoring NestedTensor component keys like V0_0, V1_1), and returns them as a list and count.