LykosAI/StabilityMatrix · error · ValidationException
Model not selected
Error message
Model not selected
What it means
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.
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
Example fix
// before
conditioningVm.ApplyStep(args); // Base.Model null -> throws
// after
if (args.Builder.Connections.Base.Model is null) { modelCardVm.ApplyStep(args); }
conditioningVm.ApplyStep(args); Defensive patterns
Strategy: try-catch
Validate before calling
if (args.Builder.Connections.Base.Model is null)
throw new ValidationException("Run the model card step before SVD conditioning"); Type guard
bool hasBaseModel = args.Builder.Connections.Base.Model is not null;
Try / catch
try { conditioningVm.ApplyStep(args); }
catch (ValidationException ex) when (ex.Message == "Model not selected") { /* run/repair the model card step first */ } Prevention
- 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
When it happens
Trigger: ApplyStep executed with e.Builder.Connections.Base.Model == null when adding the ComfyNodeBuilder.VideoLinearCFGGuidance node (Model = ... ?? throw).
Common situations: 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.
Understand the failure class
Background: "missing required argument" and "the following required arguments were not provided": what required-argument errors mean and how to fix them — this error's family across 20 libraries.
Related errors
- Model not selected
- Length cannot be null when latentType is Hunyuan
- Invalid Token
- Model file name must contain a valid file name.
- Prompt extensions not installed
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/bd67fa1df2bfea22.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Avalonia/ViewModels/Inference/Video/SvdImgToVidConditioningViewModel.cs:75
return parameters with
{
FrameCount = NumFrames,
MotionBucketId = MotionBucketId,
Fps = Fps,
AugmentationLevel = AugmentationLevel,
MinCfg = MinCfg,
};
}
public void ApplyStep(ModuleApplyStepEventArgs e)
{
// do VideoLinearCFGGuidance stuff first
var cfgGuidanceNode = e.Nodes.AddTypedNode(
new ComfyNodeBuilder.VideoLinearCFGGuidance
{
Name = e.Nodes.GetUniqueName("LinearCfgGuidance"),
Model =
e.Builder.Connections.Base.Model ?? throw new ValidationException("Model not selected"),
MinCfg = MinCfg
}
);
e.Builder.Connections.Base.Model = cfgGuidanceNode.Output;
// then do the SVD stuff
var svdImgToVidConditioningNode = e.Nodes.AddTypedNode(
new ComfyNodeBuilder.SVD_img2vid_Conditioning
{
ClipVision = e.Builder.Connections.BaseClipVision!,
InitImage = e.Builder.GetPrimaryAsImage(),
Vae = e.Builder.Connections.Base.VAE!,
Name = e.Nodes.GetUniqueName("SvdImgToVidConditioning"),
Width = Width,
Height = Height,
VideoFrames = NumFrames,
MotionBucketId = MotionBucketId,View on GitHub (pinned to af93d6ef57)