Skip to content

Commit a60bf3c

Browse files
committed
fix bug for enable_eligen_on_negative
1 parent 3423190 commit a60bf3c

1 file changed

Lines changed: 2 additions & 2 deletions

File tree

diffsynth/pipelines/flux_image.py

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -223,8 +223,8 @@ def prepare_eligen(self, prompt_emb_nega, eligen_entity_prompts, eligen_entity_m
223223
if eligen_entity_masks is not None:
224224
entity_prompt_emb_posi, entity_masks_posi, fg_mask, bg_mask = self.prepare_entity_inputs(eligen_entity_prompts, eligen_entity_masks, width, height, t5_sequence_length, enable_eligen_inpaint)
225225
if enable_eligen_on_negative and cfg_scale != 1.0:
226-
entity_prompt_emb_nega = prompt_emb_nega['prompt_emb'].unsqueeze(1).repeat(1, eligen_entity_masks.shape[1], 1, 1)
227-
entity_masks_nega = eligen_entity_masks
226+
entity_prompt_emb_nega = prompt_emb_nega['prompt_emb'].unsqueeze(1).repeat(1, entity_masks_posi.shape[1], 1, 1)
227+
entity_masks_nega = entity_masks_posi
228228
else:
229229
entity_prompt_emb_nega, entity_masks_nega = None, None
230230
else:

0 commit comments

Comments
 (0)