CFG: Add insertion depth and custom separator

Insertion depth allows for CFG to variably inject itself into the
negative prompt. This is similar to how Author's note works.

However, this method of insertion depth conflicts with AN and
world info where negatives can be meshed between two lines
of those specific insertions.

A custom separator must be wrapped in quotes, otherwise the default
separator is a newline for negative cascading.

Signed-off-by: kingbri <bdashore3@proton.me>
This commit is contained in:
kingbri
2023-08-19 01:19:22 -04:00
parent cdbca6d9fd
commit 7191f7a8ad
6 changed files with 79 additions and 45 deletions

View File

@ -235,7 +235,12 @@ async function generateTextGenWithStreaming(generate_data, signal) {
}
}
export function getTextGenGenerationData(finalPromt, this_amount_gen, isImpersonate, cfgValues) {
export function getTextGenGenerationData(finalPromt, this_amount_gen, isImpersonate) {
let cfgValues = {};
if (!isImpersonate) {
cfgValues = getCfg(finalPromt);
}
return {
'prompt': finalPromt,
'max_new_tokens': this_amount_gen,