Raise instead of skipping when convertion is already done.
Browse files- convert.py +1 -1
convert.py
CHANGED
@@ -101,7 +101,7 @@ def convert(api, model_id):
|
|
101 |
try:
|
102 |
operations = None
|
103 |
if "model.safetensors" in filenames or "model_index.safetensors.index.json" in filenames:
|
104 |
-
|
105 |
elif "pytorch_model.bin" in filenames:
|
106 |
operations = convert_single(model_id, folder)
|
107 |
elif "pytorch_model.bin.index.json" in filenames:
|
|
|
101 |
try:
|
102 |
operations = None
|
103 |
if "model.safetensors" in filenames or "model_index.safetensors.index.json" in filenames:
|
104 |
+
raise RuntimeError(f"Model {model_id} is already converted, skipping..")
|
105 |
elif "pytorch_model.bin" in filenames:
|
106 |
operations = convert_single(model_id, folder)
|
107 |
elif "pytorch_model.bin.index.json" in filenames:
|