{"record":{"id":"d3fa2f072ad1a965","repo":"LykosAI/StabilityMatrix","slug":"no-clip2-selected","errorCode":null,"errorMessage":"No Clip2 Selected","messagePattern":"No Clip2 Selected","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs","lineNumber":1691,"sourceCode":"            );\n\n            e.Builder.Connections.Base.Model = modelSamplingSd3.Output;\n        }\n\n        var vaeLoader = e.Nodes.AddTypedNode(\n            new ComfyNodeBuilder.VAELoader\n            {\n                Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.VAELoader)),\n                VaeName = SelectedVae?.RelativePath ?? throw new ValidationException(\"No VAE Selected\"),\n            }\n        );\n        e.Builder.Connections.Base.VAE = vaeLoader.Output;\n\n        if (SelectedClipType == \"flux\")\n        {\n            // DualCLIPLoader (GGUF variant can also load .safetensors, so any gguf pick routes there)\n            var clipName1 = SelectedClip1?.RelativePath ?? throw new ValidationException(\"No Clip1 Selected\");\n            var clipName2 = SelectedClip2?.RelativePath ?? throw new ValidationException(\"No Clip2 Selected\");\n            var clipType = SelectedClipType ?? throw new ValidationException(\"No Clip Type Selected\");\n\n            e.Builder.Connections.Base.Clip = AnyClipIsGguf(SelectedClip1, SelectedClip2)\n                ? e\n                    .Nodes.AddTypedNode(\n                        new ComfyNodeBuilder.DualCLIPLoaderGGUF\n                        {\n                            Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.DualCLIPLoaderGGUF)),\n                            ClipName1 = clipName1,\n                            ClipName2 = clipName2,\n                            Type = clipType,\n                        }\n                    )\n                    .Output\n                : e\n                    .Nodes.AddTypedNode(\n                        new ComfyNodeBuilder.DualCLIPLoader\n                        {","sourceCodeStart":1673,"sourceCodeEnd":1709,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs#L1673-L1709","documentation":"Identical mechanism to the Clip1 check: Flux mode's DualCLIPLoader requires a second text encoder, and SelectedClip2 being null makes clipName2 unresolvable, so the builder throws ValidationException before wiring the CLIP connection.","triggerScenarios":"Building a Flux workflow (SelectedClipType == \"flux\") with Clip1 selected but the second CLIP slot (e.g. t5xxl) empty: SelectedClip2 is null.","commonSituations":"User picks clip_l but forgets the large T5 encoder file; T5 GGUF/safetensors file deleted or renamed after saving a workflow; templates copied between machines missing the second encoder.","solutions":["Select the second CLIP/text-encoder file (e.g. t5xxl_fp16.safetensors or its GGUF variant) in the Clip2 slot","Confirm both CLIP files exist in the Model Manager and re-select them if paths changed","Ensure disk space for the T5 encoder — a failed download can leave the slot empty"],"exampleFix":"// before\nvar clipName2 = SelectedClip2?.RelativePath ?? throw new ValidationException(\"No Clip2 Selected\");\n// after\nif (SelectedClip2 is null)\n{\n    NotificationHelper.Warn(\"Select the second CLIP model (T5)\");\n    return;\n}\nvar clipName2 = SelectedClip2.RelativePath;","handlingStrategy":"validation","validationCode":"if (vm.SelectedClipType == \"flux\" && vm.SelectedClip2 is null)\n    throw new InvalidOperationException(\"Flux requires Clip2 (e.g. t5xxl) to be selected\");","typeGuard":"bool HasClip2(ModelCardViewModel vm) => vm.SelectedClip2 is { RelativePath.Length: > 0 };","tryCatchPattern":"try { builder.ApplyStep(e); } catch (ValidationException ex) when (ex.Message == \"No Clip2 Selected\") { NotifyUser(\"Select the T5 CLIP model for Flux\"); }","preventionTips":["Keep the T5 encoder downloaded and selected alongside clip_l for Flux","Check disk space before downloads — partial T5 files break selection","Re-check both CLIP slots after switching between Flux and SD modes"],"tags":["validation","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"}