Spaces:
Running
Running
Update convert.py
#37
by
rwightman
HF Staff
- opened
- convert.py +3 -0
convert.py
CHANGED
|
@@ -258,6 +258,9 @@ def convert_generic(
|
|
| 258 |
# XXX: This is a special case to handle `transformers` and the
|
| 259 |
# `transformers` part of the model which is actually loaded by `transformers`.
|
| 260 |
sf_in_repo = os.path.join(dirname, "model.safetensors")
|
|
|
|
|
|
|
|
|
|
| 261 |
else:
|
| 262 |
sf_in_repo = f"{prefix}.safetensors"
|
| 263 |
sf_filename = os.path.join(folder, sf_in_repo)
|
|
|
|
| 258 |
# XXX: This is a special case to handle `transformers` and the
|
| 259 |
# `transformers` part of the model which is actually loaded by `transformers`.
|
| 260 |
sf_in_repo = os.path.join(dirname, "model.safetensors")
|
| 261 |
+
elif raw_filename == "open_clip_pytorch_model.bin":
|
| 262 |
+
# XXX: This is a special case to handle `open_clip`
|
| 263 |
+
sf_in_repo = os.path.join(dirname, "open_clip_model.safetensors")
|
| 264 |
else:
|
| 265 |
sf_in_repo = f"{prefix}.safetensors"
|
| 266 |
sf_filename = os.path.join(folder, sf_in_repo)
|