Fix Top K disabled state for Infermatic.

Also an icon.
This commit is contained in:
Cohee
2024-05-04 02:37:05 +03:00
parent 7bfd666321
commit 05db2552b3
2 changed files with 42 additions and 2 deletions

View File

@ -578,7 +578,7 @@ jQuery(function () {
const type = String($(this).val());
settings.type = type;
if (settings.type === textgen_types.VLLM || settings.type === textgen_types.APHRODITE) {
if ([VLLM, APHRODITE, INFERMATICAI].includes(settings.type)) {
$('#mirostat_mode_textgenerationwebui').attr('step', 2); //Aphro disallows mode 1
$('#do_sample_textgenerationwebui').prop('checked', true); //Aphro should always do sample; 'otherwise set temp to 0 to mimic no sample'
$('#ban_eos_token_textgenerationwebui').prop('checked', false); //Aphro should not ban EOS, just ignore it; 'add token '2' to ban list do to this'
@ -619,7 +619,7 @@ jQuery(function () {
$('#samplerResetButton').off('click').on('click', function () {
const inputs = {
'temp_textgenerationwebui': 1,
'top_k_textgenerationwebui': 0,
'top_k_textgenerationwebui': [INFERMATICAI, APHRODITE, VLLM].includes(settings.type) ? -1 : 0,
'top_p_textgenerationwebui': 1,
'min_p_textgenerationwebui': 0,
'rep_pen_textgenerationwebui': 1,