{"record":{"id":"bd67fa1df2bfea22","repo":"LykosAI/StabilityMatrix","slug":"model-not-selected-svdimgtovidconditioningviewmodel","errorCode":null,"errorMessage":"Model not selected","messagePattern":"Model not selected","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Avalonia/ViewModels/Inference/Video/SvdImgToVidConditioningViewModel.cs","lineNumber":75,"sourceCode":"        return parameters with\n        {\n            FrameCount = NumFrames,\n            MotionBucketId = MotionBucketId,\n            Fps = Fps,\n            AugmentationLevel = AugmentationLevel,\n            MinCfg = MinCfg,\n        };\n    }\n\n    public void ApplyStep(ModuleApplyStepEventArgs e)\n    {\n        // do VideoLinearCFGGuidance stuff first\n        var cfgGuidanceNode = e.Nodes.AddTypedNode(\n            new ComfyNodeBuilder.VideoLinearCFGGuidance\n            {\n                Name = e.Nodes.GetUniqueName(\"LinearCfgGuidance\"),\n                Model =\n                    e.Builder.Connections.Base.Model ?? throw new ValidationException(\"Model not selected\"),\n                MinCfg = MinCfg\n            }\n        );\n\n        e.Builder.Connections.Base.Model = cfgGuidanceNode.Output;\n\n        // then do the SVD stuff\n        var svdImgToVidConditioningNode = e.Nodes.AddTypedNode(\n            new ComfyNodeBuilder.SVD_img2vid_Conditioning\n            {\n                ClipVision = e.Builder.Connections.BaseClipVision!,\n                InitImage = e.Builder.GetPrimaryAsImage(),\n                Vae = e.Builder.Connections.Base.VAE!,\n                Name = e.Nodes.GetUniqueName(\"SvdImgToVidConditioning\"),\n                Width = Width,\n                Height = Height,\n                VideoFrames = NumFrames,\n                MotionBucketId = MotionBucketId,","sourceCodeStart":57,"sourceCodeEnd":93,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Avalonia/ViewModels/Inference/Video/SvdImgToVidConditioningViewModel.cs#L57-L93","documentation":"Thrown in SvdImgToVidConditioningViewModel.ApplyStep when the VideoLinearCFGGuidance node is created but e.Builder.Connections.Base.Model is null — i.e. no upstream model card has produced a model output yet. SVD conditioning must chain from a loaded checkpoint, so a missing base model connection fails validation.","triggerScenarios":"ApplyStep executed with e.Builder.Connections.Base.Model == null when adding the ComfyNodeBuilder.VideoLinearCFGGuidance node (Model = ... ?? throw).","commonSituations":"The SVD model card step was skipped, disabled, or its ApplyStep failed, leaving Base.Model unset; cards ordered incorrectly in the workflow so the loader never ran; preset missing the model card entirely.","solutions":["Ensure the SVD/img2vid model card step runs before the conditioning step so Base.Model is populated","Select and load a checkpoint in the model card (fix any earlier 'Model not selected' failure)","Reorder or re-enable the model card module in the workflow before the conditioning module"],"exampleFix":"// before\nconditioningVm.ApplyStep(args); // Base.Model null -> throws\n// after\nif (args.Builder.Connections.Base.Model is null) { modelCardVm.ApplyStep(args); }\nconditioningVm.ApplyStep(args);","handlingStrategy":"try-catch","validationCode":"if (args.Builder.Connections.Base.Model is null)\n    throw new ValidationException(\"Run the model card step before SVD conditioning\");","typeGuard":"bool hasBaseModel = args.Builder.Connections.Base.Model is not null;","tryCatchPattern":"try { conditioningVm.ApplyStep(args); }\ncatch (ValidationException ex) when (ex.Message == \"Model not selected\") { /* run/repair the model card step first */ }","preventionTips":["Keep module order: model loader card before conditioning cards","Fix earlier 'Model not selected' failures before later steps","Never disable the model card when conditioning modules are active"],"tags":["validation","video","svd","pipeline-order"],"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"}