mirror of
https://github.com/deepseek-ai/DeepSeek-VL2.git
synced 2026-11-05 01:07:23 +00:00
[PR #158] fix: load siglip checkpoint with weights_only=True #155
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
deepseek-ai/DeepSeek-VL2#155
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/deepseek-ai/DeepSeek-VL2/pull/158
Author: @Dextheking1
Created: 10/23/2026
Status: 🔄 Open
Base:
main← Head:fix/siglip-torch-load-weights-only📝 Commits (1)
522c82efix: load siglip checkpoint with weights_only=True📊 Changes
1 file changed (+1 additions, -1 deletions)
View changed files
📝
deepseek_vl2/models/siglip_vit.py(+1 -1)📄 Description
create_siglip_vit loads ckpt_path with a bare torch.load.
on torch 2.0.1, the version pinned in requirements.txt, that unpickles the whole file. a checkpoint from anywhere runs code on load. weights_only=True stops that, and plain tensor state dicts still load fine, which is all this function takes.
verified with torch 2.5.1 cpu and a test checkpoint holding a pickle payload that writes a marker file on load. before: marker written. after: load refused with UnpicklingError, no marker. a normal state dict with a tensor loads the same as before.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.