Fix potential recursion issue

This commit is contained in:
huchenlei
2024-03-06 21:47:07 -05:00
parent 9afe3c4433
commit c70b0ebf96
+2 -1
View File
@@ -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"