{"record":{"id":"d663f1c0acddc331","repo":"LykosAI/StabilityMatrix","slug":"no-vae-selected","errorCode":null,"errorMessage":"No VAE Selected","messagePattern":"No VAE Selected","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs","lineNumber":1682,"sourceCode":"        if (SelectedModelLoader is ModelLoader.Unet && IsHiDreamWorkflow)\n        {\n            var modelSamplingSd3 = e.Nodes.AddTypedNode(\n                new ComfyNodeBuilder.ModelSamplingSD3\n                {\n                    Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.ModelSamplingSD3)),\n                    Model = e.Builder.Connections.Base.Model,\n                    Shift = Shift,\n                }\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,","sourceCodeStart":1664,"sourceCodeEnd":1700,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Avalonia/ViewModels/Inference/ModelCardViewModel.cs#L1664-L1700","documentation":"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.","triggerScenarios":"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.","commonSituations":"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.","solutions":["Select a VAE in the Model card's VAE dropdown before running the generation","If the model bundles its own VAE, choose the workflow variant that uses the checkpoint's built-in VAE instead of a separate VAELoader","Re-add or re-select the VAE if its file was deleted/renamed in the Model Manager"],"exampleFix":"// before\nVaeName = SelectedVae?.RelativePath ?? throw new ValidationException(\"No VAE Selected\")\n// after\nif (SelectedVae is null)\n{\n    NotificationHelper.Warn(\"Select a VAE before generating\");\n    return;\n}\nVaeName = SelectedVae.RelativePath","handlingStrategy":"validation","validationCode":"if (vm.SelectedVae is null || string.IsNullOrEmpty(vm.SelectedVae.RelativePath))\n    throw new InvalidOperationException(\"Select a VAE before building the workflow\");","typeGuard":"bool HasVae(ModelCardViewModel vm) => vm.SelectedVae is { RelativePath.Length: > 0 };","tryCatchPattern":"try { builder.ApplyStep(e); } catch (ValidationException ex) when (ex.Message == \"No VAE Selected\") { NotifyUser(\"Choose a VAE in the Model card\"); }","preventionTips":["Confirm the VAE dropdown has a value when the workflow uses a separate VAELoader","Turn off VAE override if the checkpoint has a built-in VAE","Re-validate saved workflows after VAE files are moved or deleted"],"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"}