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 @@ -360,10 +360,16 @@ def check_inputs(
360
360
)
361
361
362
362
if prompt_embeds is not None and negative_prompt_embeds is not None :
363
- if prompt_embeds .shape != negative_prompt_embeds .shape :
363
+ if prompt_embeds .shape [ 0 ] != negative_prompt_embeds .shape [ 0 ] :
364
364
raise ValueError (
365
- "`prompt_embeds` and `negative_prompt_embeds` must have the same shape when passed directly, but"
366
- f" got: `prompt_embeds` { prompt_embeds .shape } != `negative_prompt_embeds`"
365
+ "`prompt_embeds` and `negative_prompt_embeds` must have the same batch size when passed directly, but"
366
+ f" got: `prompt_embeds` { prompt_embeds .shape } and `negative_prompt_embeds`"
367
+ f" { negative_prompt_embeds .shape } ."
368
+ )
369
+ if prompt_embeds .shape [- 1 ] != negative_prompt_embeds .shape [- 1 ]:
370
+ raise ValueError (
371
+ "`prompt_embeds` and `negative_prompt_embeds` must have the same dimension when passed directly, but"
372
+ f" got: `prompt_embeds` { prompt_embeds .shape } and `negative_prompt_embeds`"
367
373
f" { negative_prompt_embeds .shape } ."
368
374
)
369
375
You can’t perform that action at this time.
0 commit comments