pub struct StableDiffusionConfig {
pub width: i64,
pub height: i64,
pub clip: Config,
/* private fields */
}Fields§
§width: i64§height: i64§clip: ConfigImplementations§
Source§impl StableDiffusionConfig
impl StableDiffusionConfig
pub fn v1_5( sliced_attention_size: Option<i64>, height: Option<i64>, width: Option<i64>, ) -> Self
pub fn v2_1( sliced_attention_size: Option<i64>, height: Option<i64>, width: Option<i64>, ) -> Self
pub fn v2_1_inpaint( sliced_attention_size: Option<i64>, height: Option<i64>, width: Option<i64>, ) -> Self
pub fn build_vae( &self, vae_weights: &str, device: Device, ) -> Result<AutoEncoderKL>
pub fn build_unet( &self, unet_weights: &str, device: Device, in_channels: i64, ) -> Result<UNet2DConditionModel>
pub fn build_scheduler(&self, n_steps: usize) -> DDIMScheduler
pub fn build_clip_transformer( &self, clip_weights: &str, device: Device, ) -> Result<ClipTextTransformer>
Trait Implementations§
Source§impl Clone for StableDiffusionConfig
impl Clone for StableDiffusionConfig
Source§fn clone(&self) -> StableDiffusionConfig
fn clone(&self) -> StableDiffusionConfig
Returns a duplicate 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