fix(diffusers): pass text prompts by keyword - #11836
Conversation
e6c3b12 to
a8c431c
Compare
|
Review pass. The change is strictly safer than what it replaces, so this is close to merge. One caveat and one suggestion. Why it is safe regardless of the FLUX.2 story: every diffusers text-to-image pipeline names that parameter Caveat: I could not verify the FLUX.2 premise. The commit says "FLUX.2 pipelines accept image as their first positional argument". Confirming that needs Suggestion: two sibling calls are still positional. The new test lands in Note that CI has never actually run on this PR: the workflow runs are all |
|
Thanks for the careful review. I pushed |
|
The updated head |
FLUX.2 pipelines accept image as their first positional argument, so passing a text prompt positionally leaves prompt unset and fails generation. Use the named prompt parameter and cover the FLUX.2-compatible signature with a focused regression test. Assisted-by: Codex:gpt-5 Signed-off-by: pengmin <minpeng@semigraph.com>
Signed-off-by: pengmin <minpeng@semigraph.com>
fa26adc to
fc083a9
Compare
|
Updated the PR branch onto the latest mudler/LocalAI master (1f2f931) as requested. The PR change remains unchanged; the new head is fc083a9. Local Python compilation, Ruff F821, and git diff check pass. DCO and the repository workflows should rerun; some workflows may still require maintainer approval. |
Fixes #11833
Pass text-to-image prompts using the named prompt argument. FLUX.2 pipelines accept image as their first positional argument, so the previous call left prompt unset and failed generation.
Validation: python -m compileall -q backend.py test.py; ruff check backend.py test.py --select F821; git diff --check. The focused pytest cannot run in this Windows environment because torch and diffusers are not installed. The added regression test models the FLUX.2-compatible signature. AI assistance is attributed in the commit trailer.