From df02e20b344b8af1c29bba04dd3f6653fdc63701 Mon Sep 17 00:00:00 2001 From: Sean Sube Date: Sun, 9 Apr 2023 22:31:43 -0500 Subject: [PATCH] only use mids once --- api/onnx_web/convert/diffusion/lora.py | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/api/onnx_web/convert/diffusion/lora.py b/api/onnx_web/convert/diffusion/lora.py index d621449e..3c5585f5 100644 --- a/api/onnx_web/convert/diffusion/lora.py +++ b/api/onnx_web/convert/diffusion/lora.py @@ -203,12 +203,7 @@ def blend_loras( weights[:, :, w, h] = ( up_weight.squeeze(3).squeeze(2) @ mid_weight[:, :, w, h] - ) @ ( - down_weight.squeeze(3).squeeze(2).permute((1, 0)) - @ mid_weight[:, :, w, h] - ).permute( - (1, 0) - ) + ) @ down_weight.squeeze(3).squeeze(2) np_weights = weights.numpy() * (alpha / dim) else: