From c2fc3b1617098d6f95167210f5945923b6f1b298 Mon Sep 17 00:00:00 2001 From: lspindler Date: Mon, 25 Nov 2024 00:57:57 -0800 Subject: [PATCH] Get input channels from unet_config --- comfy/model_base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/model_base.py b/comfy/model_base.py index 3c385cda9..02de55244 100644 --- a/comfy/model_base.py +++ b/comfy/model_base.py @@ -712,7 +712,7 @@ class Flux(BaseModel): super().__init__(model_config, model_type, device=device, unet_model=comfy.ldm.flux.model.Flux) def concat_cond(self, **kwargs): - num_channels = self.diffusion_model.img_in.weight.shape[1] // (self.diffusion_model.patch_size * self.diffusion_model.patch_size) + num_channels = self.model_config.unet_config["in_channels"] out_channels = self.model_config.unet_config["out_channels"] if num_channels <= out_channels: