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§
sourcefn set_height(&mut self, height: u32)
fn set_height(&mut self, height: u32)
Sets the image height.
sourcefn set_prompt(&mut self, prompt: String)
fn set_prompt(&mut self, prompt: String)
Sets the prompt.
sourcefn negative_prompt(&self) -> Option<String>
fn negative_prompt(&self) -> Option<String>
Gets the negative prompt.
sourcefn set_negative_prompt(&mut self, negative_prompt: String)
fn set_negative_prompt(&mut self, negative_prompt: String)
Sets the negative prompt.
sourcefn set_denoising(&mut self, denoising: f32)
fn set_denoising(&mut self, denoising: f32)
Sets the denoising strength.
sourcefn set_sampler(&mut self, sampler: String)
fn set_sampler(&mut self, sampler: String)
Sets the sampler.
sourcefn batch_size(&self) -> Option<u32>
fn batch_size(&self) -> Option<u32>
Gets the batch size.
sourcefn set_batch_size(&mut self, batch_size: u32)
fn set_batch_size(&mut self, batch_size: u32)
Sets the batch size.