fix unintended sd model quantization (#1672)

The recent ggml update added another quant type, GGML_TYPE_MXFP4,
which got the same value as SD_TYPE_COUNT. That made the embedded
sd.cpp quantize to GGML_TYPE_MXFP4 by default.

Photomaker in particular ends up crashing due to
"Missing CPY op for types: f32 mxfp4".
This commit is contained in:
Wagner Bruna
2025-08-07 23:19:58 -03:00
committed by GitHub
parent 8f15461bea
commit eed5577aaa
2 changed files with 4 additions and 1 deletions
+3
View File
@@ -35,6 +35,9 @@
// #define STB_IMAGE_RESIZE_IMPLEMENTATION //already defined in llava
#include "stb_image_resize.h"
static_assert((int)SD_TYPE_COUNT == (int)GGML_TYPE_COUNT,
"inconsistency between SD_TYPE_COUNT and GGML_TYPE_COUNT");
enum SDMode {
TXT2IMG,
IMG2IMG,
+1 -1
View File
@@ -100,7 +100,7 @@ enum sd_type_t {
SD_TYPE_IQ4_NL_4_4 = 36,
// SD_TYPE_IQ4_NL_4_8 = 37,
// SD_TYPE_IQ4_NL_8_8 = 38,
SD_TYPE_COUNT = 39,
SD_TYPE_COUNT = 40,
};
SD_API const char* sd_type_name(enum sd_type_t type);