You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
This repository was archived by the owner on Nov 27, 2024. It is now read-only.
Copy file name to clipboardExpand all lines: OnnxStack.Core/README.md
+88-9Lines changed: 88 additions & 9 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -1,9 +1,18 @@
1
1
# OnnxStack.Core - Onnx Services for .NET Applications
2
2
3
-
OnnxStack.Core is a library that provides higher-level services for use in .NET applications. It offers extensive support for features such as dependency injection, .NET configuration implementations, ASP.NET Core integration, and IHostedService support.
3
+
OnnxStack.Core is a library that provides higher-level ONNX services for use in .NET applications. It offers extensive support for features such as dependency injection, .NET configuration implementations, ASP.NET Core integration, and IHostedService support.
4
+
5
+
You can configure a model set for runtime, offloading individual models to different devices to make better use of resources or run on lower-end hardware. The first use-case is StableDiffusion; however, it will be expanded, and other model sets, such as object detection and classification, will be added.
4
6
5
7
## Getting Started
6
8
9
+
10
+
OnnxStack.Core can be found via the nuget package manager, download and install it.
11
+
```
12
+
PM> Install-Package OnnxStack.Core
13
+
```
14
+
15
+
7
16
### .NET Core Registration
8
17
9
18
You can easily integrate `OnnxStack.Core` into your application services layer. This registration process sets up the necessary services and loads the `appsettings.json` configuration.
@@ -13,6 +22,69 @@ Example: Registering OnnxStack
13
22
builder.Services.AddOnnxStack();
14
23
```
15
24
25
+
## Configuration example
26
+
The `appsettings.json` is the easiest option for configuring model sets. Below is an example of `Stable Diffusion 1.5`. The example adds the necessary paths to each model file required for Stable Diffusion, as well as any model-specific configurations. Each model can be assigned to its own device, which is handy if you have only a small GPU. This way, you can offload only what you need. There are limitations depending on the version of the `Microsoft.ML.OnnxRuntime` package you are using, but in most cases, you can split the load between CPU and GPU.
Copy file name to clipboardExpand all lines: OnnxStack.StableDiffusion/README.md
+28-5Lines changed: 28 additions & 5 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -4,6 +4,26 @@
4
4
5
5
## Getting Started
6
6
7
+
OnnxStack.StableDiffusion can be found via the nuget package manager, download and install it.
8
+
```
9
+
PM> Install-Package OnnxStack.StableDiffusion
10
+
```
11
+
12
+
### Microsoft.ML.OnnxRuntime
13
+
Depending on the devices you have and the platform you are running on, you will want to install the Microsoft.ML.OnnxRuntime package that best suits your needs.
You can easily integrate `OnnxStack.StableDiffusion` into your application services layer. This registration process sets up the necessary services and loads the `appsettings.json` configuration.
0 commit comments