pub struct DDIMConfig {
pub num_train_timesteps: usize,
pub beta_start: f64,
pub beta_end: f64,
pub beta_schedule: BetaSchedule,
pub clip_sample: bool,
pub set_alpha_to_one: bool,
pub prediction_type: PredictionType,
pub timestep_spacing: TimestepSpacing,
pub steps_offset: usize,
}Expand description
DDIMScheduler configuration (the subset that affects forward math).
Fields§
§num_train_timesteps: usizenum_train_timesteps — SD-1.5: 1000.
beta_start: f64beta_start — SD-1.5: 0.00085.
beta_end: f64beta_end — SD-1.5: 0.012.
beta_schedule: BetaSchedulebeta_schedule — SD-1.5: ScaledLinear.
clip_sample: boolclip_sample — SD-1.5: false (no clipping of predicted x0).
set_alpha_to_one: boolset_alpha_to_one — SD-1.5: false. When false, the
final-step alpha_prev is alphas_cumprod[0] (matches diffusers).
prediction_type: PredictionTypeprediction_type — SD-1.5: “epsilon” (the UNet predicts the noise).
Only "epsilon" is implemented; anything else returns an error
at set_timesteps time.
timestep_spacing: TimestepSpacingtimestep_spacing — SD-1.5: Leading.
steps_offset: usizesteps_offset — SD-1.5: 1 (diffusers adds this offset on the
leading path so the first inference step is step_ratio rather
than 0; consumed inside DDIMScheduler::set_timesteps).
Implementations§
Source§impl DDIMConfig
impl DDIMConfig
Sourcepub fn sd_v1_5() -> Self
pub fn sd_v1_5() -> Self
SD-1.5 defaults (alias for Default::default).
Trait Implementations§
Source§impl Clone for DDIMConfig
impl Clone for DDIMConfig
Source§fn clone(&self) -> DDIMConfig
fn clone(&self) -> DDIMConfig
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for DDIMConfig
impl Debug for DDIMConfig
Auto Trait Implementations§
impl Freeze for DDIMConfig
impl RefUnwindSafe for DDIMConfig
impl Send for DDIMConfig
impl Sync for DDIMConfig
impl Unpin for DDIMConfig
impl UnsafeUnpin for DDIMConfig
impl UnwindSafe for DDIMConfig
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T> DistributionExt for Twhere
T: ?Sized,
impl<T, U> Imply<T> for U
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more