Skip to content

Commit

Permalink
Skip .bin files when compiling full model
Browse files Browse the repository at this point in the history
  • Loading branch information
turboderp committed Jan 22, 2024
1 parent 7a9d12a commit 2707e28
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions conversion/compile.py
Original file line number Diff line number Diff line change
Expand Up @@ -174,6 +174,10 @@ def compile_model(job, save_fn, model):
all_files = [f for f in os.listdir(input_dir) if os.path.isfile(os.path.join(input_dir, f))]
tensor_files = glob.glob(os.path.join(input_dir, "*.safetensors"))
tensor_files_set = set(tensor_files)
bin_files = glob.glob(os.path.join(input_dir, "*.bin"))
if len(bin_files) > 0:
print(f" !! Ignoring *.bin files in source dir")
tensor_files_set.update(bin_files)
non_tensor_files = [f for f in all_files if os.path.join(input_dir, f) not in tensor_files_set]

for f in non_tensor_files:
Expand Down

0 comments on commit 2707e28

Please sign in to comment.