huggingface / diffusers

🤗 Diffusers: State-of-the-art diffusion models for image and audio generation in PyTorch and FLAX.
https://huggingface.co/docs/diffusers
Apache License 2.0
25.9k stars 5.34k forks source link

"`prompt_embeds` and `negative_prompt_embeds` must have the same shape when passed directly #5394

Closed nayan-dhabarde closed 1 year ago

nayan-dhabarde commented 1 year ago

Getting this error when using the following prompt and negative prompt combination: RAW photo, a photo of nayansks, (wearing beige blazer and shirt:1.2), 8k uhd, high quality, Fujifilm XT3, medium close up shot, (Soft lighting, Studio backdrop, Headshot photography, Even lighting, Portrait lighting, Professional headshot, Studio lighting, Diffused light, Key light, Fill light, Background lighting, Softbox, Beauty dish, Rembrandt lighting, Loop lighting, Butterfly lighting, ((White studio backdrop)), Neutral background, Accent lighting, Rim light, High-key lighting, Low-key lighting, Subtle shadows, Catchlights, Portrait studio, Three-point lighting, Lighting setup, Directional light, Modifiers, portrait photo, high quality, 4k, (medium close-up shot:1.2)

negative: (deformed iris, deformed pupils, semi-realistic, cgi, 3d, render, sketch, cartoon, drawing, anime:1.4), text, close up, cropped, out of frame, worst quality, low quality, jpeg artifacts, ugly, duplicate, morbid, mutilated, extra fingers, mutated hands, poorly drawn hands, poorly drawn face, mutation, deformed, blurry, dehydrated, bad anatomy, bad proportions, extra limbs, cloned face, disfigured, gross proportions, malformed limbs, missing arms, missing legs, extra arms, extra legs, fused fingers, too many fingers, long neck, naked, {negativeGender}

patrickvonplaten commented 1 year ago

Hey @nayan-dhabarde,

Can you please provide a reproducible code snippet?

nayan-dhabarde commented 1 year ago

Not a diffusers issue, its a problem to which compel has already provided the solution:

[conditioning, negative_conditioning] = compel.pad_conditioning_tensors_to_same_length([conditioning,negative_conditioning])

Closing this