Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Error VQModel.from_pretrained("valhalla/vqgan-imagenet-f16-1024") #12

Open
kechan opened this issue Sep 6, 2022 · 1 comment
Open

Comments

@kechan
Copy link

kechan commented Sep 6, 2022

For the cell in the notebook that instantiate the model, running on colab:

ValueError                                Traceback (most recent call last)
[<ipython-input-5-122a0a52f4ec>](https://m6v4lzxo3e-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20220902-060047-RC00_471746797#) in <module>
----> 1 model = VQModel.from_pretrained("valhalla/vqgan-imagenet-f16-1024")

[/usr/local/lib/python3.7/dist-packages/transformers/modeling_flax_utils.py](https://m6v4lzxo3e-496ff2e9c6d22116-0-colab.googleusercontent.com/outputframe.html?vrz=colab-20220902-060047-RC00_471746797#) in from_pretrained(cls, pretrained_model_name_or_path, dtype, *model_args, **kwargs)
    853                 else:
    854                     raise ValueError(
--> 855                         f"Trying to load the pretrained weight for {key} failed: checkpoint has shape "
    856                         f"{state[key].shape} which is incompatible with the model shape {random_state[key].shape}. "
    857                         "Using `ignore_mismatched_sizes=True` if you really want to load this checkpoint inside this "

ValueError: Trying to load the pretrained weight for ('decoder', 'mid', 'attn_1', 'norm', 'bias') failed: checkpoint has shape (1, 1, 1, 512) which is incompatible with the model shape (512,). Using `ignore_mismatched_sizes=True` if you really want to load this checkpoint inside this model.
@vdidon
Copy link

vdidon commented Oct 18, 2022

Duplicate of borisdayma/dalle-mini#99
You can use dalle-mini/vqgan_imagenet_f16_16384

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants