pub struct Flux2VaeConfig {
pub in_channels: usize,
pub out_channels: usize,
pub latent_channels: usize,
pub layers_per_block: usize,
pub norm_num_groups: usize,
pub block_out_channels: Vec<usize>,
pub act_fn: String,
pub batch_norm_eps: f32,
pub mid_block_add_attention: bool,
pub use_post_quant_conv: bool,
pub scaling_factor: f32,
pub shift_factor: f32,
}Fields§
§in_channels: usize§out_channels: usize§latent_channels: usize§layers_per_block: usize§norm_num_groups: usize§block_out_channels: Vec<usize>§act_fn: String§batch_norm_eps: f32§mid_block_add_attention: bool§use_post_quant_conv: bool§scaling_factor: f32§shift_factor: f32Implementations§
Source§impl Flux2VaeConfig
impl Flux2VaeConfig
pub fn from_file(path: &Path) -> Result<Flux2VaeConfig, Error>
pub fn flux2_klein() -> Flux2VaeConfig
Sourcepub fn tiny() -> Flux2VaeConfig
pub fn tiny() -> Flux2VaeConfig
Tiny VAE for unit tests (no mid attention to shrink graph).
pub fn bn_channels(&self) -> usize
Sourcepub fn encode_spatial_stride(&self) -> usize
pub fn encode_spatial_stride(&self) -> usize
Spatial downsample factor from RGB to latent (one halving per encoder down block except the last).
Trait Implementations§
Source§impl Clone for Flux2VaeConfig
impl Clone for Flux2VaeConfig
Source§fn clone(&self) -> Flux2VaeConfig
fn clone(&self) -> Flux2VaeConfig
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for Flux2VaeConfig
impl Debug for Flux2VaeConfig
Source§impl<'de> Deserialize<'de> for Flux2VaeConfig
impl<'de> Deserialize<'de> for Flux2VaeConfig
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<Flux2VaeConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<Flux2VaeConfig, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for Flux2VaeConfig
impl RefUnwindSafe for Flux2VaeConfig
impl Send for Flux2VaeConfig
impl Sync for Flux2VaeConfig
impl Unpin for Flux2VaeConfig
impl UnsafeUnpin for Flux2VaeConfig
impl UnwindSafe for Flux2VaeConfig
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> DeserializeOwned for Twhere
T: for<'de> Deserialize<'de>,
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>
Converts
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>
Converts
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