Spaces:
Runtime error
Runtime error
patrickvonplaten
commited on
Commit
•
e6095fc
1
Parent(s):
369daec
Update convert.py
Browse files- convert.py +0 -7
convert.py
CHANGED
@@ -188,13 +188,6 @@ def convert(api: "HfApi", model_id: str, force: bool = False) -> Optional["Commi
|
|
188 |
url = f"https://huggingface.co/{model_id}/discussions/{pr.num}"
|
189 |
new_pr = pr
|
190 |
raise AlreadyExists(f"Model {model_id} already has an open PR check out {url}")
|
191 |
-
elif library_name == "transformers":
|
192 |
-
if "pytorch_model.bin" in filenames:
|
193 |
-
operations = convert_single(model_id, folder)
|
194 |
-
elif "pytorch_model.bin.index.json" in filenames:
|
195 |
-
operations = convert_multi(model_id, folder)
|
196 |
-
else:
|
197 |
-
raise RuntimeError(f"Model {model_id} doesn't seem to be a valid pytorch model. Cannot convert")
|
198 |
else:
|
199 |
print("Convert generic")
|
200 |
operations = convert_generic(model_id, folder, filenames)
|
|
|
188 |
url = f"https://huggingface.co/{model_id}/discussions/{pr.num}"
|
189 |
new_pr = pr
|
190 |
raise AlreadyExists(f"Model {model_id} already has an open PR check out {url}")
|
|
|
|
|
|
|
|
|
|
|
|
|
|
|
191 |
else:
|
192 |
print("Convert generic")
|
193 |
operations = convert_generic(model_id, folder, filenames)
|