-
Notifications
You must be signed in to change notification settings - Fork 6.9k
DDIMPipeline does not validate eta range despite documented constraint [0, 1] #13362
Copy link
Copy link
Closed
Closed
Copy link
Labels
bugSomething isn't workingSomething isn't working
Description
Describe the bug
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
from diffusers import DDIMPipeline
pipe = 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)System Info
- diffusers: local dev version (from source)
- Python: 3.13
- OS: Windows
- PyTorch: 2.11.0
Who can help?
No response
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
bugSomething isn't workingSomething isn't working