From aeddd6ce307f1f6d60f82cd3d35acfb5fd890868 Mon Sep 17 00:00:00 2001 From: Vladimir Mandic Date: Sun, 13 Oct 2024 09:52:27 -0400 Subject: [PATCH] cleanup Signed-off-by: Vladimir Mandic --- extensions-builtin/Lora/networks.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/extensions-builtin/Lora/networks.py b/extensions-builtin/Lora/networks.py index 0373080cd..a8afe2ac0 100644 --- a/extensions-builtin/Lora/networks.py +++ b/extensions-builtin/Lora/networks.py @@ -376,7 +376,7 @@ def network_apply_weights(self: Union[torch.nn.Conv2d, torch.nn.Linear, torch.nn if len(weight.shape) == 4 and weight.shape[1] == 9: # inpainting model. zero pad updown to make channel[1] 4 to 9 updown = torch.nn.functional.pad(updown, (0, 0, 0, 0, 0, 5)) # pylint: disable=not-callable - if getattr(self.weight, "quant_type", None) in ['nf4', 'fp4'] or self.weight.numel() != updown.numel(): + if getattr(self.weight, "quant_type", None) in ['nf4', 'fp4']: # or self.weight.numel() != updown.numel(): bnb = model_quant.load_bnb('Load network: type=LoRA', silent=True) if bnb is not None: device = self.weight.device