Skip to content

Commit ce5558f

Browse files
committed
fix test
1 parent 09e1e58 commit ce5558f

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/diffusers/pipelines/flux/pipeline_flux.py

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -361,7 +361,10 @@ def encode_prompt(
361361
scale_lora_layers(self.text_encoder_2, lora_scale)
362362

363363
prompt = [prompt] if isinstance(prompt, str) else prompt
364-
batch_size = len(prompt)
364+
if prompt is not None:
365+
batch_size = len(prompt)
366+
else:
367+
batch_size = prompt_embeds.shape[0]
365368

366369
if do_true_cfg and negative_prompt is not None:
367370
negative_prompt = [negative_prompt] if isinstance(negative_prompt, str) else negative_prompt

0 commit comments

Comments
 (0)