Haoli Yin
commited on
Commit
·
fd297e1
1
Parent(s):
44a268c
Change safetensors to ckpt
Browse files- debug.py +9 -0
- model.safetensors → model.ckpt +0 -0
debug.py
ADDED
|
@@ -0,0 +1,9 @@
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| 1 |
+
from safetensors import safe_open
|
| 2 |
+
resolved_archive_file = "model.safetensors"
|
| 3 |
+
|
| 4 |
+
try:
|
| 5 |
+
with safe_open(resolved_archive_file, framework="pt") as f:
|
| 6 |
+
metadata = f.metadata()
|
| 7 |
+
print(metadata)
|
| 8 |
+
except Exception as e:
|
| 9 |
+
print(f"Failed to open safetensor file: {e}")
|
model.safetensors → model.ckpt
RENAMED
|
File without changes
|