Skip to content

Replace dropout_prob by dropout in vae #595

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

Merged
merged 1 commit into from
Sep 21, 2022

Conversation

younesbelkada
Copy link
Contributor

@younesbelkada younesbelkada commented Sep 20, 2022

An attempt to fix https://github.com/huggingface/diffusers/pull/589/files#r975810155, this is probably not the best fix as it will break the consistency assumption between PT and Flax, but will enable consistent parameters naming for all Flax classes

Using self.dropout = Dropout(self.dropout) leads to the error

self.dropout = nn.Dropout(self.dropout)
flax.errors.SetAttributeInModuleSetupError: Module construction attributes are frozen. (https://flax.readthedocs.io/en/latest/flax.errors.html#flax.errors.SetAttributeInModuleSetupError)

cc @patil-suraj @patrickvonplaten @mishig25

Can confirm the PT->Flax equivalency test pass with this PR, which means that the FlaxVAE model is created correctly

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 20, 2022

The documentation is not available anymore as the PR was closed or merged.

@younesbelkada younesbelkada mentioned this pull request Sep 20, 2022
22 tasks
Copy link
Contributor

@patil-suraj patil-suraj left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good catch @younesbelkada ! It's okay to have different names for dropout in this case, they are not saved as part of model anyway.

@patil-suraj patil-suraj merged commit 3fc8ef7 into huggingface:main Sep 21, 2022
PhaneeshB pushed a commit to nod-ai/diffusers that referenced this pull request Mar 1, 2023
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
replace `dropout_prob` by `dropout` in `vae`
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

Successfully merging this pull request may close these issues.

3 participants