pub struct PNDMScheduler {
pub config: PNDMSchedulerConfig,
/* private fields */
}Expand description
Pseudo numerical methods for diffusion models (PNDM) proposes using more advanced ODE integration techniques, namely Runge-Kutta method and a linear multi-step method.
Fields§
§config: PNDMSchedulerConfigImplementations§
Source§impl PNDMScheduler
impl PNDMScheduler
pub fn new(inference_steps: usize, config: PNDMSchedulerConfig) -> Self
pub fn timesteps(&self) -> &[usize]
Sourcepub fn scale_model_input(&self, sample: Tensor, _timestep: usize) -> Tensor
pub fn scale_model_input(&self, sample: Tensor, _timestep: usize) -> Tensor
Ensures interchangeability with schedulers that need to scale the denoising model input depending on the current timestep.
pub fn step( &mut self, model_output: &Tensor, timestep: usize, sample: &Tensor, ) -> Tensor
pub fn add_noise( &self, original: &Tensor, noise: Tensor, timestep: usize, ) -> Tensor
pub fn init_noise_sigma(&self) -> f64
Auto Trait Implementations§
impl Freeze for PNDMScheduler
impl RefUnwindSafe for PNDMScheduler
impl Send for PNDMScheduler
impl !Sync for PNDMScheduler
impl Unpin for PNDMScheduler
impl UnsafeUnpin for PNDMScheduler
impl UnwindSafe for PNDMScheduler
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
Mutably borrows from an owned value. Read more