LykosAI/StabilityMatrix · error · ValidationException
BaseClipVision not set
Error message
BaseClipVision not set
What it means
When image-to-video mode is active (IsDenoiseStrengthEnabled), WanSamplerCardViewModel.ApplyStep() builds a CLIPVisionEncode node that requires a CLIP Vision model. It reads e.Builder.Connections.BaseClipVision and throws ValidationException("BaseClipVision not set") when the upstream connection was never populated, because a CLIPVisionEncode node cannot be emitted without a ClipVision model input.
Solutions
- Install the required CLIP Vision model for Wan (e.g. clip_vision_h) via the Model Browser into the clip_vision models folder, then select it so BaseClipVision gets populated.
- Verify Settings -> ComfyUI points at the correct models directory (or shared ComfyUI folder) so installed clip_vision models are discovered; restart the app after installing.
- Disable the image-to-video / denoise-strength mode on the Wan sampler card if you don't intend img2vid generation.
- If driving the builder in code, set e.Builder.Connections.BaseClipVision to the CLIP Vision model before ApplyStep.
Example fix
// before
ClipVision = e.Builder.Connections.BaseClipVision
?? throw new ValidationException("BaseClipVision not set"),
// after (caller-side guard)
if (e.Builder.Connections.BaseClipVision is null)
throw new ValidationException("Select a CLIP Vision model for image-to-video generation (Settings -> install clip_vision model)."); Defensive patterns
Strategy: validation
Validate before calling
if (card.IsDenoiseStrengthEnabled && e.Builder.Connections.BaseClipVision is null)
throw new ValidationException("Image-to-video requires a CLIP Vision model; install/select one first."); Type guard
bool CanRunImgToVid(WanSamplerCardViewModel c, Connections conn) =>
!c.IsDenoiseStrengthEnabled || conn.BaseClipVision is not null; Try / catch
try { card.ApplyStep(e); }
catch (ValidationException ex) when (ex.Message == "BaseClipVision not set")
{ PromptInstallClipVisionModel(); } Prevention
- Install the Wan-required CLIP Vision model (e.g. clip_vision_h) into the clip_vision folder before using image-to-video.
- Confirm the models directory / shared ComfyUI folder setting covers clip_vision models.
- Only enable denoise-strength (img2vid) mode when a CLIP Vision model is selected.
- When building workflows programmatically, always assign Connections.BaseClipVision before ApplyStep.
When it happens
Trigger: Running a Wan image-to-video generation where the BaseClipVision connection is null — the CLIP Vision model was not selected/chosen in the UI, the required CLIP-Vision checkpoint (e.g. clip_vision_h for Wan) is not installed or not loaded into Connections, or an upstream module that normally sets BaseClipVision did not run.
Common situations: User enables img2vid/denoise-strength mode on the Wan card without a CLIP Vision model downloaded; shared ComfyUI models folder not configured so the clip_vision model isn't discovered; workflow restored from a saved prompt where the CLIP Vision selection was lost; calling ApplyStep programmatically on a bare builder without setting Connections.BaseClipVision.
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
- Sampler not selected
- : Model not selected
- Scheduler not selected
- Client is not connected
- Prompt extensions not installed
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/afa42c0ca7c5cbaf.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Avalonia/ViewModels/Inference/WanSamplerCardViewModel.cs:73
e.Builder.Connections.PrimaryCfg = CfgScale;
e.Builder.Connections.PrimarySteps = Steps;
e.Builder.Connections.PrimaryModelType = SelectedModelType;
e.Temp = e.CreateTempFromBuilder();
var conditioning = e.Temp.Base.Conditioning.Unwrap();
var isImgToVid = IsDenoiseStrengthEnabled;
if (isImgToVid)
{
var clipVisionEncode = e.Nodes.AddTypedNode(
new ComfyNodeBuilder.CLIPVisionEncode
{
Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.CLIPVisionEncode)),
ClipVision =
e.Builder.Connections.BaseClipVision
?? throw new ValidationException("BaseClipVision not set"),
Image = e.Builder.GetPrimaryAsImage(),
Crop = "none",
}
);
var wanImageToVideo = e.Nodes.AddTypedNode(
new ComfyNodeBuilder.WanImageToVideo
{
Name = e.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.WanImageToVideo)),
Positive = conditioning.Positive,
Negative = conditioning.Negative,
Vae = e.Builder.Connections.GetDefaultVAE(),
ClipVisionOutput = clipVisionEncode.Output,
StartImage = e.Builder.GetPrimaryAsImage(),
Width = Width,
Height = Height,
Length = Length,
BatchSize = e.Builder.Connections.BatchSize,View on GitHub (pinned to af93d6ef57)