pub enum AdaNormKind {
LayerNorm,
RmsNorm,
}Expand description
Pre-modulation normalization flavor for Op::AdaLayerNorm (DiT adaLN-Zero).
Both normalize over the last axis with no learnable affine — the affine
comes from the per-conditioning scale/shift inputs instead.
AdaNormKind::LayerNorm: mean-subtract + variance-normalize (DiT / PixArt / SD3 / FLUX adaLN blocks —LayerNorm(elementwise_affine=False)).AdaNormKind::RmsNorm: root-mean-square normalize only (adaLN variants that pre-norm with RMSNorm).
Variants§
Trait Implementations§
Source§impl Clone for AdaNormKind
impl Clone for AdaNormKind
Source§fn clone(&self) -> AdaNormKind
fn clone(&self) -> AdaNormKind
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 moreimpl Copy for AdaNormKind
Source§impl Debug for AdaNormKind
impl Debug for AdaNormKind
Source§impl Default for AdaNormKind
impl Default for AdaNormKind
Source§fn default() -> AdaNormKind
fn default() -> AdaNormKind
Returns the “default value” for a type. Read more
Source§impl<'de> Deserialize<'de> for AdaNormKind
impl<'de> Deserialize<'de> for AdaNormKind
Source§fn deserialize<__D>(
__deserializer: __D,
) -> Result<AdaNormKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(
__deserializer: __D,
) -> Result<AdaNormKind, <__D as Deserializer<'de>>::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for AdaNormKind
Source§impl Hash for AdaNormKind
impl Hash for AdaNormKind
Source§impl PartialEq for AdaNormKind
impl PartialEq for AdaNormKind
Source§impl Serialize for AdaNormKind
impl Serialize for AdaNormKind
Source§fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
fn serialize<__S>(
&self,
__serializer: __S,
) -> Result<<__S as Serializer>::Ok, <__S as Serializer>::Error>where
__S: Serializer,
Serialize this value into the given Serde serializer. Read more
impl StructuralPartialEq for AdaNormKind
Auto Trait Implementations§
impl Freeze for AdaNormKind
impl RefUnwindSafe for AdaNormKind
impl Send for AdaNormKind
impl Sync for AdaNormKind
impl Unpin for AdaNormKind
impl UnsafeUnpin for AdaNormKind
impl UnwindSafe for AdaNormKind
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
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<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to
key and return true if they are equal.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