[lint] improve ruff check (#11922)

Co-authored-by: Xiaoyu Zhang <35585791+BBuf@users.noreply.github.com>
This commit is contained in:
Liangsheng Yin
2025-10-22 11:32:50 +08:00
committed by GitHub
co-authored by Xiaoyu Zhang
parent 590bc4b7a7
commit 9d61205dac
19 changed files with 73 additions and 31 deletions
@@ -110,6 +110,9 @@ def convert_bin_to_safetensor_file(
dirname = os.path.dirname(sf_filename)
os.makedirs(dirname, exist_ok=True)
from safetensors.torch import save_file
save_file(loaded, sf_filename, metadata={"format": "pt"})
# check file size