You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
FLUX and SD3 report the wrong discarded T5 prompt tokens #15495
On f982295e2833b737f19b48de06cf1311aafb7462, FLUX and Stable Diffusion 3 truncate T5 input at max_sequence_length and decode the warning from the CLIP boundary. With an 8-token T5 limit and a 50-token input, FLUX reports [''] as the discarded text. The T5 tokenizer decodes the discarded suffix as o three four five six seven eight nine ten.
The same error reproduces in SD3 with its tiny test components. I propose using the T5 limit in both source methods, synchronizing their library copies, and adding regression tests. Would you welcome a PR for that change?
Reproduction
fromdiffusersimportFluxPipelinepipe=FluxPipeline.from_pretrained('hf-internal-testing/tiny-flux-pipe', revision='a98bc4ec6a80c47c477ed22d7e81c79872d9c723')
pipe.encode_prompt(prompt='forest', prompt_2='one two three four five six seven eight nine ten', max_sequence_length=8, device='cpu')
Context
No response
Logs
System Info
Diffusers 0.44.0.dev0 (f982295)
Windows 11, build 10.0.26300
Python 3.12.13
PyTorch 2.15.0+cpu
Transformers 5.26.0
huggingface_hub 2.6.0
Accelerate 1.16.0
Safetensors 0.8.0
Reproduction used one CPU process.
Activity