Trait sal_e_api::GenParams

source ·
pub trait GenParams: Debug + AsAny + Send + Sync + DynClone + Serialize + Deserialize {
Show 24 methods // Required methods fn seed(&self) -> Option<i64>; fn set_seed(&mut self, seed: i64); fn steps(&self) -> Option<u32>; fn set_steps(&mut self, steps: u32); fn count(&self) -> Option<u32>; fn set_count(&mut self, count: u32); fn cfg(&self) -> Option<f32>; fn set_cfg(&mut self, cfg: f32); fn width(&self) -> Option<u32>; fn set_width(&mut self, width: u32); fn height(&self) -> Option<u32>; fn set_height(&mut self, height: u32); fn prompt(&self) -> Option<String>; fn set_prompt(&mut self, prompt: String); fn negative_prompt(&self) -> Option<String>; fn set_negative_prompt(&mut self, negative_prompt: String); fn denoising(&self) -> Option<f32>; fn set_denoising(&mut self, denoising: f32); fn sampler(&self) -> Option<String>; fn set_sampler(&mut self, sampler: String); fn batch_size(&self) -> Option<u32>; fn set_batch_size(&mut self, batch_size: u32); fn image(&self) -> Option<Vec<u8>>; fn set_image(&mut self, image: Option<Vec<u8>>);
}
Expand description

Trait representing an interface to image generation parameters.

Required Methods§

source

fn seed(&self) -> Option<i64>

Gets the seed.

source

fn set_seed(&mut self, seed: i64)

Sets the seed.

source

fn steps(&self) -> Option<u32>

Gets the number of steps.

source

fn set_steps(&mut self, steps: u32)

Sets the number of steps.

source

fn count(&self) -> Option<u32>

Gets the number of images to generate.

source

fn set_count(&mut self, count: u32)

Sets the number of images to generate.

source

fn cfg(&self) -> Option<f32>

Gets the CFG scale.

source

fn set_cfg(&mut self, cfg: f32)

Sets the CFG scale.

source

fn width(&self) -> Option<u32>

Gets the image width.

source

fn set_width(&mut self, width: u32)

Sets the image width.

source

fn height(&self) -> Option<u32>

Gets the image height.

source

fn set_height(&mut self, height: u32)

Sets the image height.

source

fn prompt(&self) -> Option<String>

Gets the prompt.

source

fn set_prompt(&mut self, prompt: String)

Sets the prompt.

source

fn negative_prompt(&self) -> Option<String>

Gets the negative prompt.

source

fn set_negative_prompt(&mut self, negative_prompt: String)

Sets the negative prompt.

source

fn denoising(&self) -> Option<f32>

Gets the denoising strength.

source

fn set_denoising(&mut self, denoising: f32)

Sets the denoising strength.

source

fn sampler(&self) -> Option<String>

Gets the sampler.

source

fn set_sampler(&mut self, sampler: String)

Sets the sampler.

source

fn batch_size(&self) -> Option<u32>

Gets the batch size.

source

fn set_batch_size(&mut self, batch_size: u32)

Sets the batch size.

source

fn image(&self) -> Option<Vec<u8>>

Gets the image.

source

fn set_image(&mut self, image: Option<Vec<u8>>)

Sets the image.

Trait Implementations§

source§

impl From<&dyn GenParams> for ComfyParams

source§

fn from(params: &dyn GenParams) -> Self

Converts to this type from the input type.
source§

impl From<&dyn GenParams> for Img2ImgParams

source§

fn from(params: &dyn GenParams) -> Self

Converts to this type from the input type.
source§

impl From<&dyn GenParams> for Txt2ImgParams

source§

fn from(params: &dyn GenParams) -> Self

Converts to this type from the input type.
source§

impl<'typetag> Serialize for dyn GenParams + 'typetag

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'typetag> Serialize for dyn GenParams + Send + 'typetag

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'typetag> Serialize for dyn GenParams + Send + Sync + 'typetag

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more
source§

impl<'typetag> Serialize for dyn GenParams + Sync + 'typetag

source§

fn serialize<S>(&self, serializer: S) -> Result<S::Ok, S::Error>
where S: Serializer,

Serialize this value into the given Serde serializer. Read more

Implementors§