Skip to content

The most powerful and modular diffusion model GUI, api and backend with a graph/nodes interface. The fastest local inference engine in the world.

ignore/restore custom batch count when extra options is unchecked

m957ymj75urz29cee297a094
diff --git a/web/scripts/ui.js b/web/scripts/ui.js
index 8134e3415..cb31f10e9 100644
--- a/web/scripts/ui.js
+++ b/web/scripts/ui.js
@@ -258,7 +258,12 @@ export class ComfyUI {
$el("button.comfy-queue-btn", { textContent: "Queue Prompt", onclick: () => app.queuePrompt(0, this.batchCount) }),
$el("div", {}, [
$el("label", { innerHTML: "Extra options"}, [
- $el("input", { type: "checkbox", onchange: (i) => document.getElementById('extraOptions').style.visibility = i.srcElement.checked ? "visible" : "collapse" })
+ $el("input", { type: "checkbox",
+ onchange: (i) => {
+ document.getElementById('extraOptions').style.visibility = i.srcElement.checked ? "visible" : "collapse";
+ this.batchCount = i.srcElement.checked ? document.getElementById('batchCountInputRange').value : 1;
+ }
+ })
])
]),
$el("div", { id: "extraOptions", style: { width: "100%", visibility: "collapse" }}, [