From 0b6c90f681e5edcb2e183439b1934b778c6ca268 Mon Sep 17 00:00:00 2001 From: Clybius Date: Mon, 16 Jun 2025 17:13:46 -0500 Subject: [PATCH] fix: Replace negative text attention with positive in nag alpha usage. (oops) --- chroma_NAG.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/chroma_NAG.py b/chroma_NAG.py index 5680464..07aef05 100644 --- a/chroma_NAG.py +++ b/chroma_NAG.py @@ -136,7 +136,7 @@ def chroma_doublestream_forward_nag(self, img, txt, pe, vec, attn_mask=None): # Blend the original positive output with the guided output guided_img_attn_output = nag_guidance * self.nag_alpha + x_positive * (1 - self.nag_alpha) - guided_txt_attn_output = nag_txt_guidance * self.nag_alpha + x_txt_negative * (1 - self.nag_alpha) + guided_txt_attn_output = nag_txt_guidance * self.nag_alpha + x_txt_positive * (1 - self.nag_alpha) # --- 3. Complete the rest of the block for the conditional part ---