mirror of
https://github.com/openai/CLIP.git
synced 2026-11-05 01:37:26 +00:00
[PR #497] [New Feature] Loading HuggingFace .safetensors and .bin variants for CLIP models #515
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
openai/CLIP#515
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/openai/CLIP/pull/497
Author: @bogoconic1
Created: 6/4/2025
Status: 🔄 Open
Base:
main← Head:main📝 Commits (3)
d57daf9Update requirements.txtc2bdbb6load safetensors version in clip1486984add support for huggingface bin/safetensors variant📊 Changes
2 files changed (+226 additions, -10 deletions)
View changed files
📝
clip/clip.py(+225 -10)📝
requirements.txt(+1 -0)📄 Description
Issue
I tried to load HuggingFace safetensors/bin checkpoints into CLIP, but failed due to this error
Fix
Tests
I tested the enhancements on
using the following snippet, checking that the state_dicts for the original model and the huggingface model are exactly the same. It passed for all 4 models.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.