This commit is contained in:
Kohaku-Blueleaf 2025-04-14 23:59:10 +08:00
parent bffbed8940
commit 68c9e79bc8
2 changed files with 5 additions and 5 deletions

View File

@ -114,4 +114,4 @@ def tucker_weight_from_conv(up, down, mid):
def tucker_weight(wa, wb, t):
temp = torch.einsum("i j ..., j r -> i r ...", t, wb)
return torch.einsum("i j ..., i r -> r j ...", temp, wa)
return torch.einsum("i j ..., i r -> r j ...", temp, wa)

View File

@ -4,10 +4,10 @@ from typing import Optional
import torch
import comfy.model_management
from .base import (
WeightAdapterBase,
WeightAdapterTrainBase,
weight_decompose,
pad_tensor_to_shape,
WeightAdapterBase,
WeightAdapterTrainBase,
weight_decompose,
pad_tensor_to_shape,
tucker_weight_from_conv,
)