From daa1565b931ac1b65319622533fe63375cd57a63 Mon Sep 17 00:00:00 2001 From: comfyanonymous Date: Wed, 30 Oct 2024 13:11:34 -0400 Subject: [PATCH] Fix diffusers flux controlnet regression. --- comfy/model_detection.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/comfy/model_detection.py b/comfy/model_detection.py index 5e534480..229fe499 100644 --- a/comfy/model_detection.py +++ b/comfy/model_detection.py @@ -544,7 +544,7 @@ def convert_diffusers_mmdit(state_dict, output_prefix=""): num_joint = count_blocks(state_dict, 'joint_transformer_blocks.{}.') num_single = count_blocks(state_dict, 'single_transformer_blocks.{}.') sd_map = comfy.utils.auraflow_to_diffusers({"n_double_layers": num_joint, "n_layers": num_joint + num_single}, output_prefix=output_prefix) - elif 'single_transformer_blocks.0.attn.norm_q.weight' in state_dict: #Flux + elif 'x_embedder.weight' in state_dict: #Flux depth = count_blocks(state_dict, 'transformer_blocks.{}.') depth_single_blocks = count_blocks(state_dict, 'single_transformer_blocks.{}.') hidden_size = state_dict["x_embedder.bias"].shape[0]