@@ -9034,6 +9034,7 @@ Current version: 123
9034
9034
gametext_arr.push(nimgtag);
9035
9035
image_db[imgid] = { done: false, queue: "Generating", result: "", prompt:"", local:true };
9036
9036
image_db[imgid].aspect = 0;
9037
+ image_db[imgid].imsource = 1; //0=generated,1=uploaded
9037
9038
let origImg = img.target.result;
9038
9039
let imgres = localsettings.img_allowhd?HD_RES_PX:NO_HD_RES_PX;
9039
9040
compressImage(origImg, (newDataUri) => {
@@ -10520,6 +10521,7 @@ Current version: 123
10520
10521
gametext_arr.push(nimgtag);
10521
10522
image_db[data.id] = { done: false, queue: "Starting", result: "", prompt:sentence, local:false };
10522
10523
image_db[data.id].aspect = (iwidth>iheight?2:(iwidth<iheight?1:0));
10524
+ image_db[imgid].imsource = 0; //0=generated,1=uploaded
10523
10525
console.log("New image queued " + nimgtag);
10524
10526
}
10525
10527
else {
@@ -10541,6 +10543,7 @@ Current version: 123
10541
10543
gametext_arr.push(nimgtag);
10542
10544
image_db[imgid] = { done: false, queue: "Generating", result: "", prompt:sentence, local:true };
10543
10545
image_db[imgid].aspect = (iwidth>iheight?2:(iwidth<iheight?1:0));
10546
+ image_db[imgid].imsource = 0; //0=generated,1=uploaded
10544
10547
generate_a1111_image(genimg_payload,(outputimg)=>{
10545
10548
if(outputimg)
10546
10549
{
@@ -10570,6 +10573,7 @@ Current version: 123
10570
10573
gametext_arr.push(nimgtag);
10571
10574
image_db[imgid] = { done: false, queue: "Generating", result: "", prompt:sentence, local:true };
10572
10575
image_db[imgid].aspect = 0;
10576
+ image_db[imgid].imsource = 0; //0=generated,1=uploaded
10573
10577
generate_dalle_image(genimg_payload,(outputimg)=>{
10574
10578
if(outputimg)
10575
10579
{
@@ -11171,8 +11175,8 @@ Current version: 123
11171
11175
console.log("Replacing with Image: " + matchstr);
11172
11176
gametext_arr[i] = gametext_arr[i].replace(matchstr, newstr);
11173
11177
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};
11176
11180
delete image_db[key];
11177
11181
}
11178
11182
}
0 commit comments