You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
validate_workflow passes a workflow whose stored default asset does not exist (templates/ltx2/reference-sheet) #166
Repro (all on lem, dw 0.4.0-beta.4, via MCP only):
validate_workflow(name="templates/ltx2/reference-sheet")
→ valid: true, no errors, no warnings.
list_assets() → no reference_sheet.png in any root
(/home/don/diffusers-workspace/assets, /home/don/diffusers-workspace/common/assets, /home/don/diffusers-workflow/assets).
get_workflow("templates/ltx2/reference-sheet", variables_only=true)
→ "reference_sheet": "asset:reference_sheet.png" — the stored default.
validate_workflow(name="templates/ltx2/reference-sheet", arguments={"reference_sheet": "asset:reference_sheet.png"})
→ valid: false, arguments.reference_sheet: Asset 'reference_sheet.png' not found in …
Expected: step 1 and step 4 should not disagree. Either the bare call reports the
unresolvable default (as an error, or at minimum a warning — validate_workflow's own
description says a valid answer tells you "whether it covered your values or only the stored
defaults", which reads as a promise that the defaults were covered), or the template ships a
default that resolves.
Actual: the bare call answers valid: true, so the documented pre-flight ("free and instant —
always run this before run_workflow") passes on a workflow that cannot run as stored. The same
value passed explicitly is caught. An agent that validates and then runs gets the failure after
the weights are loaded, which is the cost validate_workflow exists to avoid.
Scope — two separate questions, and I can't tell which from outside:
General: whether validate_workflow checks stored-default media references at all, for any
workflow. If it doesn't, this is a coverage gap across the catalog, not an LTX issue.
Specific to this template:templates/ltx2/reference-sheet (shipped for LTX-2.5 has no reference/identity template, and an Ingredients IC-LoRA for it shipped 2026-09-10 #151) defaults to
an asset that does not exist and, unlike a generated intermediate, can't — the sheet is a real
authoring job per that issue's hand-off. A default that names a file nobody has may want to be
a required argument with no default instead, so the omission is reported by name rather than
discovered at run time.
Found while verifying #151, which is otherwise confirmed and closed — the template, its downloads_required entry and its reference_frames >= 121 bound all check out. Filing this
separately rather than bouncing that issue.
Filed by the repo owner, not a duplicate, not already fixed. validate_workflow doesn't check stored-default media references (asset:/prompt:/output:) the way it checks caller-supplied arguments — that's the general gap; the specific template default (templates/ltx2/reference-sheet -> asset:reference_sheet.png) pointing at a file nobody has is a second, narrower question the fix session should also resolve (asset vs. required-argument-with-no-default).
Root cause: _argument_reference_errors in dw/server/app.py only walked caller-supplied arguments for asset:/prompt:/output: reference existence, never the workflow's declared variables defaults. So validate_workflow(name="templates/ltx2/reference-sheet") with no arguments answered valid: true even though the stored default "reference_sheet": "asset:reference_sheet.png" names a file that doesn't exist, while the same call with that exact value passed explicitly as an argument correctly answered valid: false - one workflow, two verdicts depending on whether the caller happened to restate the default.
Fix: _argument_reference_errors now merges every declared variables default (skipped when the caller overrides it) with the caller's arguments into one effective set before checking references, so a bare call and an explicit-default call agree. Reported at variables.<name> (vs arguments.<name>) so the error message still distinguishes "you wrote a bad reference" from "you didn't override a bad default." This is the general fix, not a template-specific one - the same placeholder-asset:-default pattern appears in several other catalog templates, and this closes the whole class rather than just reference-sheet.
Also, while restructuring submit_job to reuse one Workflow candidate for both the argument-reference check and the acknowledged-cost path, found and fixed a related gap: constraint_errors (the variable_constraints.py bound checks, e.g. H3's num_frames grid) previously only ran inside the bound-acknowledgement branch of job submission, so a non-bound POST /api/jobs skipped it until run time. It now runs on every submission via the same unconditional candidate build.
Behavior change to flag for verification: any catalog template shipping a placeholder asset: default (expected to be overridden by a real caller) will now report valid: false on a bare validate_workflow/job submission in a workspace that doesn't have that placeholder file - this is the intended fix, not a new bug, but the tester should expect it rather than treat it as a regression.
Commit: a199d37 (merge of f23d5ad) on develop. Deploy: pulled to lem (~/diffusers-workflow, fast-forward b599cf3→a199d37), MCP/HTTP server process restarted in its screen session, confirmed healthy via GET /api/workflows (200) and by re-running the exact repro from this issue against the live server - POST /api/validate with workflow_path: templates/ltx2/reference-sheet and no arguments now answers valid: false at variables.reference_sheet, matching the explicit-argument call.
Full test sweep: tests/ - 4865 passed, 14 skipped, no regressions. Added 3 new regression tests in tests/test_validate_arguments.py reproducing this exact scenario (bare call with bad stored default fails; explicit override of the same variable with a good value is judged on the override and passes; bare job submission with a bad stored default is refused before queuing).
Proposed regression-suite case (for regression-suite-smoke.md, once verified over MCP):
Call validate_workflow(name="templates/ltx2/reference-sheet") with no arguments.
Expected: valid: false, an error at variables.reference_sheet naming the missing asset - not valid: true.
(Optionally pair with the same call passing reference_sheet pointing at a real asset in the workspace, expecting valid: true, to pin that overriding a bad default still works.)
Verified over MCP. Tester agent, model opus via provider anthropic.
Repro from the issue body, re-run against live lem:
validate_workflow(name="templates/ltx2/reference-sheet"), no arguments → valid: false, one error at variables.reference_sheet: "Asset 'reference_sheet.png' not found in /home/don/diffusers-workspace/assets, /home/don/diffusers-workspace/common/assets, /home/don/diffusers-workflow/assets …". checked_arguments: []. This was valid: true when filed.
list_assets() → still no reference_sheet.png in any root (the default is genuinely unresolvable, so step 1's new answer is the correct one, not a spurious failure).
get_workflow("templates/ltx2/reference-sheet", variables_only=true) → "reference_sheet": "asset:reference_sheet.png" — the stored default is unchanged, so the fix is in the checker, not a template edit.
validate_workflow(..., arguments={"reference_sheet": "asset:reference_sheet.png"}) → valid: false at arguments.reference_sheet, same message.
Steps 1 and 4 now agree, which is what the issue asked for, and the path still distinguishes "you didn't override a bad default" (variables.) from "you wrote a bad reference" (arguments.).
Adjacent cases (partial-fix checks):
Override the bad default with a real asset: validate_workflow(name="templates/ltx2/reference-sheet", arguments={"reference_sheet": "asset:qa-cast/hal-portrait.jpg"}) → valid: true, checked_arguments: ["reference_sheet"], plan of 2 steps with downloads_required: Lightricks/LTX-2.5-22b-IC-LoRA-Ingredients (1.3 GB). So the merged default+argument check doesn't over-report: a caller who supplies a good value is judged on the override, and the workflow's other stored defaults (prompt:ltx2/reference_sheet_workshop, the constant: negative prompt) resolve and are not falsely flagged.
Declared-bound check on the same call path: arguments={"reference_sheet": "asset:qa-cast/hal-portrait.jpg", "reference_frames": 100} → valid: false at arguments.reference_frames, "must be at least 121 … checked before anything loads". The constraint check the fix moved onto the unconditional candidate build still fires on this path.
Behavior change acknowledged: per the hand-off comment, a bare validate_workflow on any catalog template shipping a placeholder asset: default now answers valid: false in a workspace without that file. Expected, not a regression — I will treat it as such rather than filing it.
The narrower question in this issue's scope section (whether templates/ltx2/reference-sheet should ship a placeholder default at all, vs. a required argument with no default) is left as the implementer decided: the default stays and the bare call now reports it by name, which satisfies the expected: here.
Adding the implementer's proposed case to regression-suite-smoke.md.
Activity
dkackman commentedon Sep 15, 2026
triage: work
Filed by the repo owner, not a duplicate, not already fixed.
validate_workflowdoesn't check stored-default media references (asset:/prompt:/output:) the way it checks caller-suppliedarguments— that's the general gap; the specific template default (templates/ltx2/reference-sheet->asset:reference_sheet.png) pointing at a file nobody has is a second, narrower question the fix session should also resolve (asset vs. required-argument-with-no-default).Model
sonnetvia provideranthropic.fix(server): #166 - validate_workflow checks stored variable defaults…
Merge fix for #166 - validate_workflow checks stored variable defaults
dkackman commentedon Sep 15, 2026
Fixed by model sonnet via provider anthropic.
Root cause:
_argument_reference_errorsindw/server/app.pyonly walked caller-suppliedargumentsforasset:/prompt:/output:reference existence, never the workflow's declaredvariablesdefaults. Sovalidate_workflow(name="templates/ltx2/reference-sheet")with no arguments answeredvalid: trueeven though the stored default"reference_sheet": "asset:reference_sheet.png"names a file that doesn't exist, while the same call with that exact value passed explicitly as an argument correctly answeredvalid: false- one workflow, two verdicts depending on whether the caller happened to restate the default.Fix:
_argument_reference_errorsnow merges every declaredvariablesdefault (skipped when the caller overrides it) with the caller'sargumentsinto one effective set before checking references, so a bare call and an explicit-default call agree. Reported atvariables.<name>(vsarguments.<name>) so the error message still distinguishes "you wrote a bad reference" from "you didn't override a bad default." This is the general fix, not a template-specific one - the same placeholder-asset:-default pattern appears in several other catalog templates, and this closes the whole class rather than justreference-sheet.Also, while restructuring
submit_jobto reuse oneWorkflowcandidate for both the argument-reference check and the acknowledged-cost path, found and fixed a related gap:constraint_errors(thevariable_constraints.pybound checks, e.g. H3'snum_framesgrid) previously only ran inside the bound-acknowledgement branch of job submission, so a non-boundPOST /api/jobsskipped it until run time. It now runs on every submission via the same unconditional candidate build.Behavior change to flag for verification: any catalog template shipping a placeholder
asset:default (expected to be overridden by a real caller) will now reportvalid: falseon a barevalidate_workflow/job submission in a workspace that doesn't have that placeholder file - this is the intended fix, not a new bug, but the tester should expect it rather than treat it as a regression.Commit: a199d37 (merge of f23d5ad) on
develop.Deploy: pulled to
lem(~/diffusers-workflow, fast-forward b599cf3→a199d37), MCP/HTTP server process restarted in its screen session, confirmed healthy viaGET /api/workflows(200) and by re-running the exact repro from this issue against the live server -POST /api/validatewithworkflow_path: templates/ltx2/reference-sheetand no arguments now answersvalid: falseatvariables.reference_sheet, matching the explicit-argument call.Full test sweep:
tests/- 4865 passed, 14 skipped, no regressions. Added 3 new regression tests intests/test_validate_arguments.pyreproducing this exact scenario (bare call with bad stored default fails; explicit override of the same variable with a good value is judged on the override and passes; bare job submission with a bad stored default is refused before queuing).Proposed regression-suite case (for
regression-suite-smoke.md, once verified over MCP):validate_workflow(name="templates/ltx2/reference-sheet")with no arguments.valid: false, an error atvariables.reference_sheetnaming the missing asset - notvalid: true.reference_sheetpointing at a real asset in the workspace, expectingvalid: true, to pin that overriding a bad default still works.)dkackman commentedon Sep 16, 2026
Verified over MCP. Tester agent, model
opusvia provideranthropic.Repro from the issue body, re-run against live
lem:validate_workflow(name="templates/ltx2/reference-sheet"), no arguments →valid: false, one error atvariables.reference_sheet: "Asset 'reference_sheet.png' not found in /home/don/diffusers-workspace/assets, /home/don/diffusers-workspace/common/assets, /home/don/diffusers-workflow/assets …".checked_arguments: []. This wasvalid: truewhen filed.list_assets()→ still noreference_sheet.pngin any root (the default is genuinely unresolvable, so step 1's new answer is the correct one, not a spurious failure).get_workflow("templates/ltx2/reference-sheet", variables_only=true)→"reference_sheet": "asset:reference_sheet.png"— the stored default is unchanged, so the fix is in the checker, not a template edit.validate_workflow(..., arguments={"reference_sheet": "asset:reference_sheet.png"})→valid: falseatarguments.reference_sheet, same message.Steps 1 and 4 now agree, which is what the issue asked for, and the path still distinguishes "you didn't override a bad default" (
variables.) from "you wrote a bad reference" (arguments.).Adjacent cases (partial-fix checks):
validate_workflow(name="templates/ltx2/reference-sheet", arguments={"reference_sheet": "asset:qa-cast/hal-portrait.jpg"})→valid: true,checked_arguments: ["reference_sheet"], plan of 2 steps withdownloads_required: Lightricks/LTX-2.5-22b-IC-LoRA-Ingredients (1.3 GB). So the merged default+argument check doesn't over-report: a caller who supplies a good value is judged on the override, and the workflow's other stored defaults (prompt:ltx2/reference_sheet_workshop, theconstant:negative prompt) resolve and are not falsely flagged.arguments={"reference_sheet": "asset:qa-cast/hal-portrait.jpg", "reference_frames": 100}→valid: falseatarguments.reference_frames, "must be at least 121 … checked before anything loads". The constraint check the fix moved onto the unconditional candidate build still fires on this path.Behavior change acknowledged: per the hand-off comment, a bare
validate_workflowon any catalog template shipping a placeholderasset:default now answersvalid: falsein a workspace without that file. Expected, not a regression — I will treat it as such rather than filing it.The narrower question in this issue's scope section (whether
templates/ltx2/reference-sheetshould ship a placeholder default at all, vs. a required argument with no default) is left as the implementer decided: the default stays and the bare call now reports it by name, which satisfies theexpected:here.Adding the implementer's proposed case to
regression-suite-smoke.md.