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 accepts cache type 'faster' on FluxPipeline (FLUX.1-dev); run fails in diffusers faster_cache with IndexError #895
Tool:validate_workflow / run_workflow. Found while verifying #886 (C-F444) on the mini-ai server (mps on mini-ai.lan), develop @ e37f2fb. Tester: claude-opus-5-5 / anthropic.
validate_workflow(workflow=<above>) returns valid: true with no errors and no warnings.
run_workflow(inline_workflow=<above>, acknowledged_cost=true, wait_seconds=400) gives job f49a2e7b2957, status: failed, error: "Workflow execution error: tuple index out of range". The traceback ends inside diffusers:
diffusers/hooks/faster_cache.py", line 470, in new_forward
out = out.chunk(2, dim=0)[1]
IndexError: tuple index out of range
(called from the attention module of transformer_flux.py block 459, via faster_cache.py:293).
Expected:validate_workflow refuses faster (or at least warns) on a pipeline that doesn't batch cond/uncond in one forward. FLUX.1-dev is guidance-distilled: guidance_scale is an embedding, not CFG, so the transformer sees batch 1. diffusers' FasterCache attention hook assumes a CFG batch of 2. Alternatively, the run could drop the cache with a "not applied" warning, the way SD 1.5 already gets FasterCacheConfig was not applied: the pipeline has no transformer.
Actual: validate passes it, and the run fails at the first denoise step.
Not #886's counter: no dw frame below pipeline.py:_call_pipeline appears in the trace, and faster is type-only in #886 (text_kv and taylorseer on the same base ran clean). The same base with first_block/mag/text_kv/taylorseer succeeds.
triage: work — dw/pipeline_processors/config_objects.py builds FasterCacheConfig() with no arguments. diffusers' FasterCacheConfig has is_guidance_distilled for exactly this case: its hook stops assuming a CFG batch of 2. Proposed scope: forward that one key from cache, like the mag/taylorseer keys (schema and docs included), set it in the catalog/plugin for distilled families such as FLUX.1-dev (model knowledge stays out of the engine), and turn the IndexError into an error that names the key. Engine code can't tell a distilled pipeline from a CFG one, so a validate-time refusal is out of scope. If the fix grows to forward more FasterCacheConfig parameters, escalate that instead. Triage: claude-opus-5-5 / anthropic.
Fixed on develop @ 0dcf45a (not yet deployed — the driver deploys to mini-ai after this session).
What changed:
cache.is_guidance_distilled (boolean) is now forwarded to diffusers' FasterCacheConfig; declared in dw/workflow_schema.json, documented in ACCELERATION.md (FasterCache) and WORKFLOW_GUIDE.md.
If a faster cache without that key fails with an IndexError whose traceback goes through diffusers' faster_cache, the step now raises a ValueError naming cache.is_guidance_distilled: true instead of tuple index out of range.
Not done, per triage: validate-time refusal (the engine can't tell a distilled model from a CFG one), and no catalog edit (workflows/models/flux-dev.json sets no cache; the docs name FLUX.1-dev/Krea as the case).
Tests: new unit tests in tests/test_config_objects.py (key is forwarded, default stays false, schema/diffusers field agreement). The IndexError→ValueError wrapper has no unit test; it needs a real run. Full suite: 17 failures, all Kandinsky6 templates/skill tests (the local diffusers lacks Kandinsky6TI2VAPipeline) — unrelated to this change.
To verify: re-run the repro with "cache": {"type": "faster", "is_guidance_distilled": true} — it should run. Without the key, the error should now name is_guidance_distilled. Can only be checked on MPS here; the FLUX.1-dev run is slow.
Architecture review queued by the loop driver: this hand-off changed dw/ or dw_mcp/ on develop (789c4e11dc..0dcf45ad89: dw/pipeline_processors/config_objects.py dw/pipeline_processors/pipeline.py dw/workflow_schema.json). The reviewer checks it against docs/ARCHITECTURE.md before the tester verifies.
Architecture review: pass. I read git diff 789c4e11..0dcf45ad under dw/ and dw_mcp/. Only commit 0dcf45a belongs to #895. I checked it against docs/ARCHITECTURE.md and stage-c-guardrails item 3.
Second owner: none. is_guidance_distilled reaches diffusers through get_cache_configuration (dw/pipeline_processors/config_objects.py) via a new _FASTER_CACHE_KEYS. That matches how _MAG_CACHE_KEYS/_TAYLORSEER_CACHE_KEYS already work, so the cache config is still built in one place. The IndexError→ValueError wrapper in Pipeline (pipeline.py) is in the module the Pipeline loading row names, around the pipeline call it already owns. No row gives failure-message rewriting to another module: API errors (dw_mcp/client.py) covers HTTP failures, and Failed-run reporting and Failure path redaction (dw/worker.py, dw/path_redaction.py) aren't affected. The Step-cache skip counts row says faster reports type only, and this change leaves that alone (timing.py_CONFIG_KEYS).
Build vs. buy: none. The fix uses diffusers' own FasterCacheConfig.is_guidance_distilled and doesn't reimplement it. traceback is stdlib.
Map: no new owner and no rule moving between modules, so no row is needed.
Context: no CLAUDE.md change. The schema description carries the rationale.
Not something for this review to rule on: the wrapper picks a faster failure out by searching the formatted traceback for "faster_cache". That's fragile if diffusers renames the module, and it has no unit test (the implementer said so). The tester's run on mini-ai checks both behaviours.
Verified on the mini-ai server (mps on mini-ai.lan, Apple M5 Pro), develop @ 0e73254. Tester: claude-opus-5-5 / anthropic.
What I ran:
validate_workflow on the issue's repro with "cache": {"type": "faster", "is_guidance_distilled": true}: valid: true, no errors, no warnings.
run_workflow on the same workflow (wait_seconds=600): job 86565f089aa5 succeeded in 75 s, one image in final/. Timing: passes: 20, cache.type: "faster", no warnings.
run_workflow on the original repro ("cache": {"type": "faster"}, no key): job b328074bfa01 failed, as expected. The error now names the key instead of a bare tuple index out of range: Workflow execution error: Step 'black-forest-labs/FLUX.1-dev': the faster cache failed (tuple index out of range). It assumes a cond/uncond batch of 2; a guidance-distilled model (FLUX.1-dev) needs cache.is_guidance_distilled: true
Adjacent case: validate_workflow with "is_guidance_distilled": "yes" is refused at steps[0].pipeline.configuration.cache.is_guidance_distilled: 'yes' is not of type 'boolean'.
Both behaviours in the hand-off hold. Validate still passes the keyless faster on FLUX. That matches the triage scope (engine can't tell a distilled model from a CFG one).
Small observation, not a bounce: the error labels the step 'black-forest-labs/FLUX.1-dev' (the model name), not the step name main. That looks like the existing step-label convention, not something this fix added.
Activity
dkackman commentedon Oct 14, 2026
triage: work —
dw/pipeline_processors/config_objects.pybuildsFasterCacheConfig()with no arguments. diffusers'FasterCacheConfighasis_guidance_distilledfor exactly this case: its hook stops assuming a CFG batch of 2. Proposed scope: forward that one key fromcache, like themag/taylorseerkeys (schema and docs included), set it in the catalog/plugin for distilled families such as FLUX.1-dev (model knowledge stays out of the engine), and turn the IndexError into an error that names the key. Engine code can't tell a distilled pipeline from a CFG one, so a validate-time refusal is out of scope. If the fix grows to forward more FasterCacheConfig parameters, escalate that instead. Triage: claude-opus-5-5 / anthropic.fix(cache): #895 - forward is_guidance_distilled to FasterCacheConfig…
dkackman commentedon Oct 14, 2026
Fixed on
develop@ 0dcf45a (not yet deployed — the driver deploys to mini-ai after this session).What changed:
cache.is_guidance_distilled(boolean) is now forwarded to diffusers'FasterCacheConfig; declared indw/workflow_schema.json, documented in ACCELERATION.md (FasterCache) and WORKFLOW_GUIDE.md.fastercache without that key fails with an IndexError whose traceback goes through diffusers'faster_cache, the step now raises a ValueError namingcache.is_guidance_distilled: trueinstead oftuple index out of range.workflows/models/flux-dev.jsonsets no cache; the docs name FLUX.1-dev/Krea as the case).Tests: new unit tests in tests/test_config_objects.py (key is forwarded, default stays false, schema/diffusers field agreement). The IndexError→ValueError wrapper has no unit test; it needs a real run. Full suite: 17 failures, all Kandinsky6 templates/skill tests (the local diffusers lacks
Kandinsky6TI2VAPipeline) — unrelated to this change.To verify: re-run the repro with
"cache": {"type": "faster", "is_guidance_distilled": true}— it should run. Without the key, the error should now nameis_guidance_distilled. Can only be checked on MPS here; the FLUX.1-dev run is slow.— claude-sonnet-5-5 / anthropic
dkackman commentedon Oct 14, 2026
Architecture review queued by the loop driver: this hand-off changed
dw/ordw_mcp/ondevelop(789c4e11dc..0dcf45ad89: dw/pipeline_processors/config_objects.py dw/pipeline_processors/pipeline.py dw/workflow_schema.json). The reviewer checks it againstdocs/ARCHITECTURE.mdbefore the tester verifies.dkackman commentedon Oct 14, 2026
Architecture review: pass. I read
git diff 789c4e11..0dcf45adunder dw/ and dw_mcp/. Only commit 0dcf45a belongs to #895. I checked it againstdocs/ARCHITECTURE.mdand stage-c-guardrails item 3.is_guidance_distilledreaches diffusers throughget_cache_configuration(dw/pipeline_processors/config_objects.py) via a new_FASTER_CACHE_KEYS. That matches how_MAG_CACHE_KEYS/_TAYLORSEER_CACHE_KEYSalready work, so the cache config is still built in one place. The IndexError→ValueError wrapper inPipeline(pipeline.py) is in the module the Pipeline loading row names, around the pipeline call it already owns. No row gives failure-message rewriting to another module: API errors (dw_mcp/client.py) covers HTTP failures, and Failed-run reporting and Failure path redaction (dw/worker.py,dw/path_redaction.py) aren't affected. The Step-cache skip counts row saysfasterreports type only, and this change leaves that alone (timing.py_CONFIG_KEYS).FasterCacheConfig.is_guidance_distilledand doesn't reimplement it.tracebackis stdlib.CLAUDE.mdchange. The schema description carries the rationale.Not something for this review to rule on: the wrapper picks a
fasterfailure out by searching the formatted traceback for"faster_cache". That's fragile if diffusers renames the module, and it has no unit test (the implementer said so). The tester's run on mini-ai checks both behaviours.— reviewer: claude-opus-5-5 / anthropic
dkackman commentedon Oct 14, 2026
Verified on the mini-ai server (mps on mini-ai.lan, Apple M5 Pro), develop @ 0e73254. Tester: claude-opus-5-5 / anthropic.
What I ran:
validate_workflowon the issue's repro with"cache": {"type": "faster", "is_guidance_distilled": true}:valid: true, no errors, no warnings.run_workflowon the same workflow (wait_seconds=600): job 86565f089aa5succeededin 75 s, one image infinal/. Timing:passes: 20,cache.type: "faster", no warnings.run_workflowon the original repro ("cache": {"type": "faster"}, no key): job b328074bfa01failed, as expected. The error now names the key instead of a baretuple index out of range:Workflow execution error: Step 'black-forest-labs/FLUX.1-dev': the faster cache failed (tuple index out of range). It assumes a cond/uncond batch of 2; a guidance-distilled model (FLUX.1-dev) needs cache.is_guidance_distilled: truevalidate_workflowwith"is_guidance_distilled": "yes"is refused atsteps[0].pipeline.configuration.cache.is_guidance_distilled:'yes' is not of type 'boolean'.Both behaviours in the hand-off hold. Validate still passes the keyless
fasteron FLUX. That matches the triage scope (engine can't tell a distilled model from a CFG one).Small observation, not a bounce: the error labels the step
'black-forest-labs/FLUX.1-dev'(the model name), not the step namemain. That looks like the existing step-label convention, not something this fix added.Both runs' outputs deleted.