mirror of
https://github.com/huggingface/candle.git
synced 2025-06-20 20:09:50 +00:00
Add Euler Ancestral Discrete Scheduler (#1390)
* Add Euler Ancestral Discrete Scheduler * Fix a bug of init_noise_sigma generation * minor fixes * use partition_point instead of custom bsearch * Fix some clippy lints. --------- Co-authored-by: laurent <laurent.mazare@gmail.com>
This commit is contained in:
@ -25,6 +25,22 @@ pub enum PredictionType {
|
||||
Sample,
|
||||
}
|
||||
|
||||
/// Time step spacing for the diffusion process.
|
||||
///
|
||||
/// "linspace", "leading", "trailing" corresponds to annotation of Table 2. of https://arxiv.org/abs/2305.08891
|
||||
#[derive(Debug, Clone, Copy)]
|
||||
pub enum TimestepSpacing {
|
||||
Leading,
|
||||
Linspace,
|
||||
Trailing,
|
||||
}
|
||||
|
||||
impl Default for TimestepSpacing {
|
||||
fn default() -> Self {
|
||||
Self::Leading
|
||||
}
|
||||
}
|
||||
|
||||
/// Create a beta schedule that discretizes the given alpha_t_bar function, which defines the cumulative product of
|
||||
/// `(1-beta)` over time from `t = [0,1]`.
|
||||
///
|
||||
|
Reference in New Issue
Block a user