Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

Fix diffusers flux controlnet regression.

comfyanonymousdaa1565b931a
diff --git a/comfy/model_detection.py b/comfy/model_detection.py
index 5e5344809..229fe499d 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]