Skip to content

Conversation

@mishig25
Copy link
Contributor

@mishig25 mishig25 commented Sep 21, 2022

from diffusers import FlaxUNet2DConditionModel

model, params = FlaxUNet2DConditionModel.from_pretrained("/home/mishig/sd-v1-4-flax", subfolder="unet")

on main, this would raise an error saying that /home/mishig/sd-v1-4-flax/{FLAX_MODEL} does not exist because it was not respecting argument subfolder when checking locally

Pytorch version already handled it correctly:

elif subfolder is not None and os.path.isfile(
os.path.join(pretrained_model_name_or_path, subfolder, WEIGHTS_NAME)
):
model_file = os.path.join(pretrained_model_name_or_path, subfolder, WEIGHTS_NAME)

@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.

Very cool, thanks a lot for fixing this!

@patil-suraj patil-suraj merged commit 4b8880a into main Sep 22, 2022
@patil-suraj patil-suraj deleted the flax_from_subfolder branch September 22, 2022 09:44
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.

4 participants