This commit is contained in:
Jasper Blues 2026-11-27 03:33:49 +09:00 • committed by GitHub
commit dc9ab42e35
No known key found for this signature in database
GPG key ID: B5690EEEBB952194

View file

@ -19,7 +19,9 @@ namespace sd::dgl::models {
const auto& tensors = loader.get_tensor_storage_map();
const bool quantized = std::any_of(tensors.begin(), tensors.end(), [](const auto& entry) {
const auto& tensor = entry.second;
return tensor.w4_convrot_kind ||
// Merging into fp8 weights needs a CPY to fp8, which Vulkan cannot run.
const ggml_type type = tensor.expected_type < GGML_TYPE_COUNT ? tensor.expected_type : tensor.type;
return tensor.w4_convrot_kind || type == GGML_TYPE_F8_E4M3 || type == GGML_TYPE_F8_E5M2 ||
(!tensor.is_int8_tensorwise &&
(ggml_is_quantized(tensor.type) ||
(tensor.expected_type < GGML_TYPE_COUNT && ggml_is_quantized(tensor.expected_type))));