From ec24e75d89402a2f4d113d01f0e255a006632b31 Mon Sep 17 00:00:00 2001 From: City <125218114+city96@users.noreply.github.com> Date: Fri, 30 Aug 2024 03:40:15 +0200 Subject: [PATCH] Remove unused check --- ops.py | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/ops.py b/ops.py index d78f982..dbdaed9 100644 --- a/ops.py +++ b/ops.py @@ -121,10 +121,10 @@ class GGMLLayer(torch.nn.Module): bias = None non_blocking = comfy.model_management.device_supports_non_blocking(device) if s.bias is not None: - bias = s.get_weight(s.bias.to(device), dtype) if hasattr(s, "get_weight") else s.bias + bias = s.get_weight(s.bias.to(device), dtype) bias = comfy.ops.cast_to(bias, bias_dtype, device, non_blocking=non_blocking, copy=False) - weight = s.get_weight(s.weight.to(device), dtype) if hasattr(s, "get_weight") else s.weight + weight = s.get_weight(s.weight.to(device), dtype) weight = comfy.ops.cast_to(weight, dtype, device, non_blocking=non_blocking, copy=False) return weight, bias