Skip to content

Commit d24116a

Browse files
committed
cli: ignore internal (invalid) types
1 parent f52e9c5 commit d24116a

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

examples/cli/main.cpp

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -352,11 +352,14 @@ void parse_args(int argc, const char** argv, SDParams& params) {
352352
for (size_t i = 0; i < SD_TYPE_COUNT; i++) {
353353
auto trait = ggml_get_type_traits((ggml_type)i);
354354
std::string name(trait->type_name);
355-
if (trait->type_size) {
355+
if (name == "f32" || trait->to_float && trait->type_size) {
356356
if (i)
357357
valid_types += ", ";
358358
valid_types += name;
359359
if (type == name) {
360+
if (ggml_quantize_requires_imatrix((ggml_type)i)) {
361+
printf("\033[35;1m[WARNING]\033[0m: type %s requires imatrix to work properly. A dummy imatrix will be used, expect poor quality.\n", trait->type_name);
362+
}
360363
params.wtype = (enum sd_type_t)i;
361364
found = true;
362365
break;

0 commit comments

Comments
 (0)