diff --git a/otherarch/sdcpp/kcpp_sd_extensions.h b/otherarch/sdcpp/kcpp_sd_extensions.h index cdf3d194a..c65c11c35 100644 --- a/otherarch/sdcpp/kcpp_sd_extensions.h +++ b/otherarch/sdcpp/kcpp_sd_extensions.h @@ -18,6 +18,7 @@ namespace kcpp_sd { bool is_sdxl; bool is_wan; bool is_zimage; + bool is_ltx; int vae_scale_factor; int spatial_multiple; }; diff --git a/otherarch/sdcpp/sdtype_adapter.cpp b/otherarch/sdcpp/sdtype_adapter.cpp index 007992123..976dbe83d 100644 --- a/otherarch/sdcpp/sdtype_adapter.cpp +++ b/otherarch/sdcpp/sdtype_adapter.cpp @@ -565,7 +565,7 @@ bool sdtype_load_model(const sd_load_model_inputs inputs) { } } - if (info.is_wan) + if (info.is_wan || info.is_ltx) { printf("\nSetting to Video Generation Mode!\n"); is_vid_model = true; @@ -1004,7 +1004,7 @@ static std::string raw_image_to_png_base64(const sd_image_t& img, std::string pa bool supports_reference_images(kcpp_sd::model_info info) { - bool supported = (info.is_wan || info.is_qwenimg || info.is_flux2 || info.is_kontext || photomaker_enabled); + bool supported = (info.is_wan || info.is_ltx || info.is_qwenimg || info.is_flux2 || info.is_kontext || photomaker_enabled); return supported; } @@ -1099,7 +1099,7 @@ sd_generation_outputs sdtype_generate(const sd_generation_inputs inputs) extra_image_data.clear(); } - if(info.is_wan && extra_image_data.size()==0 && is_img2img) + if ((info.is_wan || info.is_ltx) && extra_image_data.size() == 0 && is_img2img) { extra_image_data.push_back(img2img_data); } @@ -1181,7 +1181,7 @@ sd_generation_outputs sdtype_generate(const sd_generation_inputs inputs) int desiredchannels = 3; if(supports_reference_images(info)) { - if(info.is_wan) + if(info.is_wan || info.is_ltx) { uint8_t * loaded = load_image_from_b64(extra_image_data[i],nx2,ny2,img2imgW,img2imgH,3); if(loaded) diff --git a/otherarch/sdcpp/stable-diffusion.cpp b/otherarch/sdcpp/stable-diffusion.cpp index 21d6d68e4..0f04d6d8c 100644 --- a/otherarch/sdcpp/stable-diffusion.cpp +++ b/otherarch/sdcpp/stable-diffusion.cpp @@ -5715,6 +5715,7 @@ namespace kcpp_sd { res.is_sd1 = (loadedsdver == SDVersion::VERSION_SD1); res.is_sd2 = (loadedsdver == SDVersion::VERSION_SD2); res.is_sdxl = sd_version_is_sdxl((SDVersion)loadedsdver); + res.is_ltx = sd_version_is_ltxav((SDVersion)loadedsdver); res.vae_scale_factor = ctx->sd->get_vae_scale_factor(); res.spatial_multiple = get_spatial_multiple(ctx); return res;