Open
Description
OS
Windows
GPU Library
CUDA 12.x
Python version
3.10
Pytorch version
torch-2.7.0+cu128
Model
No response
Describe the bug
Crashing silently in processing source safetensors on CPU when compiling shards.
safetensors-0.5.3
Reproduction steps
Run conversion with -cf
Expected behavior
Should compile shards and complete conversion successfully
Logs
No response
Additional context
At least on my config moving safe_open to GPU (RTX4090) is resolving a problem.
Here is just a draft example with first GPU (device = 0):
compile.py
- with safe_open(file, framework = "pt") as f:
- tensor = f.get_tensor(lkey)
+ with safe_open(file, framework = "pt", device = 0) as f:
+ tensor = f.get_tensor(lkey).to("cpu")
Acknowledgements
- I have looked for similar issues before submitting this one.
- I understand that the developers have lives and my issue will be answered when possible.
- I understand the developers of this program are human, and I will ask my questions politely.