快速结论:报错通常发生在 Windows 上运行 MLX 模型时,因为该模型底层依赖 Apple MLX 框架,只支持 macOS,Windows 上无法加载 MLX 动态库。优先确认当前系统是否为 macOS,如果是 Windows 则不建议继续排查此模型。
适用环境:Issue 已确认的触发环境为 Windows + Ollama 0.30.10 + NVIDIA RTX 3060 + Core i7 12 代;同时有 macOS(Ollama 0.32.15)可正常拉取模型,但 Ollama 官方回复当前版本已停止支持图像生成模型。
最快修复方案:暂无确认的一步修复方案。若已在 Windows 上触发报错,目前没有验证过的处理办法;如在 macOS 上可正常拉取模型,但 Ollama 0.32.x 仍会提示“image generation models are not currently supported”。
注意事项:Issue 讨论中指出“模型可能仅支持 macOS”,但没有给出 Windows 修复方案;Ollama 团队确认图像生成功能已停止支持,相关能力在当前版本不可用。
问题场景
用户在 Windows 上通过 ollama run x/flux2-klein:4b 拉取并运行 XLabs Flux2 Klein 4B 图像生成模型,Ollama 加载模型时尝试初始化 MLX(Apple 的机器学习框架)运行时失败,返回 500 Internal Server Error。
报错原文
Error: failed to load model: 500 Internal Server Error: mlx runner failed: Error: failed to initialize MLX: failed to load MLX dynamic library (searched: [C:\Users\User\AppData\Local\Programs\Ollama\lib\ollama C:\Users\User\AppData\Local\Programs\lib\ollama C:\Windows\System32\build\lib\ollama C:\Windows\System32\dist\windows-amd64\lib\ollama C:\Windows\System32\dist\windows_amd64\lib\ollama])
原因分析
可能原因:x/flux2-klein:4b 属于 MLX 格式模型,MLX 是 Apple 生态专用的机器学习框架,仅提供 macOS 动态库。Windows 上 Ollama 尝试加载 MLX 动态库(libmlx.dylib 等)时找不到对应文件,因此初始化失败。Issue 评论中明确提到“该模型可能仅支持 macOS”,但未完全确认。
此外,Ollama 团队在 Issue 中回复:图像生成模型当时属于实验性功能,目前已停止支持以优先保证核心推理能力。即使切换到 macOS,当前版本(0.32.x)在拉取成功后的运行阶段仍会提示不支持图像生成。
环境排查
- 操作系统:确认是否为 macOS(Apple Silicon),Windows/Linux 上 MLX 模型大概率无法运行。
- Ollama 版本:当前版本(0.30.10 及更新版本)是否仍包含 MLX 运行时的 Windows 支持,需确认官方 Release Notes。
- 模型依赖:确认模型架构是否为 MLX 格式,检查
ollama show x/flux2-klein:4b输出的模型信息。 - 网络/镜像源:拉取模型本身是否成功(5.7GB 是否完整下载)。
解决步骤
- 先确认操作系统:运行
sw_vers(macOS)或检查系统信息。若为 Windows,可优先尝试更换为不支持 MLX 的同类 Flux 模型(如 GGUF 格式版本)。 - 如操作系统为 macOS,尝试拉取模型:
ollama run x/flux2-klein:4b "a cat holding a sign that says hello world"。 - 若拉取成功但提示
image generation models are not currently supported,说明当前 Ollama 版本已移除图像生成能力,可先尝试降级到较早的 Ollama 版本(Issue 评论提到“中间版本似乎可用,后来停止工作”,但未提供具体版本号)。 - 如必须使用该模型且当前为 Windows,则暂时无法绕过 MLX 依赖,可等待 Ollama 官方是否恢复图像生成支持,或使用其他本地图像生成工具(如 ComfyUI + 对应 Flux 模型)。
验证方法
在 macOS 上执行 ollama run x/flux2-klein:4b "a cat holding a sign that says hello world",若能进入正常的模型对话/生成流程(不出现 mlx runner failed 或 image generation models 错误),即说明问题已解决。若在 Windows 上则无法通过此模型验证,需更换其他模型测试 Ollama 基础功能是否正常。
参考来源
AI 工具推荐
想把多个 AI 模型放在一个入口?
GamsGo AI 集成 ChatGPT、DeepSeek、Gemini、Claude、Midjourney、Veo 等常用模型,适合写作、绘图、视频和日常 AI 工作流。
推广链接:通过此链接购买,我可能获得佣金,不影响你的价格。
这个方案解决了吗?
可以继续搜索完整报错,或查看同一工具的其他排查指南。
![[Question]: How to deal with the situation that the user_id returned in the Conversation table in the database is null?](https://www.chat-gpts.plus/wp-content/uploads/2026/08/7940-bcfd3c79-768x403.jpg)
![[Question]: dependency failed to start: container ragflow-mysql is unhealthy](https://www.chat-gpts.plus/wp-content/uploads/2026/08/7501-3cad0829-768x403.jpg)
