From dbc3db0d99e516d84e5144c5011c5099574d607e Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Sat, 14 Feb 2026 23:06:17 +0800 Subject: [PATCH] updated sdui --- embd_res/kcpp_sdui.embd | 34 +++++++++++++++++----------------- koboldcpp.py | 5 +++++ 2 files changed, 22 insertions(+), 17 deletions(-) diff --git a/embd_res/kcpp_sdui.embd b/embd_res/kcpp_sdui.embd index 1de8f4ed0..01e6e5d7d 100644 --- a/embd_res/kcpp_sdui.embd +++ b/embd_res/kcpp_sdui.embd @@ -5,18 +5,18 @@ Stable UI for KoboldCpp - diff --git a/koboldcpp.py b/koboldcpp.py index 225953b9a..dbf5a5162 100755 --- a/koboldcpp.py +++ b/koboldcpp.py @@ -2123,6 +2123,11 @@ def sd_generate(genparams): sample_steps = (1 if sample_steps < 1 else (forced_steplimit if sample_steps > forced_steplimit else sample_steps)) vid_req_frames = (1 if vid_req_frames < 1 else (100 if vid_req_frames > 100 else vid_req_frames)) + swap_refimg = (True if tryparseint(genparams.get("send_as_refimg", 0),0) else False) + if len(extra_images_arr)==0 and swap_refimg and init_images and init_images!="" and not mask: + extra_images_arr = [init_images] + init_images = "" + inputs = sd_generation_inputs() inputs.prompt = prompt.encode("UTF-8") inputs.negative_prompt = negative_prompt.encode("UTF-8")