Merge pull request #246 from Kosinkadink/fix/cast-bias-weight-offloadable

fix: update cast_bias_weight to use offloadable=True in clean_groupnorm
This commit is contained in:
Jedrzej Kosinski
2026-03-29 18:39:38 -07:00
committed by GitHub
2 changed files with 6 additions and 3 deletions
+4 -2
View File
@@ -338,8 +338,10 @@ class AbstractPreprocWrapper:
class disable_weight_init_clean_groupnorm(comfy.ops.disable_weight_init):
class GroupNorm(comfy.ops.disable_weight_init.GroupNorm):
def forward_comfy_cast_weights(self, input):
weight, bias = comfy.ops.cast_bias_weight(self, input)
return torch.nn.functional.group_norm(input, self.num_groups, weight, bias, self.eps)
weight, bias, offload_stream = comfy.ops.cast_bias_weight(self, input, offloadable=True)
x = torch.nn.functional.group_norm(input, self.num_groups, weight, bias, self.eps)
comfy.ops.uncast_bias_weight(self, weight, bias, offload_stream)
return x
def forward(self, input):
if self.comfy_cast_weights:
+2 -1
View File
@@ -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.6"
version = "1.5.7"
license = { file = "LICENSE" }
dependencies = []
@@ -13,3 +13,4 @@ Repository = "https://github.com/Kosinkadink/ComfyUI-Advanced-ControlNet"
PublisherId = "kosinkadink"
DisplayName = "ComfyUI-Advanced-ControlNet"
Icon = ""
requires-comfyui = ">=0.3.68"