mirror of
https://github.com/SillyTavern/SillyTavern.git
synced 2025-02-23 07:27:41 +01:00
This allows for flexibility with global, character, and chat negative prompts. Combining prompts is very useful for users who want to maintain a set of global negatives and then add extra layers on top of that. The ordering is chat -> character -> global tags due to the specificity of each. The guidance scale follows the cascade of chat -> character -> global due to being one number that is set when CFG is fired. If the guidance scale is 1, nothing happens. Signed-off-by: kingbri <bdashore3@proton.me>
128 lines
6.7 KiB
HTML
128 lines
6.7 KiB
HTML
<div id="cfgConfig" class="drawer-content flexGap5">
|
|
<div class="panelControlBar flex-container">
|
|
<div id="cfgConfigHeader" class="fa-solid fa-grip drag-grabber"></div>
|
|
<div id="CFGClose" class="fa-solid fa-circle-xmark"></div>
|
|
</div>
|
|
<div name="cfgConfigHolder" class="scrollY">
|
|
<div class="inline-drawer">
|
|
<div id="CFGBlockToggle" class="inline-drawer-toggle inline-drawer-header">
|
|
<b>Chat CFG</b>
|
|
<div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
|
|
</div>
|
|
<div class="inline-drawer-content">
|
|
<small>
|
|
<b>Unique to this chat</b>.<br>
|
|
</small>
|
|
<label for="chat_cfg_negative_prompt">
|
|
<span data-i18n="Scale">Scale</span>
|
|
</label>
|
|
<div class="range-block-range-and-counter">
|
|
<div class="range-block-range">
|
|
<input type="range" id="chat_cfg_guidance_scale" name="volume" min="0.10" max="4.00" step="0.05">
|
|
</div>
|
|
<div class="range-block-counter">
|
|
<div contenteditable="true" data-for="chat_cfg_guidance_scale" id="chat_cfg_guidance_scale_counter">
|
|
select
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<label for="chat_cfg_negative_prompt">
|
|
<span data-i18n="Negative Prompt">Negative Prompt</span>
|
|
</label>
|
|
<textarea id="chat_cfg_negative_prompt" rows="2" class="text_pole textarea_compact" data-i18n="[placeholder]write short replies, write replies using past tense" placeholder="write short replies, write replies using past tense"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="sysHR">
|
|
<div class="inline-drawer">
|
|
<div id="charaANBlockToggle" class="inline-drawer-toggle inline-drawer-header">
|
|
<b>Character CFG</b>
|
|
<div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
|
|
</div>
|
|
<div class="inline-drawer-content">
|
|
<small>Will be automatically added as the CFG for this character. Will be used in groups, but
|
|
can't be modified when a group chat is open.</small>
|
|
<br />
|
|
<label for="chara_cfg_negative_prompt">
|
|
<span data-i18n="Scale">Scale</span>
|
|
</label>
|
|
<div class="range-block-range-and-counter">
|
|
<div class="range-block-range">
|
|
<input type="range" id="chara_cfg_guidance_scale" name="volume" min="0.10" max="4.00" step="0.05">
|
|
</div>
|
|
<div class="range-block-counter">
|
|
<div contenteditable="true" data-for="chara_cfg_guidance_scale" id="chara_cfg_guidance_scale_counter">
|
|
select
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<label for="chara_cfg_negative_prompt">
|
|
<span data-i18n="Negative Prompt">Negative Prompt</span>
|
|
</label>
|
|
<textarea id="chara_cfg_negative_prompt" rows="2" class="text_pole textarea_compact" data-i18n="[placeholder]write short replies, write replies using past tense" placeholder="write short replies, write replies using past tense"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="sysHR">
|
|
<div class="inline-drawer">
|
|
<div id="defaultANBlockToggle" class="inline-drawer-toggle inline-drawer-header">
|
|
<b>Global CFG</b>
|
|
<div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
|
|
</div>
|
|
<div class="inline-drawer-content">
|
|
<small>Will be used as the default CFG options for every chat unless overridden.</small>
|
|
<br />
|
|
<label for="global_cfg_negative_prompt">
|
|
<span data-i18n="Scale">Scale</span>
|
|
</label>
|
|
<div class="range-block-range-and-counter">
|
|
<div class="range-block-range">
|
|
<input type="range" id="global_cfg_guidance_scale" name="volume" min="0.10" max="4.00" step="0.05">
|
|
</div>
|
|
<div class="range-block-counter">
|
|
<div contenteditable="true" data-for="global_cfg_guidance_scale" id="global_cfg_guidance_scale_counter">
|
|
select
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<div>
|
|
<label for="global_cfg_negative_prompt">
|
|
<span data-i18n="Negative Prompt">Negative Prompt</span>
|
|
</label>
|
|
<textarea id="global_cfg_negative_prompt" rows="2" class="text_pole textarea_compact" data-i18n="[placeholder]write short replies, write replies using past tense" placeholder="write short replies, write replies using past tense"></textarea>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
<hr class="sysHR">
|
|
<div class="inline-drawer">
|
|
<div id="defaultANBlockToggle" class="inline-drawer-toggle inline-drawer-header">
|
|
<b>Negative Cascading</b>
|
|
<div class="inline-drawer-icon fa-solid fa-circle-chevron-down down"></div>
|
|
</div>
|
|
<div class="inline-drawer-content">
|
|
<small>
|
|
Combine negative prompts from other boxes. For example, ticking the chat, global, and character boxes combine all negative prompts into a comma-separated string.
|
|
</small>
|
|
<br />
|
|
<label for="cfg_negative_combine">
|
|
<span data-i18n="Scale">Always Include</span>
|
|
</label>
|
|
<label class="checkbox_label">
|
|
<input type="checkbox" name="cfg_negative_combine" value="0" />
|
|
<span data-i18n="Only Format Display">Chat Negatives</span>
|
|
</label>
|
|
<label class="checkbox_label">
|
|
<input type="checkbox" name="cfg_negative_combine" value="1" />
|
|
<span data-i18n="Only Format Display">Character Negatives</span>
|
|
</label>
|
|
<label class="checkbox_label">
|
|
<input type="checkbox" name="cfg_negative_combine" value="2" />
|
|
<span data-i18n="Use character CFG">Global Negatives</span>
|
|
</label>
|
|
</div>
|
|
</div>
|
|
</div>
|
|
</div>
|