Skip to content

Commit 56d95bf

Browse files
authored
fix: default asym_w4a8_int8 group_size to 16 like ComfyUI (#2388)
1 parent a852f49 commit 56d95bf

1 file changed

Lines changed: 4 additions & 0 deletions

File tree

‎src/model_io/safetensors_io.cpp‎

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -147,6 +147,10 @@ static bool read_comfy_quant_config(std::ifstream& file,
147147
config.convrot = true;
148148
config.group_size = json.value("convrot_groupsize", 256);
149149
}
150+
if (config.format == "asym_w4a8_int8") {
151+
// ComfyUI defaults the W4A8 weight group size to 16 when the key is missing.
152+
config.weight_group_size = json.value("group_size", 16);
153+
}
150154
} catch (const std::exception&) {
151155
set_error(error, "parsing ComfyUI quantization metadata tensor failed: '" + tensor_name + "'");
152156
return false;

0 commit comments

Comments
 (0)