mistralrs_core/diffusion_models/
mod.rs

1pub(crate) mod clip;
2pub(crate) mod flux;
3pub(crate) mod processor;
4pub(crate) mod t5;
5
6macro_rules! generate_repr {
7    ($t:ident) => {
8        #[cfg(feature = "pyo3_macros")]
9        #[pyo3::pymethods]
10        impl $t {
11            fn __repr__(&self) -> String {
12                format!("{self:#?}")
13            }
14        }
15    };
16}
17
18#[cfg_attr(feature = "pyo3_macros", pyo3::pyclass)]
19#[cfg_attr(feature = "pyo3_macros", pyo3(get_all))]
20#[derive(Debug, Clone, serde::Serialize, serde::Deserialize)]
21pub struct DiffusionGenerationParams {
22    pub height: usize,
23    pub width: usize,
24}
25
26generate_repr!(DiffusionGenerationParams);
27
28impl Default for DiffusionGenerationParams {
29    /// Image dimensions will be 720x1280.
30    fn default() -> Self {
31        Self {
32            height: 720,
33            width: 1280,
34        }
35    }
36}