pub struct StableDiffusionConfig {
pub width: usize,
pub height: usize,
pub clip: Config,
pub clip2: Option<Config>,
/* private fields */
}
Fields§
§width: usize
§height: usize
§clip: Config
§clip2: Option<Config>
Implementations§
source§impl StableDiffusionConfig
impl StableDiffusionConfig
pub fn v1_5( sliced_attention_size: Option<usize>, height: Option<usize>, width: Option<usize> ) -> Self
pub fn v2_1( sliced_attention_size: Option<usize>, height: Option<usize>, width: Option<usize> ) -> Self
pub fn sdxl( sliced_attention_size: Option<usize>, height: Option<usize>, width: Option<usize> ) -> Self
pub fn sdxl_turbo( sliced_attention_size: Option<usize>, height: Option<usize>, width: Option<usize> ) -> Self
pub fn ssd1b( sliced_attention_size: Option<usize>, height: Option<usize>, width: Option<usize> ) -> Self
pub fn build_vae<P: AsRef<Path>>( &self, vae_weights: P, device: &Device, dtype: DType ) -> Result<AutoEncoderKL>
pub fn build_unet<P: AsRef<Path>>( &self, unet_weights: P, device: &Device, in_channels: usize, use_flash_attn: bool, dtype: DType ) -> Result<UNet2DConditionModel>
pub fn build_scheduler(&self, n_steps: usize) -> Result<Box<dyn Scheduler>>
Trait Implementations§
source§impl Clone for StableDiffusionConfig
impl Clone for StableDiffusionConfig
source§fn clone(&self) -> StableDiffusionConfig
fn clone(&self) -> StableDiffusionConfig
Returns a copy of the value. Read more
1.0.0 · source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreAuto Trait Implementations§
impl Freeze for StableDiffusionConfig
impl !RefUnwindSafe for StableDiffusionConfig
impl Send for StableDiffusionConfig
impl Sync for StableDiffusionConfig
impl Unpin for StableDiffusionConfig
impl !UnwindSafe for StableDiffusionConfig
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