Kaeya commited on
Commit
cd5a91a
1 Parent(s): 7e64269

Update safetensors_converter.py

Browse files
Files changed (1) hide show
  1. 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
- if no_ema and "ema" in k:
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: