Defaults an administrator can actually set

There were none. `workflow.DEFAULTS` was the only source, so 512x512, euler and
twenty steps were what every instance got whatever card it was running on -- and
512 square on an SDXL checkpoint is precisely what the tool's own description
warns produces duplicated limbs. The two ways round it were both bad: bake
literals into a template where the placeholders should be, or write prose in the
instructions box and hope.

Three rungs now, most specific winning, with DEFAULTS staying underneath as the
floor so an instance that sets nothing behaves exactly as it did and a floor
improved in code still reaches everybody. An empty box is "no opinion" rather
than zero, which matters: read as a number it would set every instance to zero
steps, and ComfyUI refuses that in a way that looks like a broken model.

The right control for each, because a text box is wrong for most of them. The
samplers and schedulers were already being discovered by the Test button, stored,
and read by nothing at all -- they are the pickers now. A stored value missing
from the list is kept as an option anyway, or opening this page and pressing Save
would silently clear a working setting. Checkpoints are chosen rather than typed,
and the instance default is a rung of its own instead of "whatever happens to be
first in a textarea somebody filled in some order".

And batch, at last: `batch_size` was a literal 1 in the base template, so an
administrator whose card can comfortably make four had no way of saying so.
Deliberately not something a model may set -- one asking for six because it is
unsure is the exact cost this must not invite.

The tool's schema restates the defaults it quotes. Every "Default 20." in there
was written when there was one set of defaults in the world; left alone, an
instance drawing at 1024 would go on telling the model 512, and the model reasons
from that sentence rather than ignoring it.

Co-Authored-By: Claude Opus 5 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jaroslav Beneš
2026-08-06 11:50:37 +02:00
co-authored by Claude Opus 5
parent 54ed030732
commit 0fa05c88b2
13 changed files with 721 additions and 31 deletions
+26
View File
@@ -759,6 +759,32 @@
document.addEventListener("htmx:afterSettle", scan);
})();
/*
Two number fields set together.
Image sizes come in pairs and nobody types 1024 and then 1536; they pick
"portrait". A button rather than a select of pairs, because a select would
have to enumerate every combination somebody might want and these are only
the common ones — the two boxes are still there and still authoritative.
Delegated and keyed on the attributes rather than on the image page's ids, so
the next screen with a paired number wants no new code.
*/
document.addEventListener("click", function (event) {
var preset = event.target.closest("[data-width][data-height]");
if (!preset) return;
var row = preset.closest("[data-size-presets]");
if (!row) return;
event.preventDefault();
var form = preset.closest("form");
if (!form) return;
var width = form.querySelector('[name="default_width"]');
var height = form.querySelector('[name="default_height"]');
if (width) width.value = preset.dataset.width;
if (height) height.value = preset.dataset.height;
});
/*
A toast asked for by the server.