Skip to content

Conversation

@kaixuanliu
Copy link
Contributor

No description provided.

@kaixuanliu
Copy link
Contributor Author

This PR fixes bug under is_safetensors_compatible function: when variant and safetensor file does not match, this function should return False. For example, in this model: stable-diffusion-v1-5/stable-diffusion-inpainting, there is file diffusion_pytorch_model.fp16.safetensors, but when variant is None, it should return False instead of True

@kaixuanliu
Copy link
Contributor Author

@a-r-r-o-w @DN6 , pls help review, thx.

@DN6
Copy link
Collaborator

DN6 commented May 20, 2025

@bot /style

@github-actions
Copy link
Contributor

Style fixes have been applied. View the workflow run here.

@HuggingFaceDocBuilderDev

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.

@DN6
Copy link
Collaborator

DN6 commented May 20, 2025

Thanks @kaixuanliu! I think we would need to add the variant check when there are no component folders as well.

    if not components:
        return any(".safetensors" in filename for filename in filenames)

And I think the changes will break the current is_safetensors_compatible tests here

class IsSafetensorsCompatibleTests(unittest.TestCase):

@kaixuanliu
Copy link
Contributor Author

@DN6 , Hi, thanks for your advice. Have updated the code and test cases

@kaixuanliu
Copy link
Contributor Author

@bot /style

1 similar comment
@DN6
Copy link
Collaborator

DN6 commented May 21, 2025

@bot /style

@github-actions
Copy link
Contributor

Style fixes have been applied. View the workflow run here.

@kaixuanliu
Copy link
Contributor Author

@DN6 Hi, I have checked all the CI tests offline. Can you help trigger the CI workflow again?

Copy link
Collaborator

@DN6 DN6 left a comment

Choose a reason for hiding this comment

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

Thanks you 🙏🏽 @kaixuanliu

@DN6 DN6 merged commit b5c2050 into huggingface:main May 26, 2025
12 checks passed
@DN6 DN6 mentioned this pull request May 26, 2025
6 tasks
@DN6 DN6 added the roadmap Add to current release roadmap label Jun 5, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

roadmap Add to current release roadmap

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

3 participants