mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-19 17:25:07 +02:00
fix for ltx
This commit is contained in:
@@ -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;
|
||||
};
|
||||
|
||||
@@ -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)
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user