Skip to content

[Core] fix: legacy model mapping#8416

Merged
sayakpaul merged 2 commits intomainfrom
fix-legacy-model-mapping
Jun 6, 2024
Merged

[Core] fix: legacy model mapping#8416
sayakpaul merged 2 commits intomainfrom
fix-legacy-model-mapping

Conversation

@sayakpaul
Copy link
Copy Markdown
Member

What does this PR do?

Otherwise, this would fail:

from diffusers import Transformer2DModel
import torch

weight_dtype = torch.float16

transformer = Transformer2DModel.from_pretrained(
    "PixArt-alpha/PixArt-Sigma-XL-2-1024-MS",
    subfolder='transformer',
    torch_dtype=weight_dtype,
    use_safetensors=True,
)

Can do a patch release for this.

@sayakpaul sayakpaul requested review from DN6 and yiyixuxu June 6, 2024 13:55
@HuggingFaceDocBuilderDev
Copy link
Copy Markdown

The docs for this PR live here. All of your documentation changes will be reflected on that endpoint. The docs are available until 30 days after the last update.

@sayakpaul sayakpaul merged commit a3faf3f into main Jun 6, 2024
@sayakpaul sayakpaul deleted the fix-legacy-model-mapping branch June 6, 2024 15:05
@yiyixuxu
Copy link
Copy Markdown
Collaborator

yiyixuxu commented Jun 6, 2024

is this caught by any of our tests?

@sayakpaul
Copy link
Copy Markdown
Member Author

No, we don’t check for subfolder tests from a pipeline checkpoint. Can add in a future PR for tiny checkpoints.

@sayakpaul
Copy link
Copy Markdown
Member Author

Here you go: #8422

sayakpaul added a commit that referenced this pull request Dec 23, 2024
* fix: legacy model mapping

* remove print
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