mirror of
https://github.com/comfyanonymous/ComfyUI.git
synced 2025-01-11 02:15:17 +00:00
Fix diffusers flux controlnet regression.
This commit is contained in:
parent
09fdb2b269
commit
daa1565b93
@ -544,7 +544,7 @@ def convert_diffusers_mmdit(state_dict, output_prefix=""):
|
|||||||
num_joint = count_blocks(state_dict, 'joint_transformer_blocks.{}.')
|
num_joint = count_blocks(state_dict, 'joint_transformer_blocks.{}.')
|
||||||
num_single = count_blocks(state_dict, 'single_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)
|
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 = count_blocks(state_dict, 'transformer_blocks.{}.')
|
||||||
depth_single_blocks = count_blocks(state_dict, 'single_transformer_blocks.{}.')
|
depth_single_blocks = count_blocks(state_dict, 'single_transformer_blocks.{}.')
|
||||||
hidden_size = state_dict["x_embedder.bias"].shape[0]
|
hidden_size = state_dict["x_embedder.bias"].shape[0]
|
||||||
|
Loading…
Reference in New Issue
Block a user