ValueError: cross_attention_dim must be specified for CrossAttnDownBlock2D
When I load stable-diffusion-v1-5-inpainting, the following error is reported. How can I solve it?
Traceback (most recent call last):
File "/root/paddlejob/workspace/likaiyun/COCOCO/app.py", line 37, in <module>
validation_pipeline = load_model(model_path=args.model_path, \
File "/root/paddlejob/workspace/likaiyun/COCOCO/utils.py", line 63, in load_model
vae = AutoencoderKL.from_pretrained(pretrained_model_path, subfolder="vae")
File "/root/anaconda3/envs/cococo/lib/python3.10/site-packages/diffusers/modeling_utils.py", line 483, in from_pretrained
model = cls.from_config(config, **unused_kwargs)
File "/root/anaconda3/envs/cococo/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 210, in from_config
model = cls(**init_dict)
File "/root/anaconda3/envs/cococo/lib/python3.10/site-packages/diffusers/configuration_utils.py", line 567, in inner_init
init(self, *args, **init_kwargs)
File "/root/anaconda3/envs/cococo/lib/python3.10/site-packages/diffusers/models/vae.py", line 539, in __init__
self.encoder = Encoder(
File "/root/anaconda3/envs/cococo/lib/python3.10/site-packages/diffusers/models/vae.py", line 94, in __init__
down_block = get_down_block(
File "/root/anaconda3/envs/cococo/lib/python3.10/site-packages/diffusers/models/unet_2d_blocks.py", line 83, in get_down_block
raise ValueError("cross_attention_dim must be specified for CrossAttnDownBlock2D")
ValueError: cross_attention_dim must be specified for CrossAttnDownBlock2D
same issue
I encountered the same problem, have you solved it?
@solarlemon Hi how did you run the code, I'm trying to set up the environment on colab but am having issues
same issue
@solarlemon Hi how did you run the code, I'm trying to set up the environment on colab but am having issues
local machine
I managed to move pass the vae error by deleting the config.json under the stable diffusion inpainting directory (e.g. ./stable-diffusion-v1-5-inpainting/config.json) following the comments on this diffuser issue (assuming you're downloading the one provided in the readme). Hope this helps.
I managed to move pass the vae error by deleting the
config.jsonunder the stable diffusion inpainting directory (e.g../stable-diffusion-v1-5-inpainting/config.json) following the comments on this diffuser issue (assuming you're downloading the one provided in the readme). Hope this helps.
Thanks, it helps me a lot.