CLIP maximum sequence length

#36
by simepy - opened

As my prompt is long but less than 512 I have this error:

Token indices sequence length is longer than the specified maximum sequence length for this model (151 > 77). Running this sequence through the model will result in indexing errors
The following part of your input was truncated because CLIP can only handle sequences up to 77 tokens: ["......, ......."]

This is my pipeline:

            output = shared_pipeline.pipeline(
                image_input.prompt,
                negative_prompt="",
                height=512,
                width=512,
                num_inference_steps=20,
                guidance_scale=3,
                generator=shared_pipeline.generator,
                max_sequence_length=512,
            )

I added max_sequence_length=512 but nothing change.

Do you know how can I fix this issue ?

Sign up or log in to comment