You need to agree to share your contact information to access this model

This repository is publicly accessible, but you have to accept the conditions to access its files and content.

Log in or Sign Up to review the conditions and access this model content.

YAML Metadata Warning: empty or missing yaml metadata in repo card (https://huggingface.co/docs/hub/model-cards#model-card-metadata)

C# ORT Inference using VITISAI EP

This document describes how to set up C# ORT inference using VITISAI EP, with the AMD provided Nuget packages.

Structure of the repository

  • RyzenAI-clip-vit-base-patch16-NPU: Contains clip model (patch 16) for NPU:
    • /models/clip_text_model.onnx - CLIP model for handling text

    • /models/clip_vision_model.onnx - CLIP model for handling vision

    • /models/clip_text_cache - pre-compiled cache for the text model

    • /models/clip_vision_cache - pre-compiled cache for the ficion model

    • /src/Program.cs/ - Contains C# source code for running clip inference using the CLIP-vit-base-patch16 model:

Prerequisites

  1. Download and unzip the file containing the Nuget packages provided by AMD
  2. Clone the hugging face repository containing the application code, models, and cache
  3. cd into the cloned repo
  4. Create a directory for the Nuget packages inside the repo
mkdir nupkgs
  1. Copy the contents of the unzipped Nuget packages to the nupkgs directory

  2. If dotnet is not installed, install using the executable from https://builds.dotnet.microsoft.com/dotnet/Sdk/9.0.305/dotnet-sdk-9.0.305-win-x64.exe

Instructions to create a new project

  1. From inside the cloned repo, create a new console application
dotnet.exe new console -n clip_project

a new directory named clip_project will be created

  1. Change into the project directory
cd clip_project
  1. Add the required Nuget packages to the project
dotnet add package System.Memory --version 4.6.3

dotnet add package System.Numerics.Tensors --version 9.0.9

dotnet add package Microsoft.ML.OnnxRuntime.Managed --version 1.23.0-dev-20250928-1204-d70213d40e --source path_to_nupkgs

dotnet add package RyzenAI_Deployment --version 1.6.0 --source path_to_nupkgs
  • The version numbers of the packages may change, please check the nupkgs directory for the correct version numbers.
  • The path_to_nupkgs should be replaced with the actual path to the nupkgs directory created in step

Instructions to run the provided examples

  1. Modify the Program.cs source code file in the RyzenAI-clip-vit-base-patch16-NPU/src directory, replacing the paths that reference models and cache locations to the actual paths on your system.

  2. Copy the Program.cs file from the src directory to the project directory created in the previous steps.

Copy ..\src\Program.cs . 
  1. Build the project
dotnet build
  1. Run the project
dotnet run
Downloads last month

-

Downloads are not tracked for this model. How to track
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Collection including amd/RyzenAI-clip-vit-base-patch16-NPU