From b5c334d8cae2369f30acfd2d2d6eee759f55743f Mon Sep 17 00:00:00 2001 From: Ryan Dick Date: Tue, 5 Mar 2024 15:55:13 -0500 Subject: [PATCH] Fix _negative_cross_attn_mask_score. --- .../backend/stable_diffusion/diffusion/regional_prompt_data.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/invokeai/backend/stable_diffusion/diffusion/regional_prompt_data.py b/invokeai/backend/stable_diffusion/diffusion/regional_prompt_data.py index b7b7e61768..c5e6b4d201 100644 --- a/invokeai/backend/stable_diffusion/diffusion/regional_prompt_data.py +++ b/invokeai/backend/stable_diffusion/diffusion/regional_prompt_data.py @@ -32,7 +32,7 @@ class RegionalPromptData: self._spatial_masks_by_seq_len: list[dict[int, torch.Tensor]] = self._prepare_spatial_masks( regions, max_downscale_factor ) - self._negative_cross_attn_mask_score = 0.0 + self._negative_cross_attn_mask_score = -10000.0 def _prepare_spatial_masks( self, regions: list[TextConditioningRegions], max_downscale_factor: int = 8