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
DDIMPipeline does not validate eta range despite documented constraint [0, 1] #13362
In DDIMPipeline, the eta parameter is documented to be within the range [0, 1], but there is currently no validation enforcing this constraint.
From the docstring:
"eta corresponds to η in paper and should be between [0, 1]"
However, users can pass arbitrary values (e.g., negative or >1) without any warning or error, which may lead to undefined or unintended behavior during inference.
This creates a mismatch between:
documented API contract
actual implementation behavior
I’d be happy to submit a PR to add validation if this is considered appropriate.
Reproduction
fromdiffusersimportDDIMPipelinepipe=DDIMPipeline.from_pretrained("google/ddpm-cifar10-32")
# Invalid eta values (should ideally raise error or warning)image=pipe(eta=-1.0)
image=pipe(eta=2.0)
Both calls execute without validation or error.
Logs
Either:
- Raise ValueError if eta is outside [0, 1]
- Or explicitly document that values outside the range are allowed (if intentional)
Activity
Akash504-ai commentedon Mar 29, 2026
Hi! Could any maintainer or core contributor confirm whether this behavior is intended? If not, I’d be happy to work on a fix and submit a PR.
fix(ddim): validate eta is in [0, 1] in DDIMPipeline.__call__
fix(ddim): validate eta is in [0, 1] in DDIMPipeline (huggingface#13367)
fix(ddim): validate eta is in [0, 1] in DDIMPipeline (huggingface#13367)