LykosAI/StabilityMatrix · error · ArgumentException
No BboxModel
Error message
No BboxModel
What it means
FaceDetailerModule.OnApplyStep throws this ArgumentException when building the UltralyticsDetectorProvider node: GetModelName(faceDetailerCard.BboxModel) returned null, meaning no bbox/face-detection model (e.g. a face_yolov8 or GroundingDINO ultralytics detector) is selected. Unlike the ValidationException siblings, this uses ArgumentException but signals the same missing-selection condition.
Solutions
- Select a bbox detection model (e.g. bbox/face_yolov8m.pt) in the FaceDetailer card before generating.
- Download the required ultralytics detector model into the ComfyUI models/ultralytics directory so it appears in the selector.
- Programmatically set faceDetailerCard.BboxModel to a valid installed model file.
- Also verify SamModel/SegmModel selections, which the same module validates similarly.
Example fix
// before faceDetailerCard.IsEnabled = true; // BboxModel null await vm.Generate(); // ArgumentException // after faceDetailerCard.IsEnabled = true; faceDetailerCard.BboxModel = bboxDetectorFile; // installed ultralytics model await vm.Generate();
Defensive patterns
Strategy: validation
Validate before calling
if (faceDetailerCard.BboxModel is null)
throw new InvalidOperationException("FaceDetailer requires a bbox detection model"); Type guard
var hasBbox = faceDetailerCard.BboxModel is not null && !string.IsNullOrEmpty(faceDetailerCard.BboxModel.RelativePath);
Try / catch
try { await vm.Generate(); }
catch (ArgumentException ex) when (ex.Message == "No BboxModel")
{
// prompt user to select/install an ultralytics bbox detector
} Prevention
- Install the required ultralytics detector models before enabling FaceDetailer.
- Require bbox (and optionally segm/sam) selections before generation.
- Catch this as ArgumentException, not ValidationException, in catch filters.
When it happens
Trigger: Including a FaceDetailer module whose card's BboxModel field is unset (or points to a model the resolver cannot name) when ApplyStep builds the workflow.
Common situations: User enables FaceDetailer but leaves the bbox detector dropdown empty; ultralytics/seg detector models (bbox/segm/sam) were never downloaded into ComfyUI's models/ultralytics folder; the previously selected detector file was removed so the selection is stale/null.
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
- No SelectedModel
- Upscaler is required
- Length cannot be null when latentType is Hunyuan
- Prompt extensions not installed
- No ImageSource
AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12).
Data as JSON: /api/errors/ac5f808efdbeab95.
Report an issue: GitHub.
Appendix: source
Thrown at StabilityMatrix.Avalonia/ViewModels/Inference/Modules/FaceDetailerModule.cs:61
vm.IncludeCategories = ["Settings"];
});
await gridVm.GetDialog().ShowAsync();
}
protected override void OnApplyStep(ModuleApplyStepEventArgs e)
{
var faceDetailerCard = GetCard<FaceDetailerViewModel>();
if (faceDetailerCard is { InheritSeed: false, SeedCardViewModel.IsRandomizeEnabled: true })
{
faceDetailerCard.SeedCardViewModel.GenerateNewSeed();
}
var bboxLoader = new ComfyNodeBuilder.UltralyticsDetectorProvider
{
Name = e.Builder.Nodes.GetUniqueName(nameof(ComfyNodeBuilder.UltralyticsDetectorProvider)),
ModelName =
GetModelName(faceDetailerCard.BboxModel) ?? throw new ArgumentException("No BboxModel"),
};
var samplerName =
(
faceDetailerCard.IsSamplerSelectionEnabled
? faceDetailerCard.Sampler?.Name
: e.Builder.Connections.PrimarySampler?.Name
) ?? throw new ArgumentException("No PrimarySampler");
var schedulerName =
(
faceDetailerCard.IsSchedulerSelectionEnabled
? faceDetailerCard.Scheduler?.Name
: e.Builder.Connections.PrimaryScheduler?.Name
) ?? throw new ArgumentException("No PrimaryScheduler");
if (schedulerName == "align_your_steps")
{View on GitHub (pinned to af93d6ef57)