Describe the bug
The three Chroma pipelines' __call__ docstrings state defaults to X for seven parameters where
the signature uses a different value. Reading the docstring and passing the documented number
explicitly therefore produces different behavior than omitting the argument.
All signature values below were read per-function via AST (not grep — encode_prompt in these files
declares some of the same parameter names with different defaults):
| File |
__call__ |
Parameter |
Docstring says |
Signature |
pipeline_chroma.py |
:589 |
num_inference_steps |
50 |
35 |
pipeline_chroma.py |
:589 |
guidance_scale |
3.5 |
5.0 |
pipeline_chroma_img2img.py |
:648 |
guidance_scale |
3.5 |
5.0 |
pipeline_chroma_inpainting.py |
:766 |
num_inference_steps |
35 |
28 |
pipeline_chroma_inpainting.py |
:766 |
guidance_scale |
3.5 |
7.0 |
pipeline_chroma_inpainting.py |
:766 |
strength |
0.9 |
0.6 |
pipeline_chroma_inpainting.py |
:766 |
max_sequence_length |
512 |
256 |
Evidence that defaults to is meant to mirror the literal signature default in these docstrings: in
that same pipeline_chroma.py docstring, num_images_per_prompt (defaults to 1) and
max_sequence_length (defaults to 512) both match their signature exactly — only these seven drifted,
which is consistent with the docstrings having been carried between pipelines while each signature was
retuned.
Reproduction
import ast, inspect
from diffusers import ChromaPipeline
sig = inspect.signature(ChromaPipeline.__call__)
print(sig.parameters["guidance_scale"].default) # 5.0
# docstring for the same parameter says "defaults to 3.5"
Logs
No response
System Info
Documentation-only issue; reproduced by reading main (@ 4e0466f3e when filed).
Who can help?
@stevhliu
Note
A fix is already open as #14578 (docstrings only, +7/-7 across the three files) — filing this so
that PR has a linked issue, per the pr-link-issue reminder. Not looking for anyone else to pick it
up; happy to adjust the PR instead if you would rather handle the wider pattern differently.
The same check finds ~190 more defaults to mismatches elsewhere in src/diffusers/, clustered by
pipeline family (num_inference_steps 50 → 28 in 13 files, guidance_scale 7.5 → 5.0 in 12, …). I
deliberately scoped #14578 to one family rather than sending a repo-wide sweep. If it would be more
useful as a mechanical utils/ check, I can propose that separately.
Describe the bug
The three Chroma pipelines'
__call__docstrings statedefaults to Xfor seven parameters wherethe signature uses a different value. Reading the docstring and passing the documented number
explicitly therefore produces different behavior than omitting the argument.
All signature values below were read per-function via AST (not grep —
encode_promptin these filesdeclares some of the same parameter names with different defaults):
__call__pipeline_chroma.py:589num_inference_stepspipeline_chroma.py:589guidance_scalepipeline_chroma_img2img.py:648guidance_scalepipeline_chroma_inpainting.py:766num_inference_stepspipeline_chroma_inpainting.py:766guidance_scalepipeline_chroma_inpainting.py:766strengthpipeline_chroma_inpainting.py:766max_sequence_lengthEvidence that
defaults tois meant to mirror the literal signature default in these docstrings: inthat same
pipeline_chroma.pydocstring,num_images_per_prompt (defaults to 1)andmax_sequence_length (defaults to 512)both match their signature exactly — only these seven drifted,which is consistent with the docstrings having been carried between pipelines while each signature was
retuned.
Reproduction
Logs
No response
System Info
Documentation-only issue; reproduced by reading
main(@4e0466f3ewhen filed).Who can help?
@stevhliu
Note
A fix is already open as #14578 (docstrings only, +7/-7 across the three files) — filing this so
that PR has a linked issue, per the
pr-link-issuereminder. Not looking for anyone else to pick itup; happy to adjust the PR instead if you would rather handle the wider pattern differently.
The same check finds ~190 more
defaults tomismatches elsewhere insrc/diffusers/, clustered bypipeline family (
num_inference_steps 50 → 28in 13 files,guidance_scale 7.5 → 5.0in 12, …). Ideliberately scoped #14578 to one family rather than sending a repo-wide sweep. If it would be more
useful as a mechanical
utils/check, I can propose that separately.