pub enum DitError {
Io {
path: String,
source: Error,
},
Gguf(BonsaiError),
WrongArchitecture {
found: String,
expected: String,
},
MissingMetadata {
key: String,
},
InvalidMetadata {
key: String,
reason: String,
},
WrongTensorType {
name: String,
found: String,
expected: String,
},
WrongRank {
name: String,
found: usize,
expected: usize,
},
Shape(String),
Kernel(String),
}Expand description
Errors that can occur while loading or interrogating a FLUX.2 DiT
(bonsai-image) GGUF file.
Variants§
Io
An underlying I/O error while opening or mapping the GGUF file.
Gguf(BonsaiError)
An error from the OxiBonsai core GGUF reader (parse, missing tensor, unsupported quant type, byte-slice validation, …).
WrongArchitecture
The file’s general.architecture is not "bonsai-image".
Fields
MissingMetadata
A required bonsai-image.* metadata key was missing.
InvalidMetadata
A metadata value had an unexpected type or shape.
Fields
WrongTensorType
A tensor was found but its stored GGUF type did not match the storage
convention for its name space (quantized → TQ2_0_g128, plain → BF16).
Fields
WrongRank
A tensor’s stored dimensionality was unexpected (e.g. a quantized linear that was not 2-D).
Fields
Shape(String)
A forward-pass shape invariant was violated (e.g. a weight whose
(out, in) did not match the expected feature widths).
Kernel(String)
An error from the OxiBonsai kernels crate (e.g. the ternary GEMM rejecting an unaligned contraction dimension).
Trait Implementations§
Source§impl Error for DitError
impl Error for DitError
Source§fn source(&self) -> Option<&(dyn Error + 'static)>
fn source(&self) -> Option<&(dyn Error + 'static)>
1.0.0 · Source§fn description(&self) -> &str
fn description(&self) -> &str
use the Display impl or to_string()
Source§impl From<BonsaiError> for DitError
impl From<BonsaiError> for DitError
Source§fn from(source: BonsaiError) -> Self
fn from(source: BonsaiError) -> Self
Source§impl From<DitError> for PipelineError
impl From<DitError> for PipelineError
Source§impl From<KernelError> for DitError
impl From<KernelError> for DitError
Source§fn from(source: KernelError) -> Self
fn from(source: KernelError) -> Self
Auto Trait Implementations§
impl !RefUnwindSafe for DitError
impl !UnwindSafe for DitError
impl Freeze for DitError
impl Send for DitError
impl Sync for DitError
impl Unpin for DitError
impl UnsafeUnpin for DitError
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
impl<ST, DT> CastableFrom<ST, Initialized, Initialized> for DT
impl<ST, DT> CastableFrom<ST, Uninit, Uninit> for DT
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
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>
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>
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