{"record":{"id":"05ec8291267f6b4f","repo":"LykosAI/StabilityMatrix","slug":"no-clip-model-selected","errorCode":null,"errorMessage":"No Clip Model Selected","messagePattern":"No Clip Model Selected","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Avalonia/ViewModels/Inference/WanModelCardViewModel.cs","lineNumber":211,"sourceCode":"                        SelectedModel?.RelativePath ?? throw new ValidationException(\"Model not selected\"),\n                    WeightDtype = SelectedDType ?? \"fp8_e4m3fn_fast\",\n                }\n            );\n        }\n        \n        var modelSamplingSd3 = e.Nodes.AddTypedNode(\n            new ComfyNodeBuilder.ModelSamplingSD3\n            {\n                Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.ModelSamplingSD3)),\n                Model = modelLoader.Output,\n                Shift = Shift,\n            }\n        );\n\n        e.Builder.Connections.Base.Model = modelSamplingSd3.Output;\n        \n        var clipName =\n            SelectedClipModel?.RelativePath ?? throw new ValidationException(\"No Clip Model Selected\");\n\n        // The GGUF loader variant can also load .safetensors encoders\n        var clipOutput = SelectedClipModel is { IsGguf: true }\n            ? e\n                .Nodes.AddTypedNode(\n                    new ComfyNodeBuilder.CLIPLoaderGGUF\n                    {\n                        Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.CLIPLoaderGGUF)),\n                        ClipName = clipName,\n                        Type = \"wan\",\n                    }\n                )\n                .Output\n            : e\n                .Nodes.AddTypedNode(\n                    new ComfyNodeBuilder.CLIPLoader\n                    {\n                        Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.CLIPLoader)),","sourceCodeStart":193,"sourceCodeEnd":229,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Avalonia/ViewModels/Inference/WanModelCardViewModel.cs#L193-L229","documentation":"When building the Wan workflow's text-encoder stage, the card requires a CLIP/umt5 text-encoder model selection. If SelectedClipModel is null, SelectedClipModel?.RelativePath is null and the builder throws 'No Clip Model Selected' rather than creating a CLIPLoader with an empty name. This validates that every required loader node has a concrete file.","triggerScenarios":"Generating a Wan workflow without selecting a CLIP/umt5 text encoder in the model card, hitting WanModelCardViewModel.cs:211.","commonSituations":"User picked the unet and VAE but skipped the text-encoder dropdown; the umt5 t5 encoder file is not in the shared clip/text_encoders folder; saved workflow's clip path no longer resolves after a file move.","solutions":["Select a CLIP text encoder (e.g. umt5-xxl) in the Wan model card's clip dropdown before generating.","Ensure the encoder .safetensors/.gguf is placed in the shared text_encoders (clip) folder and rescan if missing.","Re-pick the encoder after moving/restoring files, then save the workflow."],"exampleFix":"// before\nvar clipName = SelectedClipModel?.RelativePath ?? throw new ValidationException(\"No Clip Model Selected\");\n// after\nif (SelectedClipModel is null)\n    throw new ValidationException(\"No Clip Model Selected\");\nvar clipName = SelectedClipModel.RelativePath;","handlingStrategy":"validation","validationCode":"if (card.SelectedClipModel is null)\n    throw new ValidationException(\"No Clip Model Selected\");","typeGuard":"bool HasClip(WanModelCardViewModel c) => c.SelectedClipModel != null && !string.IsNullOrEmpty(c.SelectedClipModel.RelativePath);","tryCatchPattern":"try { card.ApplyStep(e); }\ncatch (ValidationException ex) when (ex.Message == \"No Clip Model Selected\")\n{ /* prompt user to choose a text encoder */ }","preventionTips":["Treat text-encoder selection as a mandatory field in Wan workflows","Check the clip folder is indexed before showing generate UI","Re-validate saved clip paths on workflow load","Group all required selections in one pre-flight check"],"tags":["comfyui","workflow-validation","clip","text-encoder"],"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"}