Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 0 additions & 4 deletions src/models/unet_2d_blocks.rs
Original file line number Diff line number Diff line change
Expand Up @@ -567,10 +567,6 @@ pub struct CrossAttnDownBlock2D<B: Backend> {

impl CrossAttnDownBlock2DConfig {
pub fn init<B: Backend>(&self, device: &B::Device) -> CrossAttnDownBlock2D<B> {
let mut downblock = self.downblock;
downblock.in_channels = self.in_channels;
downblock.out_channels = self.out_channels;
downblock.temb_channels = self.temb_channels;
let downblock = self.downblock.init(device);

let attentions = (0..self.downblock.n_layers)
Expand Down
4 changes: 2 additions & 2 deletions src/schedulers/ddim.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@
use alloc::vec::Vec;
use burn::tensor::{backend::Backend, Tensor};

use super::{betas_for_alpha_bar, BetaSchedule, PredictionType};

#[cfg(not(feature = "std"))]
#[allow(unused_imports)]
use num_traits::Float;

use super::{betas_for_alpha_bar, BetaSchedule, PredictionType};

/// The configuration for the DDIM scheduler.
#[derive(Debug, Clone, Copy)]
pub struct DDIMSchedulerConfig {
Expand Down
4 changes: 2 additions & 2 deletions src/schedulers/dpmsolver_multistep.rs
Original file line number Diff line number Diff line change
Expand Up @@ -11,12 +11,12 @@ use alloc::vec;
use alloc::vec::Vec;
use burn::tensor::{backend::Backend, Tensor};

use super::{betas_for_alpha_bar, BetaSchedule, PredictionType};

#[cfg(not(feature = "std"))]
#[allow(unused_imports)]
use num_traits::Float;

use super::{betas_for_alpha_bar, BetaSchedule, PredictionType};

/// The algorithm type for the solver.
#[derive(Default, Debug, Clone, Copy, PartialEq, Eq)]
pub enum DPMSolverAlgorithmType {
Expand Down
4 changes: 4 additions & 0 deletions src/schedulers/euler_discrete.rs
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,10 @@ use alloc::vec;
use alloc::vec::Vec;
use burn::tensor::{backend::Backend, Distribution, Tensor};

#[cfg(not(feature = "std"))]
#[allow(unused_imports)]
use num_traits::Float;

use super::{BetaSchedule, PredictionType};

/// Configuration for the Euler Discrete Scheduler.
Expand Down
4 changes: 4 additions & 0 deletions src/schedulers/mod.rs
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,10 @@ use alloc::vec::Vec;
use burn::tensor::{backend::Backend, Tensor};
use core::f64::consts::FRAC_PI_2;

#[cfg(not(feature = "std"))]
#[allow(unused_imports)]
use num_traits::Float;

pub mod ddim;
pub mod ddpm;
pub mod dpmsolver_multistep;
Expand Down