LykosAI/StabilityMatrix · error · ValidationException
No Clip Type Selected
Error message
No Clip Type Selected
What it means
The Flux dual-CLIP branch also requires an explicit clip type string; when SelectedClipType is null the builder cannot decide between the standard DualCLIPLoader and the GGUF variant, so it throws. Note the guard `SelectedClipType == "flux"` passed, meaning the null case arises when the property holds "flux" but the later local re-read (`SelectedClipType ?? throw`) still treats the nullable as possibly empty.
Solutions
- Set the Clip Type dropdown (e.g. "flux") in the Model card so SelectedClipType has a value before generating
- Re-load or repair the workflow/preset that is missing the clip type field
- If driving programmatically, assign SelectedClipType before invoking the build step
Example fix
// before
var clipType = SelectedClipType ?? throw new ValidationException("No Clip Type Selected");
// after
if (string.IsNullOrEmpty(SelectedClipType))
{
NotificationHelper.Warn("Select a CLIP type");
return;
}
var clipType = SelectedClipType; Defensive patterns
Strategy: validation
Validate before calling
if (string.IsNullOrEmpty(vm.SelectedClipType))
throw new InvalidOperationException("Select a Clip Type before building the workflow"); Type guard
bool HasClipType(ModelCardViewModel vm) => !string.IsNullOrEmpty(vm.SelectedClipType);
Try / catch
try { builder.ApplyStep(e); } catch (ValidationException ex) when (ex.Message == "No Clip Type Selected") { NotifyUser("Choose the CLIP type in the Model card"); } Prevention
- Never clear the Clip Type dropdown once a CLIP-dependent workflow is configured
- Validate that templates carry a clip type field on import
- Reset the whole card rather than individual fields to keep bindings consistent
When it happens
Trigger: Building a Flux workflow when SelectedClipType is null/empty at the point the clipType local is assigned — e.g. the Clip Type dropdown was cleared or never persisted after selecting flux mode.
Common situations: Custom workflows/templates missing the clip type field; binding/serialization of the ViewModel state dropped the selection; user reset the card while remaining in a flux-shaped graph.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- No VAE Selected
- No Clip1 Selected
- No Clip2 Selected
- Refiner Model enabled but not selected
- VAE enabled but not selected
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/40b351bd0cc80119.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs:1692
e.Builder.Connections.Base.Model = modelSamplingSd3.Output;
}
var vaeLoader = e.Nodes.AddTypedNode(
new ComfyNodeBuilder.VAELoader
{
Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.VAELoader)),
VaeName = SelectedVae?.RelativePath ?? throw new ValidationException("No VAE Selected"),
}
);
e.Builder.Connections.Base.VAE = vaeLoader.Output;
if (SelectedClipType == "flux")
{
// DualCLIPLoader (GGUF variant can also load .safetensors, so any gguf pick routes there)
var clipName1 = SelectedClip1?.RelativePath ?? throw new ValidationException("No Clip1 Selected");
var clipName2 = SelectedClip2?.RelativePath ?? throw new ValidationException("No Clip2 Selected");
var clipType = SelectedClipType ?? throw new ValidationException("No Clip Type Selected");
e.Builder.Connections.Base.Clip = AnyClipIsGguf(SelectedClip1, SelectedClip2)
? e
.Nodes.AddTypedNode(
new ComfyNodeBuilder.DualCLIPLoaderGGUF
{
Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.DualCLIPLoaderGGUF)),
ClipName1 = clipName1,
ClipName2 = clipName2,
Type = clipType,
}
)
.Output
: e
.Nodes.AddTypedNode(
new ComfyNodeBuilder.DualCLIPLoader
{
Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.DualCLIPLoader)),View on GitHub (pinned to af93d6ef57)