File tree Expand file tree Collapse file tree 1 file changed +9
-3
lines changed
src/diffusers/pipelines/cogview4 Expand file tree Collapse file tree 1 file changed +9
-3
lines changed Original file line number Diff line number Diff line change @@ -362,10 +362,16 @@ def check_inputs(
362
362
)
363
363
364
364
if prompt_embeds is not None and negative_prompt_embeds is not None :
365
- if prompt_embeds .shape != negative_prompt_embeds .shape :
365
+ if prompt_embeds .shape [ 0 ] != negative_prompt_embeds .shape [ 0 ] :
366
366
raise ValueError (
367
- "`prompt_embeds` and `negative_prompt_embeds` must have the same shape when passed directly, but"
368
- f" got: `prompt_embeds` { prompt_embeds .shape } != `negative_prompt_embeds`"
367
+ "`prompt_embeds` and `negative_prompt_embeds` must have the same batch size when passed directly, but"
368
+ f" got: `prompt_embeds` { prompt_embeds .shape } and `negative_prompt_embeds`"
369
+ f" { negative_prompt_embeds .shape } ."
370
+ )
371
+ if prompt_embeds .shape [- 1 ] != negative_prompt_embeds .shape [- 1 ]:
372
+ raise ValueError (
373
+ "`prompt_embeds` and `negative_prompt_embeds` must have the same dimension when passed directly, but"
374
+ f" got: `prompt_embeds` { prompt_embeds .shape } and `negative_prompt_embeds`"
369
375
f" { negative_prompt_embeds .shape } ."
370
376
)
371
377
You can’t perform that action at this time.
0 commit comments