Skip to content

Commit 1c2d45d

Browse files
Fix typo in last PR. (Comfy-Org#8144)
More robust model detection for future proofing.
1 parent c820ef9 commit 1c2d45d

File tree

3 files changed

+5
-3
lines changed

3 files changed

+5
-3
lines changed

comfy/model_detection.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -361,6 +361,8 @@ def detect_unet_config(state_dict, key_prefix, metadata=None):
361361
dit_config["model_type"] = "vace"
362362
dit_config["vace_in_dim"] = state_dict['{}vace_patch_embedding.weight'.format(key_prefix)].shape[1]
363363
dit_config["vace_layers"] = count_blocks(state_dict_keys, '{}vace_blocks.'.format(key_prefix) + '{}.')
364+
elif '{}control_adapter.conv.weight'.format(key_prefix) in state_dict_keys:
365+
dit_config["model_type"] = "camera"
364366
else:
365367
if '{}img_emb.proj.0.bias'.format(key_prefix) in state_dict_keys:
366368
dit_config["model_type"] = "i2v"

comfy/supported_models.py

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -995,7 +995,7 @@ def get_model(self, state_dict, prefix="", device=None):
995995
class WAN21_Camera(WAN21_T2V):
996996
unet_config = {
997997
"image_model": "wan2.1",
998-
"model_type": "i2v",
998+
"model_type": "camera",
999999
"in_dim": 32,
10001000
}
10011001

comfy_extras/nodes_camera_trajectory.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -148,7 +148,7 @@ def compute_R_form_rad_angle(angles):
148148
RT = np.stack(RT)
149149
return RT
150150

151-
class WanCameraEmbeding:
151+
class WanCameraEmbedding:
152152
@classmethod
153153
def INPUT_TYPES(cls):
154154
return {
@@ -214,5 +214,5 @@ def run(self, camera_pose, width, height, length, speed=1.0, fx=0.5, fy=0.5, cx
214214

215215

216216
NODE_CLASS_MAPPINGS = {
217-
"WanCameraEmbeding": WanCameraEmbeding,
217+
"WanCameraEmbedding": WanCameraEmbedding,
218218
}

0 commit comments

Comments
 (0)