Skip to content

Commit 5e2f36c

Browse files
junqiangwuyiyixuxu
andauthored
Update src/diffusers/pipelines/longcat_image/pipeline_longcat_image.py
Co-authored-by: YiYi Xu <[email protected]>
1 parent fcfdda9 commit 5e2f36c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/diffusers/pipelines/longcat_image/pipeline_longcat_image.py

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -334,6 +334,8 @@ def _encode_prompt( self, prompt ):
334334
)
335335
# [max_sequence_length, batch, hidden_size] -> [batch, max_sequence_length, hidden_size]
336336
# clone to have a contiguous tensor
337+
self.prompt_template_encode_start_idx = len(prefix_tokens)
338+
self.prompt_template_encode_end_idx = len(suffix_tokens)
337339
prompt_embeds = text_output.hidden_states[-1].detach()
338340
prompt_embeds = prompt_embeds[:,self.prompt_template_encode_start_idx: -self.prompt_template_encode_end_idx ,:]
339341

0 commit comments

Comments
 (0)