Skip to content
This repository was archived by the owner on Nov 27, 2024. It is now read-only.

Commit 310fffd

Browse files
committed
Update README
1 parent 851de21 commit 310fffd

File tree

2 files changed

+25
-25
lines changed

2 files changed

+25
-25
lines changed

OnnxStack.Core/README.md

Lines changed: 15 additions & 15 deletions
Original file line numberDiff line numberDiff line change
@@ -81,19 +81,19 @@ using (var tokens = _onnxModelService.RunInference(OnnxModelType.Tokenizer, inpu
8181
// Create Configuration
8282
var onnxStackConfig = new OnnxStackConfig
8383
{
84-
Name = "OnnxStack",
85-
TokenizerLimit = 77,
86-
ModelConfigurations = new List<OnnxModelSessionConfig>
87-
{
88-
new OnnxModelSessionConfig
89-
{
90-
DeviceId = 0,
91-
ExecutionProvider = ExecutionProvider.DirectML,
92-
93-
Type = OnnxModelType.Tokenizer,
94-
OnnxModelPath = "clip_tokenizer.onnx",
95-
}
96-
}
84+
Name = "OnnxStack",
85+
TokenizerLimit = 77,
86+
ModelConfigurations = new List<OnnxModelSessionConfig>
87+
{
88+
new OnnxModelSessionConfig
89+
{
90+
DeviceId = 0,
91+
ExecutionProvider = ExecutionProvider.DirectML,
92+
93+
Type = OnnxModelType.Tokenizer,
94+
OnnxModelPath = "clip_tokenizer.onnx",
95+
}
96+
}
9797
};
9898

9999
// Create Service
@@ -105,14 +105,14 @@ var text = "Text To Tokenize";
105105
var inputTensor = new DenseTensor<string>(new string[] { text }, new int[] { 1 });
106106
var inputString = new List<NamedOnnxValue>
107107
{
108-
NamedOnnxValue.CreateFromTensor("string_input", inputTensor)
108+
NamedOnnxValue.CreateFromTensor("string_input", inputTensor)
109109
};
110110

111111
// Create an InferenceSession from the Onnx clip tokenizer.
112112
// Run session and send the input data in to get inference output.
113113
using (var tokens = onnxModelService.RunInference(OnnxModelType.Tokenizer, inputString))
114114
{
115-
var resultTensor = tokens.ToArray();
115+
var resultTensor = tokens.ToArray();
116116
}
117117

118118
```

OnnxStack.StableDiffusion/README.md

Lines changed: 10 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -150,15 +150,15 @@ Each model can be assigned to its own device, which is handy if you have only a
150150
},
151151
"AllowedHosts": "*",
152152

153-
"OnnxStackConfig": {
154-
"Name": "StableDiffusion 1.5",
155-
"PadTokenId": 49407,
156-
"BlankTokenId": 49407,
157-
"InputTokenLimit": 512,
158-
"TokenizerLimit": 77,
159-
"EmbeddingsLength": 768,
160-
"ScaleFactor": 0.18215,
161-
"ModelConfigurations": [{
153+
"OnnxStackConfig": {
154+
"Name": "StableDiffusion 1.5",
155+
"PadTokenId": 49407,
156+
"BlankTokenId": 49407,
157+
"InputTokenLimit": 512,
158+
"TokenizerLimit": 77,
159+
"EmbeddingsLength": 768,
160+
"ScaleFactor": 0.18215,
161+
"ModelConfigurations": [{
162162
"Type": "Unet",
163163
"DeviceId": 0,
164164
"ExecutionProvider": "DirectML",
@@ -195,6 +195,6 @@ Each model can be assigned to its own device, which is handy if you have only a
195195
"ExecutionProvider": "Cpu",
196196
"OnnxModelPath": "D:\\Repositories\\stable-diffusion-v1-5\\safety_checker\\model.onnx"
197197
}]
198-
}
198+
}
199199
}
200200
```

0 commit comments

Comments
 (0)