{"record":{"id":"7d2ce98f90a23ab9","repo":"LykosAI/StabilityMatrix","slug":"no-clip3-selected","errorCode":null,"errorMessage":"No Clip3 Selected","messagePattern":"No Clip3 Selected","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs","lineNumber":1805,"sourceCode":"\n            e.Builder.Connections.PrimaryVAE = vaeLoader.Output;\n        }\n    }\n\n    private void SetupClipLoaders(ModuleApplyStepEventArgs e)\n    {\n        // The GGUF loader variants can also load .safetensors encoders, so any gguf pick\n        // routes the whole (possibly mixed) selection through the GGUF loader\n        if (\n            SelectedClip4 is { IsNone: false }\n            && SelectedClip3 is { IsNone: false }\n            && SelectedClip2 is { IsNone: false }\n            && SelectedClip1 is { IsNone: false }\n        )\n        {\n            var clipName1 = SelectedClip1?.RelativePath ?? throw new ValidationException(\"No Clip1 Selected\");\n            var clipName2 = SelectedClip2?.RelativePath ?? throw new ValidationException(\"No Clip2 Selected\");\n            var clipName3 = SelectedClip3?.RelativePath ?? throw new ValidationException(\"No Clip3 Selected\");\n            var clipName4 = SelectedClip4?.RelativePath ?? throw new ValidationException(\"No Clip4 Selected\");\n\n            e.Builder.Connections.Base.Clip = AnyClipIsGguf(\n                SelectedClip1,\n                SelectedClip2,\n                SelectedClip3,\n                SelectedClip4\n            )\n                ? e\n                    .Nodes.AddTypedNode(\n                        new ComfyNodeBuilder.QuadrupleCLIPLoaderGGUF\n                        {\n                            Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.QuadrupleCLIPLoaderGGUF)),\n                            ClipName1 = clipName1,\n                            ClipName2 = clipName2,\n                            ClipName3 = clipName3,\n                            ClipName4 = clipName4,\n                        }","sourceCodeStart":1787,"sourceCodeEnd":1823,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs#L1787-L1823","documentation":"Identical ValidationException backstop for the third CLIP slot in the 4-CLIP branch of ModelCardViewModel's workflow builder. The `SelectedClip3?.RelativePath ?? throw` fires if SelectedClip3 is null when the QuadCLIPLoaderGGUF node is being built, meaning no third CLIP model file was chosen.","triggerScenarios":"Building the inference graph with SelectedClip3 null/unassigned while Clip1, Clip2, Clip4 are set; or the observable SelectedClip3 property mutating to null between the branch guard and the node construction.","commonSituations":"Checkpoints requiring three or four text encoders where the user fills only some slots; cleared or failed model downloads leaving a slot empty; state desync in the card view model after preset changes.","solutions":["Assign a valid CLIP model to the Clip3 slot before starting generation","Ensure the model card expects a 3/4-encoder layout and populate all required CLIP slots","Snapshot the SelectedClip3 value into a local before the guard to eliminate null re-evaluation races","Pre-validate all SelectedClipN properties and surface a friendly UI message instead of an exception at build time"],"exampleFix":"// before\nvar clipName3 = SelectedClip3?.RelativePath ?? throw new ValidationException(\"No Clip3 Selected\");\n// after\nvar clip3 = SelectedClip3;\nvar clipName3 = clip3?.RelativePath ?? throw new ValidationException(\"Clip3 is required for this checkpoint - select a CLIP model in slot 3\");","handlingStrategy":"validation","validationCode":"if (SelectedClip3 is null or { IsNone: true })\n    throw new ValidationException(\"Clip3 must be selected for this checkpoint\");","typeGuard":"static bool HasClip(LazyFileReference? clip) => clip is { IsNone: false };","tryCatchPattern":"try\n{\n    await viewModel.BuildWorkspaceAsync(e);\n}\ncatch (ValidationException ex) when (ex.Message.Contains(\"Clip3\"))\n{\n    NotificationService.ShowPersistent(\"Missing CLIP 3\", ex.Message, NotificationType.Error);\n}","preventionTips":["Fill every text-encoder slot the checkpoint layout requires","Re-verify selections after loading presets or switching checkpoints","Surface per-slot validation in the UI before building the graph"],"tags":["validation","workflow","comfyui","ui-state"],"backgroundTag":"missing-required-argument","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"}