stabilityai/stable-diffusion-3-medium-diffusers doesn't work.

#1
by zhujiyu - opened

Traceback (most recent call last):
File "demo.py", line 37, in
image = pipe(
File "/home/yxl/Software/miniconda3/envs/realnet/lib/python3.8/site-packages/torch/utils/_contextlib.py", line 115, in decorate_context
return func(*args, **kwargs)
File "/home/yxl/projects/other/stable-diffusion-3-inpainting/pipeline_stable_diffusion_3_inpaint.py", line 1095, in call
noise_pred = self.transformer(
File "/home/yxl/Software/miniconda3/envs/realnet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/yxl/Software/miniconda3/envs/realnet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/home/yxl/projects/diffusers/src/diffusers/models/transformers/transformer_sd3.py", line 339, in forward
temb = self.time_text_embed(timestep, pooled_projections)
File "/home/yxl/Software/miniconda3/envs/realnet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1511, in _wrapped_call_impl
return self._call_impl(*args, **kwargs)
File "/home/yxl/Software/miniconda3/envs/realnet/lib/python3.8/site-packages/torch/nn/modules/module.py", line 1520, in _call_impl
return forward_call(*args, **kwargs)
File "/home/yxl/projects/diffusers/src/diffusers/models/embeddings.py", line 674, in forward
conditioning = timesteps_emb + pooled_projections
RuntimeError: The size of tensor a (60) must match the size of tensor b (2) at non-singleton dimension 0

Owner

I have also updated a new version to the official github repo. It can solve this issue.

https://github.com/huggingface/diffusers/blob/main/src/diffusers/pipelines/stable_diffusion_3/pipeline_stable_diffusion_3_inpaint.py

Sign up or log in to comment