{"record":{"id":"ec3f455d34dbeaa3","repo":"LykosAI/StabilityMatrix","slug":"t5-xxl-model-not-found","errorCode":null,"errorMessage":"T5-XXL model not found","messagePattern":"T5-XXL model not found","errorType":"exception","errorClass":"InvalidOperationException","httpStatus":null,"severity":"error","filePath":"StabilityMatrix.Avalonia/Services/FluxKontextModelManager.cs","lineNumber":192,"sourceCode":"\n        var vaeModel =\n            clientManager.VaeModels.FirstOrDefault(m =>\n                m.Local != null && m.FileName.Equals(\"ae.safetensors\", StringComparison.OrdinalIgnoreCase)\n            ) ?? throw new InvalidOperationException(\"Flux VAE model not found\");\n\n        var clip1Model =\n            clientManager.ClipModels.FirstOrDefault(m =>\n                m.Local != null && m.FileName.Contains(\"clip_l\", StringComparison.OrdinalIgnoreCase)\n            ) ?? throw new InvalidOperationException(\"CLIP-L model not found\");\n\n        var clip2Model =\n            clientManager.ClipModels.FirstOrDefault(m =>\n                m.Local != null\n                && (\n                    m.FileName.Contains(\"t5xxl\", StringComparison.OrdinalIgnoreCase)\n                    || m.FileName.Contains(\"t5-xxl\", StringComparison.OrdinalIgnoreCase)\n                )\n            ) ?? throw new InvalidOperationException(\"T5-XXL model not found\");\n\n        return new FluxKontextWorkflowBuilder.SelectedModels(unetModel, vaeModel, clip1Model, clip2Model);\n    }\n}\n","sourceCodeStart":174,"sourceCodeEnd":197,"githubUrl":"https://github.com/LykosAI/StabilityMatrix/blob/af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002/StabilityMatrix.Avalonia/Services/FluxKontextModelManager.cs#L174-L197","documentation":"The Flux Kontext pipeline also requires the T5-XXL text encoder. SelectModels searches ClipModels for a local file whose name contains 't5xxl' or 't5-xxl' and throws this InvalidOperationException when none is found, because the second encoder slot of the workflow cannot be filled.","triggerScenarios":"Calling SelectModels when no ClipModels entry has Local != null and a filename containing 't5xxl' or 't5-xxl' (case-insensitive).","commonSituations":"User installs CLIP-L but not t5xxl_fp8_e4m3fn.safetensors; the T5 file uses a naming variant that matches neither substring; encoder folder not scanned or index stale after moving files.","solutions":["Download a T5-XXL encoder (e.g. t5xxl_fp8_e4m3fn.safetensors) into the TextEncoders folder and refresh the index","Rename the existing T5 file so it contains 't5xxl' or 't5-xxl' in a scanned folder","Catch InvalidOperationException and offer an in-app T5-XXL download"],"exampleFix":"// before\nvar models = fluxKontextModelManager.SelectModels();\n// after\nif (!clientManager.ClipModels.Any(m => m.Local != null && m.FileName.Contains(\"t5xxl\", StringComparison.OrdinalIgnoreCase)))\n{\n    await sharedFolders.DownloadModelAsync(T5XxlFp8Uri, SharedFolderType.TextEncoders);\n}\nvar models = fluxKontextModelManager.SelectModels();","handlingStrategy":"validation","validationCode":"var clip2 = clientManager.ClipModels.FirstOrDefault(m => m.Local != null\n    && (m.FileName.Contains(\"t5xxl\", StringComparison.OrdinalIgnoreCase)\n        || m.FileName.Contains(\"t5-xxl\", StringComparison.OrdinalIgnoreCase)));\nif (clip2 is null) throw new UserDownloadableError(\"T5-XXL encoder is not installed.\");","typeGuard":"bool HasT5Xxl(IEnumerable<HybridModelFile> clips) => clips.Any(m => m.Local != null && (m.FileName.Contains(\"t5xxl\", StringComparison.OrdinalIgnoreCase) || m.FileName.Contains(\"t5-xxl\", StringComparison.OrdinalIgnoreCase)));","tryCatchPattern":"try\n{\n    var models = fluxKontextModelManager.SelectModels();\n}\ncatch (InvalidOperationException ex) when (ex.Message.Contains(\"T5-XXL model not found\"))\n{\n    // trigger t5xxl download flow\n}","preventionTips":["Name T5 encoder files to include 't5xxl' or 't5-xxl'","Install CLIP-L and T5-XXL together for Flux-family workflows","Refresh the model index after moving encoder files"],"tags":["comfyui","t5","models"],"backgroundTag":"resource-not-found","analyzedSha":"af93d6ef57c01cd890d7e0ad0a9ea8c9fcda3002","analyzedAt":"2026-09-12T19:02:43.389Z","contentChangedAt":"2026-09-12T19:02:43.389Z","schemaVersion":2},"datasetVersion":"2026-09-23T08:17:48.524Z"}