LykosAI/StabilityMatrix · error · InvalidOperationException

" " contains images with WebUI-style generation parameters…

Error message

"{file.Name}" contains images with WebUI-style generation parameters, but no embedded ComfyUI workflow - the creator may not have attached the actual workflow to this file

What it means

DownloadCivitWorkflowStep.ExecuteAsync imports ComfyUI workflows from a downloaded Civitai archive. If no workflows were imported but images with WebUI-style generation parameters were found, it throws InvalidOperationException explaining the creator embedded only WebUI parameters, not a ComfyUI workflow.

Solutions

  1. Verify the Civitai item actually ships a ComfyUI workflow (workflow JSON or images with embedded workflow)
  2. Ask the creator to attach the actual ComfyUI workflow file to the upload
  3. Catch InvalidOperationException in ExecuteAsync caller and surface a user-friendly message about the missing workflow
Defensive patterns

Strategy: try-catch

Validate before calling

var hasWorkflow = entries.Any(e => e.IsWorkflowJson || e.ImageHasEmbeddedWorkflow);
if (!hasWorkflow) /* warn user before calling ExecuteAsync */;

Try / catch

try { await step.ExecuteAsync(progress); } catch (InvalidOperationException ex) { ui.Notify(ex.Message); }

Prevention

When it happens

Trigger: Downloading a Civitai model/workflow archive whose images contain A1111-style generation parameter chunks but no embedded ComfyUI workflow JSON, so importedCount == 0 with foundGenerationParametersOnly true.

Common situations: Civitai entries that are LoRA/checkpoint pages with screenshot images rather than actual workflow attachments; creators using ComfyUI-generated images with A1111-style metadata; users clicking 'download workflow' on a model that has none.

Understand the failure class

Background: EmptyResultError / "no results found": when an API or scraper succeeds but returns zero rows — this error's family across 9 libraries.

Related errors


AI-assisted analysis of LykosAI/StabilityMatrix@af93d6ef57 (2026-09-12). Data as JSON: /api/errors/41f733317066c42a. Report an issue: GitHub.

Appendix: source

Thrown at StabilityMatrix.Core/Models/PackageModification/DownloadCivitWorkflowStep.cs:79

                        isMultiple: false
                    )
                    .ConfigureAwait(false)
                    ? 1
                    : 0,
                _ => await ImportWorkflowJsonAsync(
                        await File.ReadAllTextAsync(tempFile).ConfigureAwait(false),
                        fileStem,
                        targetDir,
                        isMultiple: false
                    )
                    .ConfigureAwait(false)
                    ? 1
                    : 0,
            };

            if (importedCount == 0)
            {
                throw new InvalidOperationException(
                    foundGenerationParametersOnly
                        ? $"\"{file.Name}\" contains images with WebUI-style generation parameters, "
                            + "but no embedded ComfyUI workflow - the creator may not have attached "
                            + "the actual workflow to this file"
                        : $"No ComfyUI workflows found in \"{file.Name}\" - "
                            + "the file contains neither workflow json nor images with an embedded workflow"
                );
            }

            progress?.Report(new ProgressReport(1f, $"Imported {importedCount} workflow(s)"));
        }
        finally
        {
            if (tempFile.Exists)
            {
                tempFile.Delete();
            }
        }

View on GitHub (pinned to af93d6ef57)