{"record":{"id":"350864787ab2eb03","repo":"LykosAI/StabilityMatrix","slug":"no-vae-selected-wanmodelcardviewmodel","errorCode":null,"errorMessage":"No VAE Selected","messagePattern":"No VAE Selected","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Avalonia/ViewModels/Inference/WanModelCardViewModel.cs","lineNumber":242,"sourceCode":"                .Output\n            : e\n                .Nodes.AddTypedNode(\n                    new ComfyNodeBuilder.CLIPLoader\n                    {\n                        Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.CLIPLoader)),\n                        ClipName = clipName,\n                        Type = \"wan\",\n                    }\n                )\n                .Output;\n\n        e.Builder.Connections.Base.Clip = clipOutput;\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        e.Builder.Connections.PrimaryVAE = vaeLoader.Output;\n\n        if (ExtraNetworksStackCardViewModel.Cards.OfType<LoraModule>().Any(x => x.IsEnabled))\n        {\n            ExtraNetworksStackCardViewModel.ApplyStep(e);\n        }\n\n        if (!IsClipVisionEnabled)\n            return;\n\n        var clipVisionLoader = e.Nodes.AddTypedNode(\n            new ComfyNodeBuilder.CLIPVisionLoader\n            {\n                Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.CLIPVisionLoader)),\n                ClipName =","sourceCodeStart":224,"sourceCodeEnd":260,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Avalonia/ViewModels/Inference/WanModelCardViewModel.cs#L224-L260","documentation":"Building the Wan workflow's VAE stage requires a selected VAE file. If SelectedVae is null, SelectedVae?.RelativePath is null and the builder throws 'No VAE Selected' instead of creating a VAELoader with an empty VaeName. It is a pre-flight validation done on the client so ComfyUI never sees an invalid graph.","triggerScenarios":"Generating a Wan workflow with no VAE selected in the model card's VAE dropdown, hitting WanModelCardViewModel.cs:242.","commonSituations":"User assumed the checkpoint embeds its VAE and skipped the dropdown; the .safetensors VAE file was deleted or moved out of the shared vae folder; a saved workflow references a VAE path that no longer resolves.","solutions":["Select a VAE (e.g. Wan VAE file) in the model card's VAE dropdown before generating.","Place the VAE .safetensors in the shared vae folder and refresh the model list if it does not appear.","Re-select and re-save the workflow after files were moved or restored.","If the workflow legitimately needs no external VAE, use a card/workflow variant that does not require a VAE loader selection."],"exampleFix":"// before\nVaeName = SelectedVae?.RelativePath ?? throw new ValidationException(\"No VAE Selected\"),\n// after\nif (SelectedVae is null)\n    throw new ValidationException(\"No VAE Selected\");\n// then: VaeName = SelectedVae.RelativePath","handlingStrategy":"validation","validationCode":"if (card.SelectedVae is null)\n    throw new ValidationException(\"No VAE Selected\");","typeGuard":"bool HasVae(WanModelCardViewModel c) => c.SelectedVae != null && !string.IsNullOrEmpty(c.SelectedVae.RelativePath);","tryCatchPattern":"try { card.ApplyStep(e); }\ncatch (ValidationException ex) when (ex.Message == \"No VAE Selected\")\n{ /* prompt user to choose a VAE */ }","preventionTips":["Mark VAE dropdown as required unless the workflow variant omits it","Validate file existence after any model-folder reorganization","Include VAE in a single pre-apply validation of all selections","Re-resolve saved VAE paths on workflow load"],"tags":["comfyui","workflow-validation","vae","model-selection"],"backgroundTag":"missing-required-option","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"}