pub struct Flux2Flow<'a> { /* private fields */ }Expand description
Tier-0 FLUX.2 dual-stream flow builder.
Implementations§
Source§impl<'a> Flux2Flow<'a>
impl<'a> Flux2Flow<'a>
pub fn new(cfg: &'a Flux2Config, weights: &'a Flux2Weights) -> Flux2Flow<'a>
pub fn batch(self, batch: usize) -> Flux2Flow<'a>
pub fn img_seq(self, seq: usize) -> Flux2Flow<'a>
pub fn txt_seq(self, seq: usize) -> Flux2Flow<'a>
pub fn position_ids(self, img_ids: Vec<f32>, txt_ids: Vec<f32>) -> Flux2Flow<'a>
pub fn profile(self, profile: CompileProfile) -> Flux2Flow<'a>
Sourcepub fn build_dual_blocks(self) -> Result<BuiltModel, Error>
pub fn build_dual_blocks(self) -> Result<BuiltModel, Error>
Build img/txt embed inputs + dual-stream transformer blocks (no single-stream tail).
Sourcepub fn build_forward(
self,
img_ids: &[f32],
txt_ids: &[f32],
) -> Result<Flux2ForwardBuilt, Error>
pub fn build_forward( self, img_ids: &[f32], txt_ids: &[f32], ) -> Result<Flux2ForwardBuilt, Error>
Full denoiser forward: native dual-stream blocks + single-stream tail.
Sourcepub fn build_minimal(self) -> Result<BuiltModel, Error>
pub fn build_minimal(self) -> Result<BuiltModel, Error>
Compile-minimal path: x_embedder → proj_out.
Trait Implementations§
Auto Trait Implementations§
impl<'a> Freeze for Flux2Flow<'a>
impl<'a> RefUnwindSafe for Flux2Flow<'a>
impl<'a> Send for Flux2Flow<'a>
impl<'a> Sync for Flux2Flow<'a>
impl<'a> Unpin for Flux2Flow<'a>
impl<'a> UnsafeUnpin for Flux2Flow<'a>
impl<'a> UnwindSafe for Flux2Flow<'a>
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,
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