Update safetensors_converter.py
Browse files- safetensors_converter.py +1 -1
safetensors_converter.py
CHANGED
@@ -14,7 +14,7 @@ def convert(path: Path, half: bool = False, no_ema: bool = False):
|
|
14 |
for k, v in state_dict.items():
|
15 |
if not isinstance(v, torch.Tensor):
|
16 |
to_remove.append(k)
|
17 |
-
|
18 |
to_remove.append(k)
|
19 |
|
20 |
for k in to_remove:
|
|
|
14 |
for k, v in state_dict.items():
|
15 |
if not isinstance(v, torch.Tensor):
|
16 |
to_remove.append(k)
|
17 |
+
elif no_ema and "ema" in k:
|
18 |
to_remove.append(k)
|
19 |
|
20 |
for k in to_remove:
|