From 4b73c13bfaa77c7feb8bcf20d8eeaf2859025b84 Mon Sep 17 00:00:00 2001 From: Extraltodeus Date: Sun, 17 Mar 2024 17:40:06 +0100 Subject: [PATCH] Update nodes.py --- nodes.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/nodes.py b/nodes.py index 1f1cdee..a443562 100644 --- a/nodes.py +++ b/nodes.py @@ -43,7 +43,7 @@ def refine_token_weight(token_id, all_weights, subtract_difference, sculptor_mul del s[-1] del tmp_weights[-1] - if len(s) <= 1: return initial_weight.cpu(), 0 + if len(s) < 1: return initial_weight.cpu(), 0 concurrent_weights = torch.sum(torch.stack([t * s[i]**2 for i, t in enumerate(tmp_weights)]), dim=0) final_score = get_single_cosine_score(initial_weight,concurrent_weights) * sculptor_multiplier