better error for VACE module loading

This commit is contained in:
kijai
2025-05-14 18:23:37 +03:00
parent 555c67a8cd
commit 6aec1d97a8
+3
View File
@@ -534,6 +534,9 @@ class WanVideoModelLoader:
model_path = folder_paths.get_full_path_or_raise("diffusion_models", model)
sd = load_torch_file(model_path, device=transformer_load_device, safe_load=True)
if "vace_blocks.0.after_proj.weight" in sd and not "patch_embedding.weight" in sd:
raise ValueError("You are attempting to load a VACE module as a WanVideo model, instead you should use the vace_model input and matching T2V base model")
if vace_model is not None:
vace_sd = load_torch_file(vace_model["path"], device=transformer_load_device, safe_load=True)