diff --git a/example_workflows/wanvideo_Fun_control_example_01.json b/example_workflows/wanvideo_Fun_control_example_01.json index b82253c..fbbf269 100644 --- a/example_workflows/wanvideo_Fun_control_example_01.json +++ b/example_workflows/wanvideo_Fun_control_example_01.json @@ -427,7 +427,7 @@ "title": "Model download links", "properties": {}, "widgets_values": [ - "1.3B:\n\n[https://huggingface.co/alibaba-pai/Wan2.1-Fun-1.3B-InP/blob/main/diffusion_pytorch_model.safetensors](https://huggingface.co/alibaba-pai/Wan2.1-Fun-1.3B-InP/blob/main/diffusion_pytorch_model.safetensors)\n\n14B:\n\n[https://huggingface.co/alibaba-pai/Wan2.1-Fun-14B-InP/blob/main/diffusion_pytorch_model.safetensors](https://huggingface.co/alibaba-pai/Wan2.1-Fun-14B-InP/blob/main/diffusion_pytorch_model.safetensors)" + "1.3B:\n\n[https://huggingface.co/alibaba-pai/Wan2.1-Fun-1.3B-Control/blob/main/diffusion_pytorch_model.safetensors](https://huggingface.co/alibaba-pai/Wan2.1-Fun-1.3B-Control/blob/main/diffusion_pytorch_model.safetensors)\n\n14B:\n\n[https://huggingface.co/alibaba-pai/Wan2.1-Fun-14B-Control/blob/main/diffusion_pytorch_model.safetensors](https://huggingface.co/alibaba-pai/Wan2.1-Fun-14B-Control/blob/main/diffusion_pytorch_model.safetensors)" ], "color": "#432", "bgcolor": "#653" diff --git a/nodes.py b/nodes.py index 08f9ec5..e1ee5f6 100644 --- a/nodes.py +++ b/nodes.py @@ -1769,6 +1769,8 @@ class WanVideoSampler: control_embeds = image_embeds.get("control_embeds", None) if control_embeds is not None: + if transformer.in_dim != 48: + raise ValueError("Control signal only works with Fun-Control model") control_latents = control_embeds["control_images"].to(device) control_start_percent = control_embeds.get("start_percent", 0.0) control_end_percent = control_embeds.get("end_percent", 1.0) @@ -1788,7 +1790,6 @@ class WanVideoSampler: control_embeds = image_embeds.get("control_embeds", None) if control_embeds is not None: - transformer.model_type = "t2v" control_latents = control_embeds["control_images"].to(device) if control_lora: image_cond = control_latents.to(device) @@ -1797,6 +1798,8 @@ class WanVideoSampler: patcher = apply_lora(patcher, device, device, low_mem_load=False) patcher.model.is_patched = True else: + if transformer.in_dim != 48: + raise ValueError("Control signal only works with Fun-Control model") image_cond = torch.zeros_like(control_latents).to(device) #fun control clip_fea = None