LykosAI/StabilityMatrix · error · ValidationException
Model not selected
Error message
Model not selected
What it means
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.
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
Example fix
// before
await vm.ApplyStep(args); // SelectedModel null -> throws
// after
if (vm.SelectedModel is null) { throw new ValidationException("Select an img2vid checkpoint first"); }
await vm.ApplyStep(args); Defensive patterns
Strategy: validation
Validate before calling
if (vm.SelectedModel is null)
throw new ValidationException("Select an image-only checkpoint before img2vid generation"); Type guard
bool hasCheckpoint = vm.SelectedModel is not null;
Try / catch
try { vm.ApplyStep(args); }
catch (ValidationException ex) when (ex.Message == "Model not selected") { /* prompt checkpoint selection */ } Prevention
- 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
When it happens
Trigger: ApplyStep executed with SelectedModel == null when the ImageOnlyCheckpointLoader node is created (CkptName = SelectedModel?.RelativePath ?? throw).
Common situations: 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.
Understand the failure class
Background: "is required", "must be set", "missing required field": configuration validation errors across open-source libraries — this error's family across 36 libraries.
Related errors
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/3868b286a67bb94b.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Avalonia/ViewModels/Inference/Video/ImgToVidModelCardViewModel.cs:46
clientManager,
vmFactory,
tabContext,
settingsManager,
modelIndexService,
notificationService,
modelOrganizationService
)
{
DisableSettings = true;
}
public override void ApplyStep(ModuleApplyStepEventArgs e)
{
var imgToVidLoader = e.Nodes.AddTypedNode(
new ComfyNodeBuilder.ImageOnlyCheckpointLoader
{
Name = "ImageOnlyCheckpointLoader",
CkptName = SelectedModel?.RelativePath ?? throw new ValidationException("Model not selected"),
}
);
e.Builder.Connections.Base.Model = imgToVidLoader.Output1;
e.Builder.Connections.BaseClipVision = imgToVidLoader.Output2;
e.Builder.Connections.Base.VAE = imgToVidLoader.Output3;
}
}
View on GitHub (pinned to af93d6ef57)