Update convert_voxtral_hf_to_mistral.py
Browse files
convert_voxtral_hf_to_mistral.py
CHANGED
|
@@ -125,7 +125,10 @@ def write_model(
|
|
| 125 |
print(f"Loading HF Voxtral model from {input_path_or_repo}...")
|
| 126 |
hf_config = VoxtralConfig.from_pretrained(input_path_or_repo)
|
| 127 |
|
| 128 |
-
|
|
|
|
|
|
|
|
|
|
| 129 |
|
| 130 |
# Convert config
|
| 131 |
if unquantized_model_path is not None:
|
|
|
|
| 125 |
print(f"Loading HF Voxtral model from {input_path_or_repo}...")
|
| 126 |
hf_config = VoxtralConfig.from_pretrained(input_path_or_repo)
|
| 127 |
|
| 128 |
+
if os.path.exists(input_path_or_repo):
|
| 129 |
+
local_path = input_path_or_repo
|
| 130 |
+
else:
|
| 131 |
+
local_path = snapshot_download(input_path_or_repo)
|
| 132 |
|
| 133 |
# Convert config
|
| 134 |
if unquantized_model_path is not None:
|