fix: expand_configs honors per-entry seed override (for Revise modal)

User reported that changing seed in the Revise modal had no effect —
the new seed was overwritten and the orchestrator's check_if_job_completed
matched the original item's seed, skipping the gen.

Root cause: config_utils.expand_configs unconditionally wrote
"seed": <global node seed> for every config, ignoring entry["seed"]
from the configs_json. Builder UI doesn't emit entry["seed"] (it relies
on the node-level seed widget), so this regression only surfaced when
something else explicitly set per-entry seed — exactly what triggerGen
does.

Fix: use entry["seed"] when present and non-empty, otherwise fall back
to the global seed. Builder UI flow unchanged.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
This commit is contained in:
Jason Hoku
2026-05-08 12:42:34 -07:00
co-authored by Claude Opus 4.7
parent 6f9862f2b7
commit df6aaa6559
+4 -1
View File
@@ -694,7 +694,10 @@ def expand_configs(raw_configs, pos_prompts, neg_prompts, denoise_values, seed,
"advanced_scheduler": combo[17],
"flux_guidance_value": combo[18],
"resolution": combo[19], # (w, h) tuple or None
"seed": seed,
# Per-entry seed override (Revise modal sets this explicitly).
# Builder UI does NOT emit entry["seed"] — it uses the node-level
# seed widget instead — so this fall-through is safe for that flow.
"seed": int(entry["seed"]) if entry.get("seed") not in (None, "") else seed,
"seed_behavior": entry.get("seed_behavior", "fixed"),
"full_run_seed_behavior": entry.get("full_run_seed_behavior", "fixed"),
"model_type": model_type,