GenParams

Trait 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§