1
0
Fork 0

apply lint

This commit is contained in:
Sean Sube 2023-06-16 20:43:28 -05:00
parent 81d2e93709
commit c1a4484b75
Signed by: ssube
GPG Key ID: 3EED7B957D362AF1
1 changed files with 8 additions and 2 deletions

View File

@ -288,9 +288,15 @@ def blend_loras(
down_w, down_h = kernel_slice(w, h, down_weight.shape) down_w, down_h = kernel_slice(w, h, down_weight.shape)
up_w, up_h = kernel_slice(w, h, up_weight.shape) up_w, up_h = kernel_slice(w, h, up_weight.shape)
weights[:, :, w, h] = up_weight[:, :, up_w, up_h].squeeze(3).squeeze( weights[:, :, w, h] = up_weight[
:, :, up_w, up_h
].squeeze(3).squeeze(2) @ down_weight[
:, :, down_w, down_h
].squeeze(
3
).squeeze(
2 2
) @ down_weight[:, :, down_w, down_h].squeeze(3).squeeze(2) )
np_weights = weights.numpy() * (alpha / dim) np_weights = weights.numpy() * (alpha / dim)
else: else: