Skip to content

Commit 95c8090

Browse files
committed
updated lite
1 parent 227f59d commit 95c8090

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

klite.embd

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9034,6 +9034,7 @@ Current version: 123
90349034
gametext_arr.push(nimgtag);
90359035
image_db[imgid] = { done: false, queue: "Generating", result: "", prompt:"", local:true };
90369036
image_db[imgid].aspect = 0;
9037+
image_db[imgid].imsource = 1; //0=generated,1=uploaded
90379038
let origImg = img.target.result;
90389039
let imgres = localsettings.img_allowhd?HD_RES_PX:NO_HD_RES_PX;
90399040
compressImage(origImg, (newDataUri) => {
@@ -10520,6 +10521,7 @@ Current version: 123
1052010521
gametext_arr.push(nimgtag);
1052110522
image_db[data.id] = { done: false, queue: "Starting", result: "", prompt:sentence, local:false };
1052210523
image_db[data.id].aspect = (iwidth>iheight?2:(iwidth<iheight?1:0));
10524+
image_db[imgid].imsource = 0; //0=generated,1=uploaded
1052310525
console.log("New image queued " + nimgtag);
1052410526
}
1052510527
else {
@@ -10541,6 +10543,7 @@ Current version: 123
1054110543
gametext_arr.push(nimgtag);
1054210544
image_db[imgid] = { done: false, queue: "Generating", result: "", prompt:sentence, local:true };
1054310545
image_db[imgid].aspect = (iwidth>iheight?2:(iwidth<iheight?1:0));
10546+
image_db[imgid].imsource = 0; //0=generated,1=uploaded
1054410547
generate_a1111_image(genimg_payload,(outputimg)=>{
1054510548
if(outputimg)
1054610549
{
@@ -10570,6 +10573,7 @@ Current version: 123
1057010573
gametext_arr.push(nimgtag);
1057110574
image_db[imgid] = { done: false, queue: "Generating", result: "", prompt:sentence, local:true };
1057210575
image_db[imgid].aspect = 0;
10576+
image_db[imgid].imsource = 0; //0=generated,1=uploaded
1057310577
generate_dalle_image(genimg_payload,(outputimg)=>{
1057410578
if(outputimg)
1057510579
{
@@ -11171,8 +11175,8 @@ Current version: 123
1117111175
console.log("Replacing with Image: " + matchstr);
1117211176
gametext_arr[i] = gametext_arr[i].replace(matchstr, newstr);
1117311177
let metaid = cyrb_hash(img.result);
11174-
//default to llava if supported
11175-
completed_imgs_meta[metaid] = {prompt:image_db[key].prompt, desc:"", visionmode:(is_using_kcpp_with_llava()?3:0), aspect:image_db[key].aspect};
11178+
//default to llava if supported, and image is self uploaded
11179+
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};
1117611180
delete image_db[key];
1117711181
}
1117811182
}

0 commit comments

Comments
 (0)