{"record":{"id":"e449fd877bee19cd","repo":"LykosAI/StabilityMatrix","slug":"no-clip1-selected","errorCode":null,"errorMessage":"No Clip1 Selected","messagePattern":"No Clip1 Selected","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs","lineNumber":1690,"sourceCode":"                }\n            );\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","sourceCodeStart":1672,"sourceCodeEnd":1708,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs#L1672-L1708","documentation":"When the selected CLIP type is \"flux\", the builder needs a DualCLIPLoader (or GGUF variant) with two text-encoder files; it throws when SelectedClip1 is null so its RelativePath cannot be resolved. This fail-fast check precedes wiring Connections.Base.Clip.","triggerScenarios":"Building a Flux workflow with SelectedClipType == \"flux\" while the first CLIP slot (clip_l / T5 slot) has no selection, i.e. SelectedClip1 is null.","commonSituations":"Fresh Flux preset where the user set the model and VAE but not the two CLIP files; saved workflow whose clip_l file was moved/deleted; switching to Flux mode which newly requires the dual CLIP selection.","solutions":["Select the first CLIP/text-encoder file (e.g. clip_l.safetensors) in the Model card's Clip1 slot","Also select Clip2 and Clip Type since Flux needs the complete dual-CLIP setup","Re-select from the Model Manager if the CLIP file was renamed, moved, or deleted"],"exampleFix":"// before\nvar clipName1 = SelectedClip1?.RelativePath ?? throw new ValidationException(\"No Clip1 Selected\");\n// after\nif (SelectedClip1 is null)\n{\n    NotificationHelper.Warn(\"Select the primary CLIP model (clip_l)\");\n    return;\n}\nvar clipName1 = SelectedClip1.RelativePath;","handlingStrategy":"validation","validationCode":"if (vm.SelectedClipType == \"flux\" && vm.SelectedClip1 is null)\n    throw new InvalidOperationException(\"Flux requires Clip1 (e.g. clip_l) to be selected\");","typeGuard":"bool HasClip1(ModelCardViewModel vm) => vm.SelectedClip1 is { RelativePath.Length: > 0 };","tryCatchPattern":"try { builder.ApplyStep(e); } catch (ValidationException ex) when (ex.Message == \"No Clip1 Selected\") { NotifyUser(\"Select the primary CLIP model for Flux\"); }","preventionTips":["When enabling Flux mode, set both CLIP slots immediately","Verify clip_l exists in the Model Manager before starting a Flux run","Validate imported Flux templates for both CLIP selections"],"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"}