Fix typo in last PR. (#8144)

More robust model detection for future proofing.
This commit is contained in:
comfyanonymous 2025-05-15 16:02:19 -07:00 committed by GitHub
parent c820ef950d
commit 1c2d45d2b5
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
3 changed files with 5 additions and 3 deletions

View File

@ -361,6 +361,8 @@ def detect_unet_config(state_dict, key_prefix, metadata=None):
dit_config["model_type"] = "vace"
dit_config["vace_in_dim"] = state_dict['{}vace_patch_embedding.weight'.format(key_prefix)].shape[1]
dit_config["vace_layers"] = count_blocks(state_dict_keys, '{}vace_blocks.'.format(key_prefix) + '{}.')
elif '{}control_adapter.conv.weight'.format(key_prefix) in state_dict_keys:
dit_config["model_type"] = "camera"
else:
if '{}img_emb.proj.0.bias'.format(key_prefix) in state_dict_keys:
dit_config["model_type"] = "i2v"

View File

@ -995,7 +995,7 @@ class WAN21_FunControl2V(WAN21_T2V):
class WAN21_Camera(WAN21_T2V):
unet_config = {
"image_model": "wan2.1",
"model_type": "i2v",
"model_type": "camera",
"in_dim": 32,
}

View File

@ -148,7 +148,7 @@ def get_camera_motion(angle, T, speed, n=81):
RT = np.stack(RT)
return RT
class WanCameraEmbeding:
class WanCameraEmbedding:
@classmethod
def INPUT_TYPES(cls):
return {
@ -214,5 +214,5 @@ class WanCameraEmbeding:
NODE_CLASS_MAPPINGS = {
"WanCameraEmbeding": WanCameraEmbeding,
"WanCameraEmbedding": WanCameraEmbedding,
}