From c70b0ebf969316e41fd98520266e4cf9d40e70dd Mon Sep 17 00:00:00 2001 From: huchenlei Date: Wed, 6 Mar 2024 21:47:07 -0500 Subject: [PATCH] Fix potential recursion issue --- layered_diffusion.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/layered_diffusion.py b/layered_diffusion.py index 374987d..b7cca17 100644 --- a/layered_diffusion.py +++ b/layered_diffusion.py @@ -34,8 +34,9 @@ def calculate_weight_adjust_channel(func): alpha = p[0] v = p[1] + # The recursion call should be handled in the main func call. if isinstance(v, list): - v = (func(self, v[1:], v[0].clone(), key),) + continue if len(v) == 1: patch_type = "diff"