From 95c809096759cb0b52ac62e02e2bccc9d911d6eb Mon Sep 17 00:00:00 2001 From: Concedo <39025047+LostRuins@users.noreply.github.com> Date: Mon, 11 Mar 2024 21:59:18 +0800 Subject: [PATCH] updated lite --- klite.embd | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/klite.embd b/klite.embd index 7446476b4..996a3b912 100644 --- a/klite.embd +++ b/klite.embd @@ -9034,6 +9034,7 @@ Current version: 123 gametext_arr.push(nimgtag); image_db[imgid] = { done: false, queue: "Generating", result: "", prompt:"", local:true }; image_db[imgid].aspect = 0; + image_db[imgid].imsource = 1; //0=generated,1=uploaded let origImg = img.target.result; let imgres = localsettings.img_allowhd?HD_RES_PX:NO_HD_RES_PX; compressImage(origImg, (newDataUri) => { @@ -10520,6 +10521,7 @@ Current version: 123 gametext_arr.push(nimgtag); image_db[data.id] = { done: false, queue: "Starting", result: "", prompt:sentence, local:false }; image_db[data.id].aspect = (iwidth>iheight?2:(iwidthiheight?2:(iwidth{ if(outputimg) { @@ -10570,6 +10573,7 @@ Current version: 123 gametext_arr.push(nimgtag); image_db[imgid] = { done: false, queue: "Generating", result: "", prompt:sentence, local:true }; image_db[imgid].aspect = 0; + image_db[imgid].imsource = 0; //0=generated,1=uploaded generate_dalle_image(genimg_payload,(outputimg)=>{ if(outputimg) { @@ -11171,8 +11175,8 @@ Current version: 123 console.log("Replacing with Image: " + matchstr); gametext_arr[i] = gametext_arr[i].replace(matchstr, newstr); let metaid = cyrb_hash(img.result); - //default to llava if supported - completed_imgs_meta[metaid] = {prompt:image_db[key].prompt, desc:"", visionmode:(is_using_kcpp_with_llava()?3:0), aspect:image_db[key].aspect}; + //default to llava if supported, and image is self uploaded + completed_imgs_meta[metaid] = {prompt:image_db[key].prompt, desc:"", visionmode:((image_db[key].imsource==1 && is_using_kcpp_with_llava())?3:0), aspect:image_db[key].aspect}; delete image_db[key]; } }