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 fb54a236ae
commit 6fcb9c9892
16 changed files with 784 additions and 39 deletions
@@ -75,15 +75,46 @@
<code>"{{ '{{prompt}}' }}, masterpiece"</code> works. Anything you leave out
takes its default.
</p>
<p class="field__hint">
Available:
{% for name in placeholders %}<code>{{ '{{' ~ name ~ '}}' }}</code>{{ ", " if not loop.last }}{% endfor %}.
<code>{{ '{{prompt}}' }}</code> is required — without it every image would
be the same.
</p>
</div>
</section>
<section class="card">
<h2 class="card__title">The placeholders</h2>
<p class="card__lede">
Every hole a template may carry, what it fills, and what it resolves to
right now. <code>{{ '{{prompt}}' }}</code> is required — without it every
image would be the same one, whatever anybody typed.
</p>
{# The current value beside each name, the way /admin/prompts shows a
variable's. A legend that lists names and not values answers "what may I
write" and not "what will happen", and the second is the question
somebody has while looking at a workflow that came out wrong. #}
<div class="ref-list">
{% for name, kind, what, current in placeholder_help %}
<div class="ref-row">
<code>{{ '{{' ~ name ~ '}}' }}</code>
<span>
{{ what }}
{% if name == "prompt" %}<strong>Required.</strong>{% endif %}
</span>
<code class="faint">{{ current }}</code>
</div>
{% endfor %}
</div>
<p class="field__hint">
Two of these are not spelled the way ComfyUI spells them, which is the
mistake that costs an afternoon: <code>{{ '{{model}}' }}</code> fills
<code>ckpt_name</code> and <code>{{ '{{sampler}}' }}</code> fills
<code>sampler_name</code>.
</p>
<p class="field__hint">
The right-hand column is what an omitted placeholder resolves to today —
the instance defaults from the image settings page, falling back to the
built-in floor. A model may override any of them except
<code>{{ '{{batch}}' }}</code>, which is yours alone.
</p>
</section>
<div class="btn-row">
<button class="btn btn--primary" type="submit">
{{ "Add workflow" if is_new else "Save changes" }}