Narsil HF staff commited on
Commit
d800fd4
1 Parent(s): 322ff83

Raise instead of skipping when convertion is already done.

Browse files
Files changed (1) hide show
  1. 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
- print(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:
 
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: