Skip to content

Is there a way to disable loading of configuration from appsettings.json #55

Answered by saddam213
AshD asked this question in Q&A
Discussion options

You must be logged in to vote

Ok, I added some convenience methods to registration so you can easily override the default config in a much nicer way
Commit

Now you can override both configs like:

builder.Services.AddOnnxStack(onnxStackConfig);
builder.Services.AddOnnxStackStableDiffusion(onnxStackStableDiffusionConfig);

//Load Custom `IConfigSection` If required
builder.Services.AddOnnxStackConfig<MyCustomSection>();

Note: you will need to call AddOnnxStack() explicitly before AddOnnxStackStableDiffusion if you are using custom configs

Replies: 4 comments 2 replies

Comment options

You must be logged in to vote
0 replies
Comment options

You must be logged in to vote
1 reply
@AshD
Comment options

Answer selected by AshD
Comment options

You must be logged in to vote
1 reply
@saddam213
Comment options

Comment options

You must be logged in to vote
0 replies
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Category
Q&A
Labels
None yet
3 participants