LykosAI/StabilityMatrix · error · ValidationException

No VAE Selected

Error message

No VAE Selected

What it means

Same ValidationException family as the model check: when building the workflow, a VAELoader node is required but SelectedVae is null, so SelectedVae?.RelativePath is null and the builder throws instead of wiring Connections.Base.VAE to a nonexistent loader.

Solutions

  1. Select a VAE in the Model card's VAE dropdown before running the generation
  2. If the model bundles its own VAE, choose the workflow variant that uses the checkpoint's built-in VAE instead of a separate VAELoader
  3. Re-add or re-select the VAE if its file was deleted/renamed in the Model Manager

Example fix

// before
VaeName = SelectedVae?.RelativePath ?? throw new ValidationException("No VAE Selected")
// after
if (SelectedVae is null)
{
    NotificationHelper.Warn("Select a VAE before generating");
    return;
}
VaeName = SelectedVae.RelativePath
Defensive patterns

Strategy: validation

Validate before calling

if (vm.SelectedVae is null || string.IsNullOrEmpty(vm.SelectedVae.RelativePath))
    throw new InvalidOperationException("Select a VAE before building the workflow");

Type guard

bool HasVae(ModelCardViewModel vm) => vm.SelectedVae is { RelativePath.Length: > 0 };

Try / catch

try { builder.ApplyStep(e); } catch (ValidationException ex) when (ex.Message == "No VAE Selected") { NotifyUser("Choose a VAE in the Model card"); }

Prevention

When it happens

Trigger: Building/generating a workflow (e.g. Flux path right after the checkpoint loader) when the VAE dropdown in the Model card has no selection: SelectedVae is null.

Common situations: Preset or saved workflow loaded with the VAE field empty; user switched workflows/modes and the VAE selection reset; VAE file removed from the model directory after selection.

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


AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12). Data as JSON: /api/errors/d663f1c0acddc331. Report an issue: GitHub.

Appendix: source

Thrown at StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs:1682

        if (SelectedModelLoader is ModelLoader.Unet && IsHiDreamWorkflow)
        {
            var modelSamplingSd3 = e.Nodes.AddTypedNode(
                new ComfyNodeBuilder.ModelSamplingSD3
                {
                    Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.ModelSamplingSD3)),
                    Model = e.Builder.Connections.Base.Model,
                    Shift = Shift,
                }
            );

            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,

View on GitHub (pinned to af93d6ef57)