pub struct PrecisionProfile {
pub name: String,
pub description: String,
pub zones: Vec<PrecisionZone>,
pub quality_target: f32,
pub vram_target: f32,
}Expand description
A precision profile defining step-to-precision mapping rules
Fields§
§name: StringProfile name
description: StringDescription
zones: Vec<PrecisionZone>Precision zones (sorted by start_step)
quality_target: f32Quality target (0.0 - 1.0)
vram_target: f32VRAM target percentage (0.0 - 1.0)
Implementations§
Source§impl PrecisionProfile
impl PrecisionProfile
Sourcepub fn new(name: impl Into<String>, description: impl Into<String>) -> Self
pub fn new(name: impl Into<String>, description: impl Into<String>) -> Self
Create a new profile
Sourcepub fn add_zone(
self,
start: f32,
end: f32,
precision: Precision,
rationale: impl Into<String>,
) -> Self
pub fn add_zone( self, start: f32, end: f32, precision: Precision, rationale: impl Into<String>, ) -> Self
Add a precision zone
Sourcepub fn precision_at(&self, step_fraction: f32) -> Precision
pub fn precision_at(&self, step_fraction: f32) -> Precision
Get precision for a given step fraction (0.0 - 1.0)
Sourcepub fn estimated_vram_ratio(&self) -> f32
pub fn estimated_vram_ratio(&self) -> f32
Estimate average VRAM usage ratio
Sourcepub fn estimated_quality(&self) -> f32
pub fn estimated_quality(&self) -> f32
Estimate average quality factor
Sourcepub fn transition_count(&self) -> usize
pub fn transition_count(&self) -> usize
Count precision transitions
Trait Implementations§
Source§impl Clone for PrecisionProfile
impl Clone for PrecisionProfile
Source§fn clone(&self) -> PrecisionProfile
fn clone(&self) -> PrecisionProfile
Returns a duplicate of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreSource§impl Debug for PrecisionProfile
impl Debug for PrecisionProfile
Source§impl<'de> Deserialize<'de> for PrecisionProfile
impl<'de> Deserialize<'de> for PrecisionProfile
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
Auto Trait Implementations§
impl Freeze for PrecisionProfile
impl RefUnwindSafe for PrecisionProfile
impl Send for PrecisionProfile
impl Sync for PrecisionProfile
impl Unpin for PrecisionProfile
impl UnwindSafe for PrecisionProfile
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