{"record":{"id":"3868b286a67bb94b","repo":"LykosAI/StabilityMatrix","slug":"model-not-selected-imgtovidmodelcardviewmodel","errorCode":null,"errorMessage":"Model not selected","messagePattern":"Model not selected","errorType":"validation","errorClass":"ValidationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Avalonia/ViewModels/Inference/Video/ImgToVidModelCardViewModel.cs","lineNumber":46,"sourceCode":"            clientManager,\n            vmFactory,\n            tabContext,\n            settingsManager,\n            modelIndexService,\n            notificationService,\n            modelOrganizationService\n        )\n    {\n        DisableSettings = true;\n    }\n\n    public override void ApplyStep(ModuleApplyStepEventArgs e)\n    {\n        var imgToVidLoader = e.Nodes.AddTypedNode(\n            new ComfyNodeBuilder.ImageOnlyCheckpointLoader\n            {\n                Name = \"ImageOnlyCheckpointLoader\",\n                CkptName = SelectedModel?.RelativePath ?? throw new ValidationException(\"Model not selected\"),\n            }\n        );\n\n        e.Builder.Connections.Base.Model = imgToVidLoader.Output1;\n        e.Builder.Connections.BaseClipVision = imgToVidLoader.Output2;\n        e.Builder.Connections.Base.VAE = imgToVidLoader.Output3;\n    }\n}\n","sourceCodeStart":28,"sourceCodeEnd":55,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Avalonia/ViewModels/Inference/Video/ImgToVidModelCardViewModel.cs#L28-L55","documentation":"Thrown in ImgToVidModelCardViewModel.ApplyStep when building an image-to-video workflow with an ImageOnlyCheckpointLoader but no checkpoint model selected. The loader requires a CkptName, so SelectedModel == null aborts graph construction with this ValidationException.","triggerScenarios":"ApplyStep executed with SelectedModel == null when the ImageOnlyCheckpointLoader node is created (CkptName = SelectedModel?.RelativePath ?? throw).","commonSituations":"User opened the Image-to-Video (SVD/ImageOnly) card without downloading or picking an image-only checkpoint; the previously selected checkpoint was deleted or renamed; preset references a missing model.","solutions":["Select an image-only checkpoint (e.g. svd.safetensors) in the model dropdown","Download the required checkpoint via Model Manager if none is installed","Re-point the preset/selection to an existing model file"],"exampleFix":"// before\nawait vm.ApplyStep(args); // SelectedModel null -> throws\n// after\nif (vm.SelectedModel is null) { throw new ValidationException(\"Select an img2vid checkpoint first\"); }\nawait vm.ApplyStep(args);","handlingStrategy":"validation","validationCode":"if (vm.SelectedModel is null)\n    throw new ValidationException(\"Select an image-only checkpoint before img2vid generation\");","typeGuard":"bool hasCheckpoint = vm.SelectedModel is not null;","tryCatchPattern":"try { vm.ApplyStep(args); }\ncatch (ValidationException ex) when (ex.Message == \"Model not selected\") { /* prompt checkpoint selection */ }","preventionTips":["Download the SVD/image-only checkpoint before using the video card","Verify preset model paths still resolve to files on disk","Disable Generate until a checkpoint is selected"],"tags":["validation","video","checkpoint","model-selection"],"backgroundTag":"missing-required-config-field","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"}