mirror of
https://github.com/lllyasviel/stable-diffusion-webui-forge.git
synced 2026-07-21 21:01:24 +08:00
ctrl + enter
This commit is contained in:
parent
d7be554433
commit
a0ff66d8a4
@ -390,6 +390,7 @@ options_templates.update(
|
||||
"show_rescale_cfg": OptionInfo(False, "Display the Rescale CFG Slider").info("feature for v-pred checkpoints").needs_reload_ui(),
|
||||
"show_mahiro": OptionInfo(False, "Display the MaHiRo Toggle").info('see <a href="https://huggingface.co/spaces/yoinked/blue-arxiv">blue-arxiv</a> - <b>id:</b> <ins>2024-1208.1</ins>').needs_reload_ui(),
|
||||
"paste_safe_guard": OptionInfo(False, 'Disable the "Read generation parameters" button (↙️) when negative prompt is not empty'),
|
||||
"ctrl_enter_interrupt": OptionInfo(False, "Revert [Ctrl + Enter] to only interrupt the generation").info('the current "intended" behavior is to interrupt the current generation then immediately start a new one'),
|
||||
"div_classic": OptionDiv(),
|
||||
"compact_prompt_box": OptionInfo(False, "Compact Prompt Layout").info("put prompts inside the Generate tab, leaving more space for the gallery").needs_reload_ui(),
|
||||
"dimensions_and_batch_together": OptionInfo(True, "Show Width/Height and Batch sliders in same row").needs_reload_ui(),
|
||||
|
||||
@ -159,8 +159,10 @@ document.addEventListener("keydown", function (e) {
|
||||
get_uiCurrentTabContent().querySelector("button[id$=_skip]");
|
||||
|
||||
if (isCtrlKey && isEnter) {
|
||||
e.preventDefault();
|
||||
if (interruptButton.style.display === "block") {
|
||||
interruptButton.click();
|
||||
if (opts.ctrl_enter_interrupt) return;
|
||||
const callback = (mutationList) => {
|
||||
for (const mutation of mutationList) {
|
||||
if (
|
||||
@ -179,7 +181,6 @@ document.addEventListener("keydown", function (e) {
|
||||
} else {
|
||||
generateButton.click();
|
||||
}
|
||||
e.preventDefault();
|
||||
}
|
||||
|
||||
if (isAltKey && isEnter) {
|
||||
|
||||
Loading…
Reference in New Issue
Block a user