Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 8 additions & 1 deletion src/pipeline/diffusion_engine.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1058,9 +1058,15 @@ void StableDiffusionGGML::configure_weight_loading() {
const auto& model_loader = model_manager->loader();
const auto wtype_stat = model_loader.get_wtype_stat();
bool have_int8_tensorwise = false;
bool have_quant_type_rule = false;
for (const auto& [_, tensor_storage] : model_loader.get_tensor_storage_map()) {
if (tensor_storage.is_int8_tensorwise) {
have_int8_tensorwise = true;
}
if (tensor_storage.expected_type < GGML_TYPE_COUNT && ggml_is_quantized(tensor_storage.expected_type)) {
have_quant_type_rule = true;
}
if (have_int8_tensorwise && have_quant_type_rule) {
break;
}
}
Expand All @@ -1077,7 +1083,8 @@ void StableDiffusionGGML::configure_weight_loading() {
const bool params_offloaded = params_backend_for(SDBackendModule::DIFFUSION) != backend_for(SDBackendModule::DIFFUSION);
const bool streaming_constrained = params_offloaded ||
backend_manager.params_backend_is_disk(SDBackendModule::DIFFUSION);
if (have_quantized_weight || streaming_constrained || row_split_active()) {

if (have_quant_type_rule || have_quantized_weight || streaming_constrained || row_split_active()) {
apply_lora_immediately = false;
} else {
apply_lora_immediately = true;
Expand Down
Loading