Skip to content

Commit 3bae667

Browse files
authored
fix: break the line after skipping tensors in VAE (leejet#591)
1 parent 8d0819c commit 3bae667

File tree

1 file changed

+8
-1
lines changed

1 file changed

+8
-1
lines changed

model.cpp

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1841,6 +1841,7 @@ bool ModelLoader::load_tensors(on_new_tensor_cb_t on_new_tensor_cb, ggml_backend
18411841
};
18421842
int tensor_count = 0;
18431843
int64_t t1 = ggml_time_ms();
1844+
bool partial = false;
18441845
for (auto& tensor_storage : processed_tensor_storages) {
18451846
if (tensor_storage.file_index != file_index) {
18461847
++tensor_count;
@@ -1922,15 +1923,21 @@ bool ModelLoader::load_tensors(on_new_tensor_cb_t on_new_tensor_cb, ggml_backend
19221923
ggml_backend_tensor_set(dst_tensor, convert_buffer.data(), 0, ggml_nbytes(dst_tensor));
19231924
}
19241925
}
1926+
size_t tensor_max = processed_tensor_storages.size();
19251927
int64_t t2 = ggml_time_ms();
1926-
pretty_progress(++tensor_count, processed_tensor_storages.size(), (t2 - t1) / 1000.0f);
1928+
pretty_progress(++tensor_count, tensor_max, (t2 - t1) / 1000.0f);
19271929
t1 = t2;
1930+
partial = tensor_count != tensor_max;
19281931
}
19291932

19301933
if (zip != NULL) {
19311934
zip_close(zip);
19321935
}
19331936

1937+
if (partial) {
1938+
printf("\n");
1939+
}
1940+
19341941
if (!success) {
19351942
break;
19361943
}

0 commit comments

Comments
 (0)