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

LoRA support #10

Open alex-aparin opened 1 year ago

alex-aparin commented 1 year ago

Is there any way to use LoRA models with the library? Should be they converted like main models?

axodox commented 1 year ago

This guide from Microsoft suggests that it could work, but I did not try it: https://github.com/microsoft/Olive/tree/main/examples/directml/stable_diffusion

alex-aparin commented 1 year ago

Thank you. This experiment will be my next step.

arturodrt commented 1 year ago

Hello Alex, did it work? I would be also interested in using LoRA models

axodox commented 1 year ago

As far as I know there is a limitation that ONNX converted LORA-s weights would be "burned into" the original model, as such it would consume a lot of HDD space to use them. However I have heard that the ONNX converter will eventually provide features which make loading safetensors directly feasible.

alex-aparin commented 1 year ago

@Artuurodrt Hello. I am sorry for late response. Unfortunately I stopped my research. Still have no idea whether it's possible or not.