-
I'm currently trying to implement Lycoris LoKr support for stable-diffusion.cpp. This uses a Kroenecker product to achieve a higher rank matrix with fewer parameters than regular low rank decomposition. (easily generalisable to arbitrary dims) The problem is, while Kronecker product is really to understand conceptually, and trivial to implement in regular code, I have no idea how to implement it properly with ggml. I just need it to work for 2D matrices. At first I thought |
Beta Was this translation helpful? Give feedback.
Replies: 1 comment 2 replies
-
Maybe |
Beta Was this translation helpful? Give feedback.
But that lead me on the right path. I believe
ggml_mul(ctx, ggml_upscale_ext(ctx, a, a->ne[0] * b->ne[0], a->ne[1] * b->ne[1], a->ne[2] * b->ne[2], a->ne[3] * b->ne[3]), b);
should work. At least it seems to be the correct shape.Edit:
it crashes(because upscale only works with f32 apparently, otherwise it works)