pub enum DiffusionError {
Show 23 variants
ModelLoad(String),
WeightNotFound {
layer: String,
expected_shape: Vec<usize>,
},
WeightShapeMismatch {
layer: String,
expected: Vec<usize>,
got: Vec<usize>,
},
SafetensorsCorrupt {
path: PathBuf,
reason: String,
},
ShapeMismatch {
op: String,
expected: Vec<usize>,
got: Vec<usize>,
},
DtypeMismatch {
expected: String,
got: String,
},
DeviceMismatch {
expected: String,
got: String,
},
NanDetected {
layer: String,
timestep: Option<usize>,
},
InfDetected {
layer: String,
timestep: Option<usize>,
},
NumericalInstability {
context: String,
},
Inference(String),
InvalidTimestep {
value: usize,
max: usize,
},
InvalidViewCount {
expected: usize,
got: usize,
},
InvalidLatentShape {
expected: Vec<usize>,
got: Vec<usize>,
},
SkipConnectionUnderflow {
expected: usize,
available: usize,
},
SchedulerNotInitialized,
ClipEncodingFailed(String),
VaeEncodeFailed(String),
VaeDecodeFailed(String),
UnetForwardFailed {
timestep: usize,
reason: String,
},
IoError(Error),
ImageProcessingError(String),
Candle(Error),
}Expand description
Errors that can occur during diffusion model operations.
Variants§
ModelLoad(String)
Generic model loading error with context message.
WeightNotFound
Weight file not found at expected path.
WeightShapeMismatch
Weight shape does not match expected dimensions.
SafetensorsCorrupt
Safetensors file is corrupted or invalid.
ShapeMismatch
Tensor shape mismatch during operation.
DtypeMismatch
Data type mismatch between tensors.
DeviceMismatch
Device mismatch between tensors.
NanDetected
NaN detected in tensor during computation.
InfDetected
Infinity detected in tensor during computation.
NumericalInstability
General numerical instability.
Inference(String)
Generic inference error with context.
InvalidTimestep
Invalid timestep value.
InvalidViewCount
Invalid number of views provided.
InvalidLatentShape
Invalid latent tensor shape.
SkipConnectionUnderflow
Skip connection underflow during U-Net forward pass.
SchedulerNotInitialized
Scheduler not initialized before use.
ClipEncodingFailed(String)
CLIP encoding failed.
VaeEncodeFailed(String)
VAE encoding failed.
VaeDecodeFailed(String)
VAE decoding failed.
UnetForwardFailed
U-Net forward pass failed.
IoError(Error)
I/O error during file operations.
ImageProcessingError(String)
Image processing error.
Candle(Error)
Error from candle tensor operations.
Trait Implementations§
Source§impl Debug for DiffusionError
impl Debug for DiffusionError
Source§impl Display for DiffusionError
impl Display for DiffusionError
Source§impl Error for DiffusionError
impl Error for DiffusionError
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
Source§impl From<Error> for DiffusionError
impl From<Error> for DiffusionError
Auto Trait Implementations§
impl Freeze for DiffusionError
impl !RefUnwindSafe for DiffusionError
impl Send for DiffusionError
impl Sync for DiffusionError
impl Unpin for DiffusionError
impl UnsafeUnpin for DiffusionError
impl !UnwindSafe for DiffusionError
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
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