File tree Expand file tree Collapse file tree 1 file changed +1
-1
lines changed
src/diffusers/pipelines/aura_flow Expand file tree Collapse file tree 1 file changed +1
-1
lines changed Original file line number Diff line number Diff line change @@ -260,7 +260,6 @@ def encode_prompt(
260260 padding = "max_length" ,
261261 return_tensors = "pt" ,
262262 )
263- text_inputs = {k : v .to (device ) for k , v in text_inputs .items ()}
264263 text_input_ids = text_inputs ["input_ids" ]
265264 untruncated_ids = self .tokenizer (prompt , padding = "longest" , return_tensors = "pt" ).input_ids
266265
@@ -273,6 +272,7 @@ def encode_prompt(
273272 f" { max_length } tokens: { removed_text } "
274273 )
275274
275+ text_inputs = {k : v .to (device ) for k , v in text_inputs .items ()}
276276 prompt_embeds = self .text_encoder (** text_inputs )[0 ]
277277 prompt_attention_mask = text_inputs ["attention_mask" ].unsqueeze (- 1 ).expand (prompt_embeds .shape )
278278 prompt_embeds = prompt_embeds * prompt_attention_mask
You can’t perform that action at this time.
0 commit comments