From 3032a47af4ce9d08628561f1b759975951d3ddc3 Mon Sep 17 00:00:00 2001 From: u-haru <40634644+u-haru@users.noreply.github.com> Date: Fri, 31 Mar 2023 01:42:57 +0900 Subject: [PATCH] =?UTF-8?q?cosine=E3=82=92sine=E3=81=AEreversed=E3=81=AB?= =?UTF-8?q?=E5=A4=89=E6=9B=B4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- networks/lora.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/networks/lora.py b/networks/lora.py index f60789f8..bb8f356e 100644 --- a/networks/lora.py +++ b/networks/lora.py @@ -441,7 +441,7 @@ class LoRANetwork(torch.nn.Module): def get_list(name) -> list[float]: import math if name=="cosine": - return [math.cos(math.pi*(i/(max_len-1))/2) for i in range(max_len)] + return [math.sin(math.pi*(i/(max_len-1))/2) for i in reversed(range(max_len))] elif name=="sine": return [math.sin(math.pi*(i/(max_len-1))/2) for i in range(max_len)] elif name=="linear":