Skip to content

Commit

Permalink
Update convert_safetensors.py
Browse files Browse the repository at this point in the history
solve bug

Signed-off-by: yuunnn_w <[email protected]>
  • Loading branch information
yuunnn-w authored Feb 27, 2024
1 parent 7e7984f commit 153c9c4
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion convert_safetensors.py
Original file line number Diff line number Diff line change
Expand Up @@ -65,7 +65,7 @@ def convert_file(pt_filename: str, sf_filename: str, rename={}, transpose_names=
loaded[new_k] = {
"dtype": str(v.dtype).split(".")[-1],
"shape": v.shape,
"data": v.numpy().tobytes(),
"data": v.detach().numpy().tobytes(),
}

dirname = os.path.dirname(sf_filename)
Expand Down

0 comments on commit 153c9c4

Please sign in to comment.