filipstrand / mflux

A MLX port of FLUX based on the Huggingface Diffusers implementation.
651 stars 45 forks source link

Is there some max prompts length limit? #28

Open smoothdvd opened 1 week ago

smoothdvd commented 1 week ago

I input a long prompt, but some content from the latter part of the prompt was lost.

python main.py --model schnell --prompt "Imagine a vibrant Tokyo street at night, glowing with neon lights from countless signs and billboards. The street is bustling with people, a mix of locals and tourists, some moving briskly while others linger to take in the sights. Tall buildings tower above, their windows reflecting the bright lights below, adding to the city’s luminous atmosphere.

The street is lined with a variety of shops, from trendy boutiques to small, cozy ramen shops emitting warm, inviting light. The iconic red lanterns of an izakaya sway gently in the night breeze, casting a soft, warm glow on the sidewalk.

Above, the sky is dark, but the city's radiance diminishes the stars, making them barely visible. The air is filled with the hum of conversation, the occasional laughter, and the distant sound of traffic. The atmosphere is alive, yet there's a certain calmness that comes with the night, a contrast between the city's energy and the tranquility of the evening.

In the distance, you can see the glowing outline of Tokyo Tower, its lights creating a striking contrast against the dark sky. The wet pavement, possibly from a recent rain, reflects the kaleidoscope of colors from the lights, adding an extra layer of vibrancy to the scene.

Beautiful Chinese girl is walking on the street, face camera." --steps 2 --seed 2 -q 8

image

The girl does not appear in the generated image.

If I replace the part of prompt "Beautiful Chinese girl is walking on the street, face camera." to any words (keep the seed same), the generated image is the same.

filipstrand commented 1 week ago

@smoothdvd You are correct. There is indeed a max prompt length limit, we should probably give the user a warning that some parts was cut off (I think this is how they do it in the Diffusers implementation also - they simply accept the maximum prompt, and report what sub-string was removed if the original was too long). Will put this up as a task.