pub struct ZParams {
pub height: usize,
pub width: usize,
pub steps: usize,
pub seed: u64,
pub shift: f32,
pub max_tokens: usize,
pub guidance: f32,
pub negative_prompt: Option<String>,
pub cfg_normalization: f32,
pub cfg_truncation: f32,
pub num_images: usize,
}Expand description
Generation parameters. ZParams::from_defaults fills them from the
container; every field can be overridden.
Fields§
§height: usize§width: usize§steps: usize§seed: u64§shift: f32§max_tokens: usize§guidance: f32Classifier-free guidance scale; 0 disables CFG (one forward/step).
negative_prompt: Option<String>None = the container’s default negative prompt (“” by default).
cfg_normalization: f320 = off; c > 0 clips ‖pred‖ to c·‖pos‖ (diffusers True = 1.0).
cfg_truncation: f32CFG only while t_norm ≤ this (1.0 = every step).
num_images: usizeImages per prompt; image i uses seed + i.
Implementations§
Trait Implementations§
Auto Trait Implementations§
impl Freeze for ZParams
impl RefUnwindSafe for ZParams
impl Send for ZParams
impl Sync for ZParams
impl Unpin for ZParams
impl UnsafeUnpin for ZParams
impl UnwindSafe for ZParams
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