From 7316c24bf66864711ad55691b644db2ef0b0d9f8 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Wed, 3 Dec 2025 18:38:54 +0800 Subject: [PATCH] fixes to load flux2 --- otherarch/sdcpp/stable-diffusion.cpp | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/otherarch/sdcpp/stable-diffusion.cpp b/otherarch/sdcpp/stable-diffusion.cpp index cf0f78e8d..393e9c5b5 100644 --- a/otherarch/sdcpp/stable-diffusion.cpp +++ b/otherarch/sdcpp/stable-diffusion.cpp @@ -267,9 +267,10 @@ public: bool iswan = (tempver==VERSION_WAN2 || tempver==VERSION_WAN2_2_I2V || tempver==VERSION_WAN2_2_TI2V); bool isqwenimg = (tempver==VERSION_QWEN_IMAGE); bool iszimg = (tempver==VERSION_Z_IMAGE); + bool isflux2 = (tempver==VERSION_FLUX2); //kcpp qol fallback: if qwen image, and they loaded the qwen2vl llm as t5 by mistake - if(isqwenimg && t5_path_fixed!="") + if((isqwenimg||iszimg||isflux2) && t5_path_fixed!="") { if(clipl_path_fixed=="" && clipg_path_fixed=="") { @@ -301,7 +302,7 @@ public: prefix = "cond_stage_model.transformer."; LOG_INFO("swap clip_vision from '%s'", clipl_path_fixed.c_str()); } - if(isqwenimg||iszimg) + if(isqwenimg||iszimg||isflux2) { prefix = "text_encoders.llm."; LOG_INFO("swap llm from '%s'", clipl_path_fixed.c_str());