mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-06-05 21:59:27 +02:00
CFG: Add per-chat CFG and fixes
Per-chat CFG applies a CFG setting per-chat only rather than character or globally. This overrides all other CFG settings (this will be changed). Also add fixes to remove character CFG entries properly and not to apply CFG if the scale is 1 as that won't do anything to generation. Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
@ -232,7 +232,7 @@ async function generateTextGenWithStreaming(generate_data, signal) {
|
||||
}
|
||||
|
||||
export function getTextGenGenerationData(finalPromt, this_amount_gen, isImpersonate) {
|
||||
const { guidanceScale, negativePrompt } = getCfg();
|
||||
const cfgValues = getCfg();
|
||||
|
||||
return {
|
||||
'prompt': finalPromt,
|
||||
@ -251,8 +251,8 @@ export function getTextGenGenerationData(finalPromt, this_amount_gen, isImperson
|
||||
'penalty_alpha': textgenerationwebui_settings.penalty_alpha,
|
||||
'length_penalty': textgenerationwebui_settings.length_penalty,
|
||||
'early_stopping': textgenerationwebui_settings.early_stopping,
|
||||
'guidance_scale': guidanceScale ?? 1,
|
||||
'negative_prompt': negativePrompt ?? '',
|
||||
'guidance_scale': cfgValues?.guidanceScale ?? 1,
|
||||
'negative_prompt': cfgValues?.negativePrompt ?? '',
|
||||
'seed': textgenerationwebui_settings.seed,
|
||||
'add_bos_token': textgenerationwebui_settings.add_bos_token,
|
||||
'stopping_strings': getStoppingStrings(isImpersonate, false),
|
||||
|
Reference in New Issue
Block a user