diff --git a/nodes.py b/nodes.py index 851e281..25183a2 100644 --- a/nodes.py +++ b/nodes.py @@ -426,7 +426,8 @@ class WanVideoModelLoader: new_key = key.replace("model.diffusion_model.", "", 1) new_sd[new_key] = value sd = new_sd - + if not "patch_embedding.weight" in sd: + raise ValueError("Invalid WanVideo model selected") dim = sd["patch_embedding.weight"].shape[0] in_channels = sd["patch_embedding.weight"].shape[1] print("in_channels: ", in_channels)