fixed ordering in image generation source, and max token length for llm models

88ada0f67df38df98d3444648bf0f71a13323300

Edward Kim <edwardkim.ek@gmail.com>

2 files changed, +14 -3Showing whitespace changes
public/scripts/extensions/stable-diffusion/settings.html+1 -1
@@ -37,6 +37,7 @@
3737 </label>
3838 <label for="sd_source" data-i18n="Source">Source</label>
3939 <select id="sd_source">
40+ <option value="blockentropy">Block Entropy</option>
4041 <option value="comfy">ComfyUI</option>
4142 <option value="drawthings">DrawThings HTTP API</option>
4243 <option value="extras">Extras API (local / remote)</option>
@@ -48,7 +49,6 @@
4849 <option value="auto">Stable Diffusion Web UI (AUTOMATIC1111)</option>
4950 <option value="horde">Stable Horde</option>
5051 <option value="togetherai">TogetherAI</option>
51- <option value="blockentropy">Block Entropy</option>
5252 </select>
5353 <div data-sd-source="auto">
5454 <label for="sd_auto_url">SD Web UI URL</label>
public/scripts/openai.js+13 -2
@@ -120,6 +120,7 @@ const default_bias_presets = {
120120const max_2k = 2047;
121121const max_4k = 4095;
122122const max_8k = 8191;
123+const max_12k = 12287;
123124const max_16k = 16383;
124125const max_32k = 32767;
125126const max_64k = 65535;
@@ -4333,8 +4334,18 @@ async function onModelChange() {
43334334 if (oai_settings.chat_completion_source === chat_completion_sources.BLOCKENTROPY) {
43344335 if (oai_settings.max_context_unlocked) {
43354336 $('#openai_max_context').attr('max', unlocked_max);
43364337 } else {
4337- $('#openai_max_context').attr('max', max_32k);
4338+ else if (oai_settings.groq_model.includes('llama3.1')) {
4339+ $('#openai_max_context').attr('max', max_16k);
4340+ }
4341+ else if (oai_settings.groq_model.includes('72b')) {
4342+ $('#openai_max_context').attr('max', max_16k);
4343+ }
4344+ else if (oai_settings.groq_model.includes('120b')) {
4345+ $('#openai_max_context').attr('max', max_12k);
4346+ }
4347+ else {
4348+ $('#openai_max_context').attr('max', max_8k);
43384349 }
43394350
43404351 oai_settings.openai_max_context = Math.min(oai_settings.openai_max_context, Number($('#openai_max_context').attr('max')));