{"record":{"id":"c9abee98294a013c","repo":"LykosAI/StabilityMatrix","slug":"no-comfyui-workflows-found-in-file-name-the-file-contains","errorCode":null,"errorMessage":"No ComfyUI workflows found in \"{file.Name}\" - the file contains neither workflow json nor images with an embedded workflow","messagePattern":"No ComfyUI workflows found in \"(.+?)\" - the file contains neither workflow json nor images with an embedded workflow","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Core/Models/PackageModification/DownloadCivitWorkflowStep.cs","lineNumber":79,"sourceCode":"                        isMultiple: false\n                    )\n                    .ConfigureAwait(false)\n                    ? 1\n                    : 0,\n                _ => await ImportWorkflowJsonAsync(\n                        await File.ReadAllTextAsync(tempFile).ConfigureAwait(false),\n                        fileStem,\n                        targetDir,\n                        isMultiple: false\n                    )\n                    .ConfigureAwait(false)\n                    ? 1\n                    : 0,\n            };\n\n            if (importedCount == 0)\n            {\n                throw new InvalidOperationException(\n                    foundGenerationParametersOnly\n                        ? $\"\\\"{file.Name}\\\" contains images with WebUI-style generation parameters, \"\n                            + \"but no embedded ComfyUI workflow - the creator may not have attached \"\n                            + \"the actual workflow to this file\"\n                        : $\"No ComfyUI workflows found in \\\"{file.Name}\\\" - \"\n                            + \"the file contains neither workflow json nor images with an embedded workflow\"\n                );\n            }\n\n            progress?.Report(new ProgressReport(1f, $\"Imported {importedCount} workflow(s)\"));\n        }\n        finally\n        {\n            if (tempFile.Exists)\n            {\n                tempFile.Delete();\n            }\n        }","sourceCodeStart":61,"sourceCodeEnd":97,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Core/Models/PackageModification/DownloadCivitWorkflowStep.cs#L61-L97","documentation":"DownloadCivitWorkflowStep.ExecuteAsync throws InvalidOperationException when an archive contains no ComfyUI workflow JSON and no images with an embedded workflow (importedCount == 0 and foundGenerationParametersOnly false). It means the download simply has nothing workflow-like in it.","triggerScenarios":"Calling ExecuteAsync on a downloaded Civitai file where no workflow.json and no workflow-embedding images exist, so zero items are imported.","commonSituations":"Downloading plain model weights or preview images from Civitai expecting a workflow; wrong archive downloaded; creator removed the workflow attachment.","solutions":["Check the Civitai page for an explicit ComfyUI workflow attachment before downloading","Download the correct file (workflow JSON) directly instead of the archive","Handle InvalidOperationException in the caller and inform the user no workflow exists in this file"],"exampleFix":null,"handlingStrategy":"try-catch","validationCode":"if (!archiveHasWorkflowJson && !archiveHasWorkflowImages) throw new SkipImportException(\"no ComfyUI workflow in file\");","typeGuard":null,"tryCatchPattern":"try { await step.ExecuteAsync(progress); } catch (InvalidOperationException ex) { ui.Notify(ex.Message); }","preventionTips":["Check the Civitai page explicitly lists a ComfyUI workflow","Download the workflow JSON directly when unsure","Pre-scan archives for workflow markers before import"],"tags":["csharp","comfyui","civitai","import"],"backgroundTag":"empty-result-set","analyzedSha":"af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002","analyzedAt":"2026-09-12T19:02:43.389Z","contentChangedAt":"2026-09-12T19:02:43.389Z","schemaVersion":2},"datasetVersion":"2026-09-16T04:17:20.429Z"}