LykosAI/StabilityMatrix · error · ValidationException
No VAE Selected
Error message
No VAE Selected
What it means
Thrown in UnetModelCardViewModel.ApplyStep when building a UNet (e.g. SDXL/Flux/GGUF) checkpoint workflow and no VAE file is selected in the card. The workflow includes a VAELoader node that requires a VaeName, so a null SelectedVae aborts graph construction with this ValidationException.
Solutions
- Select a VAE file in the VAE dropdown of the UNet model card (e.g. sdxl_vae.safetensors)
- Download/import a VAE into the models/vae folder via Model Manager if none is installed
- Re-point the preset to an installed VAE if the previously selected one was removed
Example fix
// before
await vm.ApplyStep(args); // SelectedVae null -> throws
// after
if (vm.SelectedVae is null) { throw new ValidationException("Pick a VAE in the model card first"); }
await vm.ApplyStep(args); Defensive patterns
Strategy: validation
Validate before calling
if (vm.SelectedVae is null)
throw new ValidationException("Select a VAE in the UNet model card before generating"); Type guard
bool hasVae = vm.SelectedVae is not null;
Try / catch
try { vm.ApplyStep(args); }
catch (ValidationException ex) when (ex.Message == "No VAE Selected") { /* surface VAE picker */ } Prevention
- Download a matching VAE whenever you install a UNet model
- Disable Generate until all required model dropdowns are set
- Check presets for VAE entries that no longer exist on disk
When it happens
Trigger: ApplyStep executed with SelectedVae == null at the point the ComfyNodeBuilder.VAELoader node is added (VaeName = SelectedVae?.RelativePath ?? throw).
Common situations: Fresh install or new model directory where no VAE has been downloaded/selected; user cleared the VAE dropdown; preset referencing a VAE that is no longer installed.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
- Model not selected
- No VAE Selected
- Length cannot be null when latentType is Hunyuan
- Flux.2 VAE model not found
- Flux VAE model not found
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/98dc2fdf01505eea.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Avalonia/ViewModels/Inference/UnetModelCardViewModel.cs:70
var dialog = DialogHelper.CreateMarkdownDialog(
"Please select a model to continue.",
"No Model Selected"
);
await dialog.ShowAsync();
return false;
}
public void ApplyStep(ModuleApplyStepEventArgs e)
{
var checkpointLoader = e.Nodes.AddTypedNode(GetModelLoader(e, SelectedModel!, SelectedDType));
e.Builder.Connections.Base.Model = checkpointLoader.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;
// 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");
e.Builder.Connections.Base.Clip =
SelectedClip1 is { IsGguf: true } || SelectedClip2 is { IsGguf: true }
? e
.Nodes.AddTypedNode(
new ComfyNodeBuilder.DualCLIPLoaderGGUF
{
Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.DualCLIPLoaderGGUF)),
ClipName1 = clipName1,
ClipName2 = clipName2,
Type = "flux",View on GitHub (pinned to af93d6ef57)