ai-dev-gallery

microsoftMIT活跃维护

面向 Windows 开发者的开源示例库,演示如何用本地模型和 API 给 Windows 应用加上 AI 能力,覆盖 ONNX Runtime、DirectML 和 NPU 加速。

An open-source project for Windows developers to learn how to add AI with local models and APIs to Windows apps.

暂无版本1,517star227fork同步于 2026-11-10 11:48 UTC

怎么上手

由 README 提炼,执行前请确认
git clone https://github.com/microsoft/AI-Dev-Gallery.git
用 Visual Studio 打开 AIDevGallery.sln,将 AIDevGallery 设为启动项目后按 F5
硬件要求按 README 说明

需 Windows 10 1809(Build 17763)及以上,架构 x64 或 ARM64;建议至少 16 GB 内存、20 GB 可用磁盘;GPU 运行示例建议 8 GB 显存。

8G 显存可跑
下载:源码 zip·GitHub Releases(安装包)本站不镜像安装包

项目说明

由 README 自动翻译提炼

微软出品的 Windows 开发示例库,帮你把本地模型和 API 接入 WinUI 应用

面向 Windows 开发者的开源示例库,演示如何用本地模型和 API 给 Windows 应用加上 AI 能力,覆盖 ONNX Runtime、DirectML 和 NPU 加速。

核心能力

  • 提供 25+ 个由本地 AI 模型驱动的交互式示例
  • 在应用内浏览、下载并运行 Hugging Face 与 GitHub 上的模型
  • 查看 C# 源码并一键导出独立 Visual Studio 工程
  • 支持在运行示例时切换所选模型

容易踩的坑

需先装 Visual Studio 2022 或更高版本并勾选 Windows 应用开发工作负载;在 ARM64 Copilot+ PC 上必须按 ARM64 而非 x64 构建,否则 Phi Silica 等示例无法运行;模型需联网从 Hugging Face 或 GitHub 下载后才能离线使用;App Content Search 示例在生产环境需申请 Limited Access Feature token。

内容由模型根据 README 生成,可能不完整或不准确,以官方文档为准。看原文 README

最近发版

0 个版本

暂无 release 数据(可能没有发版,或尚未同步)。

用户点评

登录用户的真实使用记录,可按版本和硬件筛选
共 0 条

    还没有人点评。第一个说出真实体验的人最有价值。

    README 原文

    未翻译

    WindowsAI hero image

    [!IMPORTANT]
    The AI Dev Gallery is currently in public preview, and we’d love your feedback! Share your thoughts by creating an issue.

    Designed for Windows developers, the AI Dev Gallery helps integrate AI capabilities into apps and projects. It includes:

    • Explore over 25 interactive samples powered by local AI models
    • Easily browse, download, and run models from Hugging Face and GitHub
    • View the C# source code and export standalone Visual Studio projects with a single click

    🚀 Getting started

    Download AI Dev Gallery from the Microsoft Store or follow these steps to install it manually:

    1. Set up the environment

    ⚠️ Note: AI Dev Gallery requires Visual Studio 2022 or later for building and Windows 10 or newer to run. If you're new to building apps with WinUI and the Windows App SDK, follow the installation instructions.

    Required Visual Studio components:

    • Windows application development

    2. Clone the repository

    git clone https://github.com/microsoft/AI-Dev-Gallery.git
    

    3. Open AIDevGallery.sln with Visual Studio!

    Ensure that the AIDevGallery project is set as the startup project in Visual Studio.

    Press F5 to run AI Dev Gallery!

    ⚠️ Note: On ARM64-based Copilot+ PCs, make sure to build and run the solution as ARM64 (and not as x64). This is required especially when running the samples that communicate with models such as Phi Silica.

    ⚠️ Note: Having issues installing the app on your machine? Let us know by opening an issue and our team will do our best to help!

    💻 Device requirements

    • Minimum OS version: Windows 10, version 1809 (10.0; Build 17763)
    • Architecture: x64, ARM64
    • Memory: At least 16 GB is recommended
    • Disk space: At least 20GB free space is recommended
    • GPU: 8GB of VRAM is recommended for running samples on the GPU

    🔎 App Content Search samples

    [!NOTE] These App Content Search samples use the experimental channel of the Windows App SDK, which does not require a Limited Access Feature token. App Content Search is available in the stable channel starting with Windows App SDK 2.5.1 as a Limited Access Feature. To use it in a production app, request a token for com.microsoft.windows.ai.appcontentindexer and call LimitedAccessFeatures.TryUnlockFeature before calling any AppContentIndex API. See Get started with App Content Search.

    👏 Contribute to AI Dev Gallery

    Any samples or docs improvements you'd like to see? We're always looking for a helping hand. Feel free to open an issue to start the discussion, or even better, create a PR with the change you'd like to see!

    ❓ FAQs

    • Q: Is a Microsoft account necessary to use the app?
      • A: No, the app does NOT require a Microsoft account for use.
    • Q: Can I use the app without an internet connection?
      • A: Yes, the app works offline since the AI models are downloaded locally. However, you will need to be online to download additional AI models from Hugging Face or GitHub.
    • Q: What AI models are available in the app?
      • A: The app features popular open source models and APIs from the Microsoft Foundry on Windows. When executing a sample, you can select which model you want to use.
    • Q: Is the app's source code accessible? Can I contribute new samples?
      • A: Yes, the app is completely open-source, and its code is accessible on GitHub. Feel free to contribute by filing an issue, or submitting a PR and one of our moderators will review it.
    • Q: Where can I provide feedback?
      • A: Feel free to give us feedback or open an issue on our GitHub repository.
    • Q: Do I need to run the app just to try a single sample?
      • A: Yes, the app is required to run any sample. However, once you've downloaded a model for a sample via the app, you can export the sample as a Visual Studio project and run it independently from there.

    ✨ Contributing

    This project welcomes contributions and suggestions. Most contributions require you to agree to a Contributor License Agreement (CLA) declaring that you have the right to, and actually do, grant us the rights to use your contribution. For details, visit https://cla.opensource.microsoft.com.

    When you submit a pull request, a CLA bot will automatically determine whether you need to provide a CLA and decorate the PR appropriately (e.g., status check, comment). Simply follow the instructions provided by the bot. You will only need to do this once across all repos using our CLA.

    This project has adopted the Microsoft Open Source Code of Conduct. For more information see the Code of Conduct FAQ or contact [email protected] with any additional questions or comments.

    📚 Trademarks

    This project may contain trademarks or logos for projects, products, or services. Authorized use of Microsoft trademarks or logos is subject to and must follow Microsoft's Trademark & Brand Guidelines. Use of Microsoft trademarks or logos in modified versions of this project must not cause confusion or imply Microsoft sponsorship. Any use of third-party trademarks or logos are subject to those third-party's policies.

    🔔 Code of Conduct

    This project has adopted the Microsoft Open Source Code of Conduct.

    📢 Privacy Statement

    The application logs basic telemetry. Please read the Microsoft privacy statement for more information.