From a0651359d7a1ee968d5cf01c1b7302e41435e779 Mon Sep 17 00:00:00 2001 From: comfyanonymous <121283862+comfyanonymous@users.noreply.github.com> Date: Sun, 25 May 2025 02:28:11 -0700 Subject: [PATCH] Return proper error if diffusion model not detected properly. (#8272) --- comfy/model_detection.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/comfy/model_detection.py b/comfy/model_detection.py index 20f287df9..74f539598 100644 --- a/comfy/model_detection.py +++ b/comfy/model_detection.py @@ -620,6 +620,9 @@ def convert_config(unet_config): def unet_config_from_diffusers_unet(state_dict, dtype=None): + if "conv_in.weight" not in state_dict: + return None + match = {} transformer_depth = []