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 in set up VQGAN #102

Closed
HindAB1 opened this issue Nov 7, 2021 · 1 comment
Closed

Error in set up VQGAN #102

HindAB1 opened this issue Nov 7, 2021 · 1 comment

Comments

@HindAB1
Copy link

HindAB1 commented Nov 7, 2021

I tried to run the model and in set up VQGAN it shows the below error.

ValueError Traceback (most recent call last)
in ()
1 # set up VQGAN
----> 2 vqgan = VQModel.from_pretrained(VQGAN_REPO, revision=VQGAN_COMMIT_ID)

/usr/local/lib/python3.7/dist-packages/transformers/modeling_flax_utils.py in from_pretrained(cls, pretrained_model_name_or_path, dtype, *model_args, **kwargs)
402 else:
403 raise ValueError(
--> 404 f"Trying to load the pretrained weight for {key} failed: checkpoint has shape "
405 f"{state[key].shape} which is incompatible with the model shape {random_state[key].shape}. "
406 "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.

please let mw know how can i fix it?
Thanks in advance.

@borisdayma
Copy link
Owner

Duplicate of #99

@borisdayma borisdayma marked this as a duplicate of #99 Nov 8, 2021
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