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

Fix flax from_pretrained pytorch weoghts check #603

Merged
merged 1 commit into from
Sep 21, 2022
Merged

Conversation

mishig25
Copy link
Contributor

@mishig25 mishig25 commented Sep 21, 2022

The implementation was mostly copied from transformers.FlaxPreTrainedModel & I think there was an error (made PR huggingface/transformers#19133 as well)

cc: @younesbelkada github is not letting me add you as reviwer

from diffusers import FlaxUNet2DConditionModel

# should tell you to use `from_pt=True`
model, params = FlaxUNet2DConditionModel.from_pretrained("{PT_PATH}")

# works by converting the weights
model, params = FlaxUNet2DConditionModel.from_pretrained("{PT_PATH}", from_pt=True)

@HuggingFaceDocBuilderDev
Copy link

HuggingFaceDocBuilderDev commented Sep 21, 2022

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

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! Thanks for fixing this!

@patil-suraj patil-suraj merged commit f810060 into main Sep 21, 2022
@patil-suraj patil-suraj deleted the fix_flax_pt_check branch September 21, 2022 09:17
yoonseokjin pushed a commit to yoonseokjin/diffusers that referenced this pull request Dec 25, 2023
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