mirror of
https://git.datalinker.icu/comfyanonymous/ComfyUI
synced 2026-09-02 20:47:12 +08:00
use more stable init
This commit is contained in:
parent
7a677763e8
commit
c92c884fec
@ -136,8 +136,8 @@ class LoHaAdapter(WeightAdapterBase):
|
|||||||
torch.nn.init.constant_(mat2, 0.0)
|
torch.nn.init.constant_(mat2, 0.0)
|
||||||
mat3 = torch.empty(out_dim, rank, device=weight.device, dtype=weight.dtype)
|
mat3 = torch.empty(out_dim, rank, device=weight.device, dtype=weight.dtype)
|
||||||
mat4 = torch.empty(rank, in_dim, device=weight.device, dtype=weight.dtype)
|
mat4 = torch.empty(rank, in_dim, device=weight.device, dtype=weight.dtype)
|
||||||
torch.nn.init.normal_(mat3, 1)
|
torch.nn.init.normal_(mat3, 0.1)
|
||||||
torch.nn.init.normal_(mat4, 0.1)
|
torch.nn.init.normal_(mat4, 0.01)
|
||||||
return LohaDiff(
|
return LohaDiff(
|
||||||
(mat1, mat2, alpha, mat3, mat4, None, None, None)
|
(mat1, mat2, alpha, mat3, mat4, None, None, None)
|
||||||
)
|
)
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user