mirror of
https://github.com/LostRuins/koboldcpp.git
synced 2026-09-20 01:31:42 +02:00
avoid euler a for flux (+4 squashed commit)
Squashed commit: [5a4b72385] fix cuda build [5f969a645] add vulkan information [6849e7398] fixed flux [740e80419] update readme
This commit is contained in:
+55
-9
@@ -4300,6 +4300,7 @@ Current version indicated by LITEVER below.
|
||||
const default_openrouter_base = "https://openrouter.ai/api/v1";
|
||||
const default_mistralai_base = "https://api.mistral.ai/v1";
|
||||
const default_featherless_base = "https://api.featherless.ai/v1";
|
||||
const default_grok_base = "https://api.x.ai/v1";
|
||||
const default_oai_base = "https://api.openai.com";
|
||||
const default_claude_base = "https://api.anthropic.com";
|
||||
const default_palm_base = "https://generativelanguage.googleapis.com/v1beta2/models/text-bison-001:generateText?key=";
|
||||
@@ -4446,6 +4447,7 @@ Current version indicated by LITEVER below.
|
||||
saved_openrouter_key: "",
|
||||
saved_mistralai_key: "",
|
||||
saved_featherless_key: "",
|
||||
saved_grok_key:"",
|
||||
saved_claude_key: "", //do not ever share this in save files!
|
||||
saved_claude_addr: default_claude_base, //do not ever share this in save files!
|
||||
saved_palm_key: "", //do not ever share this in save files!
|
||||
@@ -4513,7 +4515,7 @@ Current version indicated by LITEVER below.
|
||||
img_img2imgstr: 0.6,
|
||||
img_steps: 20,
|
||||
img_sampler: "Euler a",
|
||||
img_aspect:0, //0=square,1=portrait,2=landscape
|
||||
img_aspect:0, //0=square,1=portrait,2=landscape,3=bigsquare
|
||||
save_images: true,
|
||||
save_remote_images: false,
|
||||
prompt_for_savename: false,
|
||||
@@ -6387,6 +6389,7 @@ Current version indicated by LITEVER below.
|
||||
new_save_storyobj.savedsettings.saved_openrouter_key = "";
|
||||
new_save_storyobj.savedsettings.saved_mistralai_key = "";
|
||||
new_save_storyobj.savedsettings.saved_featherless_key = "";
|
||||
new_save_storyobj.savedsettings.saved_grok_key = "";
|
||||
new_save_storyobj.savedsettings.saved_palm_key = "";
|
||||
new_save_storyobj.savedsettings.saved_cohere_key = "";
|
||||
|
||||
@@ -6730,6 +6733,7 @@ Current version indicated by LITEVER below.
|
||||
let tmp_or1 = localsettings.saved_openrouter_key;
|
||||
let tmp_mai = localsettings.saved_mistralai_key;
|
||||
let tmp_fai = localsettings.saved_featherless_key;
|
||||
let tmp_grok = localsettings.saved_grok_key;
|
||||
let tmp_claude1 = localsettings.saved_claude_key;
|
||||
let tmp_claude2 = localsettings.saved_claude_addr;
|
||||
let tmp_palm1 = localsettings.saved_palm_key;
|
||||
@@ -6770,6 +6774,7 @@ Current version indicated by LITEVER below.
|
||||
localsettings.saved_openrouter_key = tmp_or1;
|
||||
localsettings.saved_mistralai_key = tmp_mai;
|
||||
localsettings.saved_featherless_key = tmp_fai;
|
||||
localsettings.saved_grok_key = tmp_grok;
|
||||
localsettings.saved_claude_key = tmp_claude1;
|
||||
localsettings.saved_claude_addr = tmp_claude2;
|
||||
localsettings.saved_palm_key = tmp_palm1;
|
||||
@@ -8782,6 +8787,8 @@ Current version indicated by LITEVER below.
|
||||
return document.getElementById("custom_mistralai_model");
|
||||
case "8":
|
||||
return document.getElementById("custom_featherless_model");
|
||||
case "9":
|
||||
return document.getElementById("custom_grok_model");
|
||||
default:
|
||||
return document.getElementById("custom_oai_model");
|
||||
}
|
||||
@@ -8887,7 +8894,12 @@ Current version indicated by LITEVER below.
|
||||
}
|
||||
else
|
||||
{
|
||||
msgbox(JSON.stringify(data.error.message),"Error Encountered",false,false);
|
||||
let errmsg = data.error.message;
|
||||
if(!errmsg)
|
||||
{
|
||||
errmsg = data.error;
|
||||
}
|
||||
msgbox(JSON.stringify(errmsg),"Error Encountered",false,false);
|
||||
}
|
||||
})
|
||||
.catch(error => {
|
||||
@@ -8944,6 +8956,7 @@ Current version indicated by LITEVER below.
|
||||
document.getElementById("custom_openrouter_model").classList.add("hidden");
|
||||
document.getElementById("custom_mistralai_model").classList.add("hidden");
|
||||
document.getElementById("custom_featherless_model").classList.add("hidden");
|
||||
document.getElementById("custom_grok_model").classList.add("hidden");
|
||||
document.getElementById("hordeloadmodelcontainer").classList.add("hidden");
|
||||
document.getElementById("coherecustom").classList.add("hidden");
|
||||
|
||||
@@ -8961,12 +8974,13 @@ Current version indicated by LITEVER below.
|
||||
document.getElementById("customkoboldkey").value = localsettings.saved_kai_key;
|
||||
}
|
||||
}
|
||||
else if(epchoice==2 || epchoice==3 || epchoice==7 || epchoice==8)
|
||||
else if(epchoice==2 || epchoice==3 || epchoice==7 || epchoice==8 || epchoice==9)
|
||||
{
|
||||
document.getElementById("oaicustom").classList.remove("hidden");
|
||||
document.getElementById("openrouterdesc").classList.add("hidden");
|
||||
document.getElementById("mistralaidesc").classList.add("hidden");
|
||||
document.getElementById("featherlessdesc").classList.add("hidden");
|
||||
document.getElementById("grokdesc").classList.add("hidden");
|
||||
document.getElementById("oaidesc").classList.add("hidden");
|
||||
if(epchoice==2)
|
||||
{
|
||||
@@ -8998,6 +9012,14 @@ Current version indicated by LITEVER below.
|
||||
document.getElementById("custom_oai_endpoint").value = default_featherless_base;
|
||||
try_fetch_oai_models_auto();
|
||||
}
|
||||
else if(epchoice==9)
|
||||
{
|
||||
document.getElementById("custom_grok_model").classList.remove("hidden");
|
||||
document.getElementById("grokdesc").classList.remove("hidden");
|
||||
document.getElementById("custom_oai_endpoint").classList.add("hidden");
|
||||
document.getElementById("custom_oai_key").value = localsettings.saved_grok_key;
|
||||
document.getElementById("custom_oai_endpoint").value = default_grok_base;
|
||||
}
|
||||
else //openrouter supports autofetch
|
||||
{
|
||||
document.getElementById("openrouterdesc").classList.remove("hidden");
|
||||
@@ -9408,7 +9430,7 @@ Current version indicated by LITEVER below.
|
||||
});
|
||||
}
|
||||
}
|
||||
else if(epchoice==2 || epchoice==3 || epchoice==7 || epchoice==8) //connect to OAI / OpenRouter / MistralAI / Featherless Endpoint
|
||||
else if(epchoice==2 || epchoice==3 || epchoice==7 || epchoice==8 || epchoice==9) //connect to OAI / OpenRouter / MistralAI / Featherless / Grok Endpoint
|
||||
{
|
||||
let desired_oai_key = document.getElementById("custom_oai_key").value.trim();
|
||||
let desired_oai_ep = document.getElementById("custom_oai_endpoint").value.trim();
|
||||
@@ -9444,6 +9466,10 @@ Current version indicated by LITEVER below.
|
||||
{
|
||||
localsettings.saved_featherless_key = custom_oai_key;
|
||||
}
|
||||
else if(epchoice==9)
|
||||
{
|
||||
localsettings.saved_grok_key = custom_oai_key;
|
||||
}
|
||||
else
|
||||
{
|
||||
localsettings.saved_openrouter_key = custom_oai_key;
|
||||
@@ -13117,13 +13143,13 @@ Current version indicated by LITEVER below.
|
||||
"temperature": submit_payload.params.temperature,
|
||||
"top_p": submit_payload.params.top_p,
|
||||
}
|
||||
if(localsettings.request_logprobs && !targetep.toLowerCase().includes("api.mistral.ai"))
|
||||
if(localsettings.request_logprobs && !targetep.toLowerCase().includes("api.x.ai") && !targetep.toLowerCase().includes("api.mistral.ai"))
|
||||
{
|
||||
if(document.getElementById("useoaichatcompl").checked)
|
||||
if(document.getElementById("useoaichatcompl").checked || targetep.toLowerCase().includes("api.x.ai"))
|
||||
{
|
||||
oai_payload.logprobs = true;
|
||||
oai_payload.top_logprobs = 5;
|
||||
}else{
|
||||
} else {
|
||||
oai_payload.logprobs = 5;
|
||||
}
|
||||
}
|
||||
@@ -13781,6 +13807,11 @@ Current version indicated by LITEVER below.
|
||||
{
|
||||
iwidth = 768;
|
||||
}
|
||||
else if(localsettings.img_aspect==3)
|
||||
{
|
||||
iwidth = 768;
|
||||
iheight = 768;
|
||||
}
|
||||
|
||||
let genimg_payload = {
|
||||
"prompt": (sentence + negprompt),
|
||||
@@ -16911,6 +16942,9 @@ Current version indicated by LITEVER below.
|
||||
}else if(custom_oai_endpoint.toLowerCase().includes("featherless.ai"))
|
||||
{
|
||||
localsettings.prev_custom_endpoint_type = 8;
|
||||
}else if(custom_oai_endpoint.toLowerCase().includes("api.x.ai"))
|
||||
{
|
||||
localsettings.prev_custom_endpoint_type = 9;
|
||||
}
|
||||
}
|
||||
else if(custom_claude_key!="")
|
||||
@@ -18239,7 +18273,7 @@ Current version indicated by LITEVER below.
|
||||
|
||||
<li class="nav-item hidden" id="topbtn_save_load">
|
||||
<a id="tempfile" href="#" style="display:none;"></a>
|
||||
<input type="file" id="loadfileinput" accept="text/json,application/json,image/png,image/webp,text/plain,*/*" onchange="load_file(event)" style="display:none;">
|
||||
<input type="file" id="loadfileinput" accept="*" onchange="load_file(event)" style="display:none;">
|
||||
<a class="nav-link mainnav" href="#" onclick="closeTopNav();display_saveloadcontainer()">Save / Load</a>
|
||||
</li>
|
||||
<li class="nav-item hidden" id="topbtn_settings">
|
||||
@@ -18492,6 +18526,7 @@ Current version indicated by LITEVER below.
|
||||
<option value="6">Cohere API</option>
|
||||
<option value="7">MistralAI API</option>
|
||||
<option value="8">Featherless API</option>
|
||||
<option value="9">Grok API</option>
|
||||
</select>
|
||||
</div>
|
||||
|
||||
@@ -18566,6 +18601,11 @@ Current version indicated by LITEVER below.
|
||||
Note that KoboldAI Lite takes no responsibility for your usage or consequences of this feature. Your API key is used directly with the Featherless API and is not transmitted to us.<br>Only Temperature, Top-P, Top-K, Min-P and Repetition Penalty samplers are used.<br><br>
|
||||
<span class="color_green" style="font-weight: bold;">Please input Featherless Key.</span><br><br>
|
||||
</span>
|
||||
<span id="grokdesc" class="hidden">
|
||||
Entering your Grok API key will allow you to use KoboldAI Lite with their API.<br><br>
|
||||
Note that KoboldAI Lite takes no responsibility for your usage or consequences of this feature. Your API key is used directly with the Grok API and is not transmitted to us.<br>Only Temperature, Top-P, Top-K, Min-P and Repetition Penalty samplers are used.<br><br>
|
||||
<span class="color_green" style="font-weight: bold;">Please input Grok Key.</span><br><br>
|
||||
</span>
|
||||
|
||||
<input class="form-control" type="text" id="custom_oai_endpoint" placeholder="OpenAI API URL" value="" onblur="try_fetch_oai_models_auto()">
|
||||
<input class="form-control" type="password" id="custom_oai_key" placeholder="API Key (Required)" value="" onfocus="focus_api_keys()" onblur="blur_api_keys()"><br>
|
||||
@@ -18617,6 +18657,10 @@ Current version indicated by LITEVER below.
|
||||
<option value="meta-llama/Meta-Llama-3.1-405B-Instruct">meta-llama/Meta-Llama-3.1-405B-Instruct</option>
|
||||
<option style="display:none;" class="custom_model_option" value="custom">[Custom]</option>
|
||||
</select>
|
||||
<select style="padding:4px;display:inline;width:calc(100% - 220px)" class="form-control hidden" id="custom_grok_model" onchange="oai_model_change(true)">
|
||||
<option value="grok-beta">grok-beta</option>
|
||||
<option style="display:none;" class="custom_model_option" value="custom">[Custom]</option>
|
||||
</select>
|
||||
<button type="button" class="btn btn-primary" style="display:inline;width:105px;" id="oaifetchlist" onclick="oai_fetch_models()">Fetch List</button>
|
||||
<button type="button" class="btn btn-primary" style="display:inline;width:105px;" id="oaiusecustom" onclick="select_custom_oai_model()">Use Custom</button>
|
||||
<div style="display:inline-flex">
|
||||
@@ -18687,6 +18731,7 @@ Current version indicated by LITEVER below.
|
||||
<option value="claude-3-5-sonnet-20240620">claude-3-5-sonnet-20240620</option>
|
||||
<option value="claude-3-5-sonnet-20241022">claude-3-5-sonnet-20241022</option>
|
||||
<option value="claude-3-5-sonnet-latest">claude-3-5-sonnet-latest</option>
|
||||
<option value="claude-3-5-haiku-20241022">claude-3-5-haiku-20241022</option>
|
||||
</select>
|
||||
<input type="checkbox" id="claudeaddversion" onchange="" checked>
|
||||
<div class="box-label" title="Add endpoint version">Add Endpoint Version</div>
|
||||
@@ -19470,6 +19515,7 @@ Current version indicated by LITEVER below.
|
||||
<option value="0">Square</option>
|
||||
<option value="1">Portrait</option>
|
||||
<option value="2">Landscape</option>
|
||||
<option value="3">BigSquare</option>
|
||||
</select>
|
||||
</div>
|
||||
<div class="inlinelabel">
|
||||
@@ -19621,7 +19667,7 @@ Current version indicated by LITEVER below.
|
||||
<input title="Inverted Colors" type="checkbox" id="invert_colors" style="margin:0px 0px 0px auto;">
|
||||
</div>
|
||||
<div class="settinglabel">
|
||||
<input type="file" id="loadbgimg" accept="image/png,image/webp,.webp,.jpg,.jpeg,.png,*.*,*" onchange="load_bg_img(event)" style="display:none;">
|
||||
<input type="file" id="loadbgimg" accept="image/*" onchange="load_bg_img(event)" style="display:none;">
|
||||
<div class="justifyleft settingsmall">Background Img</div>
|
||||
<button title="Set Background Image" type="button" class="btn btn-primary bg_green" style="padding:2px 2px;margin:0px 0px 0px auto;font-size:10px;" onclick="load_bgimg_button()">Set</button>
|
||||
<button title="Remove Background Image" type="button" class="btn btn-primary bg_red" style="padding:2px 2px;margin:0px 0px 0px 1px;font-size:10px;" onclick="clear_bg_img()">Clear</button>
|
||||
|
||||
Reference in New Issue
Block a user