Commit 8070f6e
fix(ddim): validate eta is in [0, 1] in DDIMPipeline (#13367)
* fix(ddim): validate eta is in [0, 1] in DDIMPipeline.__call__
The DDIM paper defines η (eta) as a value that must lie in [0, 1]:
η=0 corresponds to deterministic DDIM, η=1 corresponds to DDPM.
The docstring already documented this constraint, but no runtime
validation was in place, so users could silently pass out-of-range
values (e.g. negative or >1) without any error.
Add an explicit ValueError check before the denoising loop so that
invalid eta values are caught early with a clear message.
Fixes #13362
Signed-off-by: NIK-TIGER-BILL <nik.tiger.bill@github.com>
* fix(ddim): downgrade eta out-of-range from error to warning
Per maintainer feedback from @yiyixuxu — the documentation is
sufficient; a hard ValueError is too strict. Replace with a
UserWarning so callers are informed without breaking existing code
that passes eta outside [0, 1].
Signed-off-by: NIK-TIGER-BILL <nik.tiger.bill@github.com>
* fix(ddim): use logger.warning instead of warnings.warn for eta validation
Address review request from @yiyixuxu: switch from warnings.warn() to
logger.warning() to be consistent with all other diffusers pipelines.
The eta validation check itself (0.0 <= eta <= 1.0) is unchanged.
Signed-off-by: NIK-TIGER-BILL <nik.tiger.bill@github.com>
---------
Signed-off-by: NIK-TIGER-BILL <nik.tiger.bill@github.com>
Co-authored-by: NIK-TIGER-BILL <nik.tiger.bill@github.com>
Co-authored-by: YiYi Xu <yixu310@gmail.com>1 parent 3e53a38 commit 8070f6e
1 file changed
+12
-0
lines changed| Original file line number | Diff line number | Diff line change | |
|---|---|---|---|
| |||
12 | 12 | | |
13 | 13 | | |
14 | 14 | | |
| 15 | + | |
| 16 | + | |
15 | 17 | | |
16 | 18 | | |
17 | 19 | | |
| |||
21 | 23 | | |
22 | 24 | | |
23 | 25 | | |
| 26 | + | |
| 27 | + | |
| 28 | + | |
24 | 29 | | |
25 | 30 | | |
26 | 31 | | |
| |||
129 | 134 | | |
130 | 135 | | |
131 | 136 | | |
| 137 | + | |
| 138 | + | |
| 139 | + | |
| 140 | + | |
| 141 | + | |
| 142 | + | |
| 143 | + | |
132 | 144 | | |
133 | 145 | | |
134 | 146 | | |
| |||
0 commit comments