pub struct ModelConfig {Show 29 fields
pub transformer: Option<String>,
pub transformer_shards: Option<Vec<String>>,
pub vae: Option<String>,
pub spatial_upscaler: Option<String>,
pub temporal_upscaler: Option<String>,
pub distilled_lora: Option<String>,
pub t5_encoder: Option<String>,
pub clip_encoder: Option<String>,
pub t5_tokenizer: Option<String>,
pub clip_tokenizer: Option<String>,
pub clip_encoder_2: Option<String>,
pub clip_tokenizer_2: Option<String>,
pub text_encoder_files: Option<Vec<String>>,
pub text_tokenizer: Option<String>,
pub decoder: Option<String>,
pub default_steps: Option<u32>,
pub default_guidance: Option<f64>,
pub default_width: Option<u32>,
pub default_height: Option<u32>,
pub is_schnell: Option<bool>,
pub is_turbo: Option<bool>,
pub scheduler: Option<Scheduler>,
pub negative_prompt: Option<String>,
pub lora: Option<String>,
pub lora_scale: Option<f64>,
pub default_frames: Option<u32>,
pub default_fps: Option<u32>,
pub description: Option<String>,
pub family: Option<String>,
}Expand description
Per-model file path + default settings configuration.
Fields§
§transformer: Option<String>§transformer_shards: Option<Vec<String>>Multi-shard transformer paths (Z-Image BF16); empty means use single transformer
vae: Option<String>§spatial_upscaler: Option<String>LTX latent upsampler / spatial upscaler weights.
temporal_upscaler: Option<String>Optional temporal upscaler weights for LTX-2/LTX-2.3.
distilled_lora: Option<String>Optional distilled LoRA bundled with a model manifest.
t5_encoder: Option<String>§clip_encoder: Option<String>§t5_tokenizer: Option<String>§clip_tokenizer: Option<String>§clip_encoder_2: Option<String>CLIP-G / OpenCLIP encoder path (SDXL only)
clip_tokenizer_2: Option<String>CLIP-G / OpenCLIP tokenizer path (SDXL only)
text_encoder_files: Option<Vec<String>>Generic text encoder shard paths (Qwen3 for Z-Image)
text_tokenizer: Option<String>Generic text encoder tokenizer path (Qwen3 for Z-Image)
decoder: Option<String>Stage B decoder weights path (Wuerstchen only)
default_steps: Option<u32>Default inference steps (e.g. 4 for schnell, 25 for dev)
default_guidance: Option<f64>Default guidance scale (0.0 for schnell, 3.5 for dev finetuned)
default_width: Option<u32>Default output width
default_height: Option<u32>Default output height
is_schnell: Option<bool>Whether this model uses the schnell (distilled) timestep schedule. If None, auto-detected from the transformer filename.
is_turbo: Option<bool>Whether this model uses a turbo (few-step distilled) schedule. If None, auto-detected from the model name.
scheduler: Option<Scheduler>Scheduler algorithm for UNet-based models (SD1.5, SDXL). Ignored by flow-matching models.
negative_prompt: Option<String>Per-model default negative prompt for CFG-based models.
lora: Option<String>Default LoRA adapter path for this model.
lora_scale: Option<f64>Default LoRA scale for this model (0.0-2.0).
default_frames: Option<u32>Default number of video frames for video models (e.g. 25 for ltx-video).
default_fps: Option<u32>Default video FPS for video models (e.g. 24 for ltx-video).
description: Option<String>§family: Option<String>Implementations§
Source§impl ModelConfig
impl ModelConfig
Sourcepub fn all_file_paths(&self) -> Vec<String>
pub fn all_file_paths(&self) -> Vec<String>
Collect all file path strings from this model config into a flat list. Used for reference counting when determining which files are shared.
Sourcepub fn disk_usage(&self) -> (u64, f64)
pub fn disk_usage(&self) -> (u64, f64)
Total disk usage of all model files: (bytes, gigabytes).
Sums the file sizes of all paths referenced by this config entry. Missing files are silently skipped.
Sourcepub fn effective_steps(&self, global_cfg: &Config) -> u32
pub fn effective_steps(&self, global_cfg: &Config) -> u32
Effective steps: model default → global fallback → hardcoded default.
Sourcepub fn effective_guidance(&self) -> f64
pub fn effective_guidance(&self) -> f64
Effective guidance.
Sourcepub fn effective_width(&self, global_cfg: &Config) -> u32
pub fn effective_width(&self, global_cfg: &Config) -> u32
Effective width.
Sourcepub fn effective_height(&self, global_cfg: &Config) -> u32
pub fn effective_height(&self, global_cfg: &Config) -> u32
Effective height.
Sourcepub fn effective_negative_prompt(&self, global_cfg: &Config) -> Option<String>
pub fn effective_negative_prompt(&self, global_cfg: &Config) -> Option<String>
Effective negative prompt: per-model override → global default → None.
Sourcepub fn effective_lora(&self) -> Option<(String, f64)>
pub fn effective_lora(&self) -> Option<(String, f64)>
Effective LoRA config: per-model default path and scale, or None.
Sourcepub fn effective_frames(&self) -> Option<u32>
pub fn effective_frames(&self) -> Option<u32>
Effective video frames: per-model default, or None for image-only models.
Sourcepub fn effective_fps(&self) -> Option<u32>
pub fn effective_fps(&self) -> Option<u32>
Effective video FPS: per-model default, or None for image-only models.
Trait Implementations§
Source§impl Clone for ModelConfig
impl Clone for ModelConfig
Source§fn clone(&self) -> ModelConfig
fn clone(&self) -> ModelConfig
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read more