Fix diffusers flux controlnet regression.

This commit is contained in:
comfyanonymous 2024-10-30 13:11:34 -04:00
parent 09fdb2b269
commit daa1565b93
1 changed files with 1 additions and 1 deletions

View File

@ -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]