liuliu / swift-diffusion

BSD 3-Clause "New" or "Revised" License
429 stars 33 forks source link

LoRA layers not present in UNet #42

Closed ghost closed 1 year ago

ghost commented 1 year ago

There is an exampe for lora but the layers are not present in the Unet class.

liuliu commented 1 year ago

There are two ways to implement LoRA. One is to have aux multiplications done at runtime along with the main one (a.k.a. LoRA layers). Another is to merge the weights first. We opt to merge the weight to keep the network the same so we can reuse things such as CoreML too.

ghost commented 1 year ago

Okay thanks