From 56d95bfa12a5ee6ef707ae56a9ae2ff09fca92af Mon Sep 17 00:00:00 2001 From: linzch3 Date: Sun, 22 Nov 2026 08:51:19 -0500 Subject: [PATCH] fix: default asym_w4a8_int8 group_size to 16 like ComfyUI (#2388) --- src/model_io/safetensors_io.cpp | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/model_io/safetensors_io.cpp b/src/model_io/safetensors_io.cpp index 05860626..29b94eb8 100644 --- a/src/model_io/safetensors_io.cpp +++ b/src/model_io/safetensors_io.cpp @@ -147,6 +147,10 @@ static bool read_comfy_quant_config(std::ifstream& file, config.convrot = true; config.group_size = json.value("convrot_groupsize", 256); } + if (config.format == "asym_w4a8_int8") { + // ComfyUI defaults the W4A8 weight group size to 16 when the key is missing. + config.weight_group_size = json.value("group_size", 16); + } } catch (const std::exception&) { set_error(error, "parsing ComfyUI quantization metadata tensor failed: '" + tensor_name + "'"); return false;