axodox / axodox-machinelearning

This repository contains a pure C++ ONNX implementation of multiple offline AI models, such as StableDiffusion (1.5 and XL), ControlNet, Midas, HED and OpenPose.
MIT License
605 stars 35 forks source link

How to set the enviroment variable to use the library #17

Closed lingchingteng closed 1 year ago

lingchingteng commented 1 year ago

Hello,

I'd like to ask for clarification on how to set up the following instructions specifically.

Once you have built the library, you override your existing nuget package install by setting the AxodoxMachineLearning-Location environment variable to point to your local build.

For example C:\dev\axodox-machinelearning\Axodox.MachineLearning.Universal for an UWP app and C:\dev\axodox-machinelearning\Axodox.MachineLearning.Desktop for a desktop app.

Then add the project pointed by the path to the solution of your own project. This allows to add all projects into the same solution and make changes on the library and your app seamlessly without copying files repeatedly.

I'm not very familiar with these, so I apologize for any inconvenience. Thank you for your assistance.

axodox commented 1 year ago

Yes, so basically you have a Axodox.MachineLearning nuget package which you can add to your own projects to use the existing functionality of the library.

But sometimes you need to add functionalities so it suits your specific needs. In this case the simplest solution would be that you add the new features, build the project generate a new nuget package, and then finally add the new nuget to your project, but this is not very convenient.

Instead of this you create an environment variable and point it to your local copy of the library repo, in which case the nuget package will reference your local version of the package instead of its own files. Allowing you to develop seamlessly.

For even better dev experience you can even add the projects which make up the library to your own solution, so they automatically will get built if you change them. This allows you to develop as if all code were in a single app.