pub struct ModelConfigBuilder { /* private fields */ }
Expand description
Builder for ModelConfig
.
Implementations§
Source§impl ModelConfigBuilder
impl ModelConfigBuilder
Sourcepub fn upscale_model<VALUE: Into<CLibPath>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn upscale_model<VALUE: Into<CLibPath>>( &mut self, value: VALUE, ) -> &mut Self
Path to esrgan model. Upscale images after generate, just RealESRGAN_x4plus_anime_6B supported by now
Sourcepub fn upscale_repeats<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self
pub fn upscale_repeats<VALUE: Into<i32>>(&mut self, value: VALUE) -> &mut Self
Run the ESRGAN upscaler this many times (default 1)
Sourcepub fn diffusion_model<VALUE: Into<CLibPath>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn diffusion_model<VALUE: Into<CLibPath>>( &mut self, value: VALUE, ) -> &mut Self
Path to the standalone diffusion model
Sourcepub fn clip_l<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
pub fn clip_l<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
path to the clip-l text encoder
Sourcepub fn clip_g<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
pub fn clip_g<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
path to the clip-g text encoder
Sourcepub fn t5xxl<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
pub fn t5xxl<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
Path to the t5xxl text encoder
Sourcepub fn taesd<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
pub fn taesd<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
Path to taesd. Using Tiny AutoEncoder for fast decoding (low quality)
Sourcepub fn control_net<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
pub fn control_net<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
Path to control net model
Sourcepub fn embeddings<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
pub fn embeddings<VALUE: Into<CLibPath>>(&mut self, value: VALUE) -> &mut Self
Path to embeddings
Sourcepub fn stacked_id_embd<VALUE: Into<CLibPath>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn stacked_id_embd<VALUE: Into<CLibPath>>( &mut self, value: VALUE, ) -> &mut Self
Path to PHOTOMAKER stacked id embeddings
Sourcepub fn weight_type<VALUE: Into<WeightType>>(
&mut self,
value: VALUE,
) -> &mut Self
pub fn weight_type<VALUE: Into<WeightType>>( &mut self, value: VALUE, ) -> &mut Self
Weight type. If not specified, the default is the type of the weight file
Sourcepub fn vae_tiling<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn vae_tiling<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Process vae in tiles to reduce memory usage (default: false)
Sourcepub fn rng<VALUE: Into<RngFunction>>(&mut self, value: VALUE) -> &mut Self
pub fn rng<VALUE: Into<RngFunction>>(&mut self, value: VALUE) -> &mut Self
RNG (default: CUDA)
Sourcepub fn schedule<VALUE: Into<Schedule>>(&mut self, value: VALUE) -> &mut Self
pub fn schedule<VALUE: Into<Schedule>>(&mut self, value: VALUE) -> &mut Self
Denoiser sigma schedule (default: DEFAULT)
Sourcepub fn vae_on_cpu<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn vae_on_cpu<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Keep vae in cpu (for low vram) (default: false)
Sourcepub fn clip_on_cpu<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn clip_on_cpu<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
keep clip in cpu (for low vram) (default: false)
Sourcepub fn control_net_cpu<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn control_net_cpu<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Keep controlnet in cpu (for low vram) (default: false)
Sourcepub fn flash_attention<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
pub fn flash_attention<VALUE: Into<bool>>(&mut self, value: VALUE) -> &mut Self
Use flash attention in the diffusion model (for low vram). Might lower quality, since it implies converting k and v to f16. This might crash if it is not supported by the backend.
pub fn chroma_use_dit_mask<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
pub fn chroma_use_t5_mask<VALUE: Into<bool>>( &mut self, value: VALUE, ) -> &mut Self
pub fn chroma_t5_mask_pad<VALUE: Into<i32>>( &mut self, value: VALUE, ) -> &mut Self
Sourcepub fn build(&self) -> Result<ModelConfig, ConfigBuilderError>
pub fn build(&self) -> Result<ModelConfig, ConfigBuilderError>
Trait Implementations§
Source§impl Clone for ModelConfigBuilder
impl Clone for ModelConfigBuilder
Source§fn clone(&self) -> ModelConfigBuilder
fn clone(&self) -> ModelConfigBuilder
1.0.0 · Source§const fn clone_from(&mut self, source: &Self)
const fn clone_from(&mut self, source: &Self)
source
. Read moreAuto Trait Implementations§
impl Freeze for ModelConfigBuilder
impl RefUnwindSafe for ModelConfigBuilder
impl !Send for ModelConfigBuilder
impl !Sync for ModelConfigBuilder
impl Unpin for ModelConfigBuilder
impl UnwindSafe for ModelConfigBuilder
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> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
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 moreSource§impl<T> Pointable for T
impl<T> Pointable for T
Source§impl<R, P> ReadPrimitive<R> for P
impl<R, P> ReadPrimitive<R> for P
Source§fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
fn read_from_little_endian(read: &mut R) -> Result<Self, Error>
ReadEndian::read_from_little_endian()
.