From 4587ccb71a32bb3fcf84b4b2c3a3f9d322fca4f0 Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Thu, 2 Oct 2025 10:41:29 +0800 Subject: [PATCH] prepare to refactor reference image --- otherarch/sdcpp/sdtype_adapter.cpp | 38 ++++++++++++++++++++---------- 1 file changed, 26 insertions(+), 12 deletions(-) diff --git a/otherarch/sdcpp/sdtype_adapter.cpp b/otherarch/sdcpp/sdtype_adapter.cpp index 1fe7a43fc..82d9f630e 100644 --- a/otherarch/sdcpp/sdtype_adapter.cpp +++ b/otherarch/sdcpp/sdtype_adapter.cpp @@ -679,17 +679,32 @@ sd_generation_outputs sdtype_generate(const sd_generation_inputs inputs) } std::vector reference_imgs; + std::vector wan_imgs; bool is_wan = (loadedsdver == SDVersion::VERSION_WAN2 || loadedsdver == SDVersion::VERSION_WAN2_2_I2V || loadedsdver == SDVersion::VERSION_WAN2_2_TI2V); bool is_kontext = (loadedsdver==SDVersion::VERSION_FLUX && !loaded_model_is_chroma(sd_ctx)); - if(extra_image_data.size()>0 && (is_wan || is_kontext)) + if(extra_image_data.size()>0) { - for(int i=0;i0) + if(wan_imgs.size()>0) { - if(reference_imgs.size()>=1) + if(wan_imgs.size()>=1) { - vid_gen_params.init_image = reference_imgs[0]; + vid_gen_params.init_image = wan_imgs[0]; } - if(reference_imgs.size()>=2) + if(wan_imgs.size()>=2) { - vid_gen_params.end_image = reference_imgs[1]; + vid_gen_params.end_image = wan_imgs[1]; } } if(!sd_is_quiet && sddebugmode==1) @@ -775,7 +789,7 @@ sd_generation_outputs sdtype_generate(const sd_generation_inputs inputs) << "\nSTRENGTH:" << vid_gen_params.strength << "\nFRAMES:" << vid_gen_params.video_frames << "\nCTRL_FRM:" << vid_gen_params.control_frames_size - << "\nREF_IMGS:" << reference_imgs.size() + << "\nINIT_IMGS:" << wan_imgs.size() << "\n\n"; printf("%s", ss.str().c_str()); }