diff --git a/ggml b/ggml index c538174..2d3876d 160000 --- a/ggml +++ b/ggml @@ -1 +1 @@ -Subproject commit c538174d261d8172480f87efcfec8e69aac13ebb +Subproject commit 2d3876d554551d35c06dccc5852be50d5fd2a275 diff --git a/stable-diffusion.cpp b/stable-diffusion.cpp index b44d563..730f4ba 100644 --- a/stable-diffusion.cpp +++ b/stable-diffusion.cpp @@ -765,11 +765,14 @@ public: denoiser = std::make_shared(shift); } else if (sd_version_is_flux(version)) { LOG_INFO("running in Flux FLOW mode"); - float shift = 1.0f; // TODO: validate - for (auto pair : model_loader.tensor_storages_types) { - if (pair.first.find("model.diffusion_model.guidance_in.in_layer.weight") != std::string::npos) { - shift = 1.15f; - break; + float shift = sd_ctx_params->flow_shift; + if (shift == INFINITY) { + shift = 1.0f; // TODO: validate + for (auto pair : model_loader.tensor_storages_types) { + if (pair.first.find("model.diffusion_model.guidance_in.in_layer.weight") != std::string::npos) { + shift = 1.15f; + break; + } } } denoiser = std::make_shared(shift);