Skip to content

Commit d55b6ea

Browse files
authored
Better variant
Simple EOL makes empty lines.
1 parent 028475e commit d55b6ea

File tree

1 file changed

+8
-2
lines changed

1 file changed

+8
-2
lines changed

model.cpp

Lines changed: 8 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1750,6 +1750,7 @@ bool ModelLoader::load_tensors(on_new_tensor_cb_t on_new_tensor_cb, ggml_backend
17501750
};
17511751
int tensor_count = 0;
17521752
int64_t t1 = ggml_time_ms();
1753+
bool partial = false;
17531754
for (auto& tensor_storage : processed_tensor_storages) {
17541755
if (tensor_storage.file_index != file_index) {
17551756
++tensor_count;
@@ -1831,20 +1832,25 @@ bool ModelLoader::load_tensors(on_new_tensor_cb_t on_new_tensor_cb, ggml_backend
18311832
ggml_backend_tensor_set(dst_tensor, convert_buffer.data(), 0, ggml_nbytes(dst_tensor));
18321833
}
18331834
}
1835+
size_t tensor_max = processed_tensor_storages.size();
18341836
int64_t t2 = ggml_time_ms();
1835-
pretty_progress(++tensor_count, processed_tensor_storages.size(), (t2 - t1) / 1000.0f);
1837+
pretty_progress(++tensor_count, tensor_max, (t2 - t1) / 1000.0f);
18361838
t1 = t2;
1839+
partial = tensor_count != tensor_max;
18371840
}
18381841

18391842
if (zip != NULL) {
18401843
zip_close(zip);
18411844
}
18421845

1846+
if (partial) {
1847+
printf("\n");
1848+
}
1849+
18431850
if (!success) {
18441851
break;
18451852
}
18461853
}
1847-
printf("\n");
18481854
return success;
18491855
}
18501856

0 commit comments

Comments
 (0)