mirror of
https://github.com/deepseek-ai/Janus.git
synced 2026-11-05 00:57:18 +00:00
[PR #245] fix: load siglip checkpoints with weights_only=True #237
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/Janus#237
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/Janus/pull/245
Author: @Dextheking1
Created: 10/23/2026
Status: 🔄 Open
Base:
main← Head:fix/siglip-weights-only📝 Commits (1)
96ed27bfix: load siglip checkpoints with weights_only=True📊 Changes
2 files changed (+2 additions, -2 deletions)
View changed files
📝
janus/janusflow/models/siglip_vit.py(+1 -1)📝
janus/models/siglip_vit.py(+1 -1)📄 Description
both copies of siglip_vit.py (janus/models and janus/janusflow/models) load the vision checkpoint with a plain torch.load, and the path comes from the checkpoint config. anyone who can swap that checkpoint file gets pickle code exec at load time.
the loaded value goes straight into model.load_state_dict, both call sites. it is a plain tensor state dict, nothing else, so weights_only=True covers the load with no behavior change for real checkpoints.
verified locally: a state dict saved with torch.save loads fine with weights_only=True. a checkpoint whose pickle runs a shell command on load executes under a plain torch.load and is rejected with weights_only=True. both files compile.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.