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

Commit 776aa06

Browse files
committed
Merge branch 'master' into CoreApi
2 parents f096d8a + 8f53c9f commit 776aa06

File tree

2 files changed

+43
-1
lines changed

2 files changed

+43
-1
lines changed

OnnxStack.Console/Examples/StableDebug.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -72,7 +72,7 @@ public async Task RunAsync()
7272
private async Task<bool> GenerateImage(ModelOptions model, PromptOptions prompt, SchedulerOptions options)
7373
{
7474
var timestamp = Stopwatch.GetTimestamp();
75-
var outputFilename = Path.Combine(_outputDirectory, $"{options.Seed}_{options.SchedulerType}.png");
75+
var outputFilename = Path.Combine(_outputDirectory, $"{model.Name}_{options.Seed}_{options.SchedulerType}.png");
7676
var result = await _stableDiffusionService.GenerateAsImageAsync(model, prompt, options);
7777
if (result is not null)
7878
{

OnnxStack.Console/appsettings.json

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -90,6 +90,48 @@
9090
"OnnxModelPath": "D:\\Repositories\\LCM-Dreamshaper-V7-ONNX\\vae_decoder\\model.onnx"
9191
}
9292
]
93+
},
94+
{
95+
"Name": "Photon",
96+
"IsEnabled": true,
97+
"PadTokenId": 49407,
98+
"BlankTokenId": 49407,
99+
"TokenizerLimit": 77,
100+
"EmbeddingsLength": 768,
101+
"ScaleFactor": 0.18215,
102+
"PipelineType": "StableDiffusion",
103+
"Diffusers": [
104+
"TextToImage",
105+
"ImageToImage",
106+
"ImageInpaintLegacy"
107+
],
108+
"DeviceId": 0,
109+
"InterOpNumThreads": 0,
110+
"IntraOpNumThreads": 0,
111+
"ExecutionMode": "ORT_SEQUENTIAL",
112+
"ExecutionProvider": "DirectML",
113+
"ModelConfigurations": [
114+
{
115+
"Type": "Tokenizer",
116+
"OnnxModelPath": "D:\\Repositories\\photon\\tokenizer\\model.onnx"
117+
},
118+
{
119+
"Type": "Unet",
120+
"OnnxModelPath": "D:\\Repositories\\photon\\unet\\model.onnx"
121+
},
122+
{
123+
"Type": "TextEncoder",
124+
"OnnxModelPath": "D:\\Repositories\\photon\\text_encoder\\model.onnx"
125+
},
126+
{
127+
"Type": "VaeEncoder",
128+
"OnnxModelPath": "D:\\Repositories\\photon\\vae_encoder\\model.onnx"
129+
},
130+
{
131+
"Type": "VaeDecoder",
132+
"OnnxModelPath": "D:\\Repositories\\photon\\vae_decoder\\model.onnx"
133+
}
134+
]
93135
}
94136
]
95137
}

0 commit comments

Comments
 (0)