{"record":{"id":"8f7527ba3781e309","repo":"LykosAI/StabilityMatrix","slug":"no-clip-vision-model-selected","errorCode":null,"errorMessage":"No Clip Vision Model Selected","messagePattern":"No Clip Vision Model Selected","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Avalonia/ViewModels/Inference/WanModelCardViewModel.cs","lineNumber":262,"sourceCode":"        );\n        e.Builder.Connections.Base.VAE = vaeLoader.Output;\n        e.Builder.Connections.PrimaryVAE = vaeLoader.Output;\n\n        if (ExtraNetworksStackCardViewModel.Cards.OfType<LoraModule>().Any(x => x.IsEnabled))\n        {\n            ExtraNetworksStackCardViewModel.ApplyStep(e);\n        }\n\n        if (!IsClipVisionEnabled)\n            return;\n\n        var clipVisionLoader = e.Nodes.AddTypedNode(\n            new ComfyNodeBuilder.CLIPVisionLoader\n            {\n                Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.CLIPVisionLoader)),\n                ClipName =\n                    SelectedClipVisionModel?.RelativePath\n                    ?? throw new ValidationException(\"No Clip Vision Model Selected\"),\n            }\n        );\n\n        e.Builder.Connections.BaseClipVision = clipVisionLoader.Output;\n        e.Builder.Connections.Base.ClipVision = clipVisionLoader.Output;\n    }\n\n    public void LoadStateFromParameters(GenerationParameters parameters)\n    {\n        if (parameters.ModelName is not { } paramsModelName)\n            return;\n\n        var currentModels = ClientManager.UnetModels;\n\n        HybridModelFile? model;\n\n        // First try hash match\n        if (parameters.ModelHash is not null)","sourceCodeStart":244,"sourceCodeEnd":280,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Avalonia/ViewModels/Inference/WanModelCardViewModel.cs#L244-L280","documentation":"The Wan workflow (image-to-video path) also requires a CLIP Vision model for image conditioning. If SelectedClipVisionModel is null, its RelativePath projection is null and the builder throws 'No Clip Vision Model Selected' rather than creating a CLIPVisionLoader with an empty name. This keeps incomplete graphs from being submitted to ComfyUI.","triggerScenarios":"Generating a Wan image-to-video workflow without selecting a CLIP Vision model in the card's clip-vision dropdown, hitting WanModelCardViewModel.cs:262.","commonSituations":"User selected the text encoder but missed the separate clip_vision dropdown; the clip_vision file (e.g. clip_vision_h) is missing from the shared clip_vision folder; a saved workflow's clip-vision path no longer resolves after file reorganization.","solutions":["Select a CLIP Vision model (e.g. clip_vision_h.safetensors) in the Wan model card before generating i2v workflows.","Download/place the CLIP Vision file in the shared clip_vision folder and refresh the model list.","Re-open the workflow, re-pick the clip vision model, and save so the path persists."],"exampleFix":"// before\nClipName = SelectedClipVisionModel?.RelativePath\n           ?? throw new ValidationException(\"No Clip Vision Model Selected\"),\n// after\nif (SelectedClipVisionModel is null)\n    throw new ValidationException(\"No Clip Vision Model Selected\");\n// then: ClipName = SelectedClipVisionModel.RelativePath","handlingStrategy":"validation","validationCode":"if (card.SelectedClipVisionModel is null)\n    throw new ValidationException(\"No Clip Vision Model Selected\");","typeGuard":"bool HasClipVision(WanModelCardViewModel c) => c.SelectedClipVisionModel != null && !string.IsNullOrEmpty(c.SelectedClipVisionModel.RelativePath);","tryCatchPattern":"try { card.ApplyStep(e); }\ncatch (ValidationException ex) when (ex.Message == \"No Clip Vision Model Selected\")\n{ /* prompt user to choose a clip vision model */ }","preventionTips":["Show the clip-vision dropdown only for i2v workflows but enforce it there","Ship guidance on which clip_vision file pairs with Wan models","Verify the clip_vision folder is indexed before enabling generate","Re-validate all saved selections on workflow open"],"tags":["comfyui","workflow-validation","clip-vision","image-to-video"],"backgroundTag":"missing-required-option","analyzedSha":"af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002","analyzedAt":"2026-09-12T19:02:43.389Z","contentChangedAt":"2026-09-12T19:02:43.389Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}