Wan2.2 fun control support. (#9292)

This commit is contained in:
comfyanonymous
2025-08-12 20:26:33 -07:00
committed by GitHub
parent e1d4f36d8d
commit 560d38f34c
4 changed files with 91 additions and 1 deletions

View File

@@ -373,6 +373,11 @@ def detect_unet_config(state_dict, key_prefix, metadata=None):
flf_weight = state_dict.get('{}img_emb.emb_pos'.format(key_prefix))
if flf_weight is not None:
dit_config["flf_pos_embed_token_number"] = flf_weight.shape[1]
ref_conv_weight = state_dict.get('{}ref_conv.weight'.format(key_prefix))
if ref_conv_weight is not None:
dit_config["in_dim_ref_conv"] = ref_conv_weight.shape[1]
return dit_config
if '{}latent_in.weight'.format(key_prefix) in state_dict_keys: # Hunyuan 3D