pub struct ModelPaths {Show 17 fields
pub transformer: PathBuf,
pub transformer_shards: Vec<PathBuf>,
pub low_noise_transformer: Option<PathBuf>,
pub vae: PathBuf,
pub spatial_upscaler: Option<PathBuf>,
pub temporal_upscaler: Option<PathBuf>,
pub distilled_lora: Option<PathBuf>,
pub low_noise_distilled_lora: Option<PathBuf>,
pub t5_encoder: Option<PathBuf>,
pub clip_encoder: Option<PathBuf>,
pub t5_tokenizer: Option<PathBuf>,
pub clip_tokenizer: Option<PathBuf>,
pub clip_encoder_2: Option<PathBuf>,
pub clip_tokenizer_2: Option<PathBuf>,
pub text_encoder_files: Vec<PathBuf>,
pub text_tokenizer: Option<PathBuf>,
pub decoder: Option<PathBuf>,
}Expand description
Resolved model file paths.
For diffusion models, transformer and vae are always required.
For upscaler models, only transformer (weights) is required; vae is empty.
For utility models, only transformer is required; vae may be empty.
Other paths are optional — each engine validates what it needs at load time.
Fields§
§transformer: PathBuf§transformer_shards: Vec<PathBuf>Multi-shard transformer paths (Z-Image BF16); empty means use single transformer
low_noise_transformer: Option<PathBuf>The low-noise expert of a two-expert checkpoint pair (Wan 2.2 A14B).
Some is the two-expert predicate. The high-noise expert lives in
transformer because it runs first — the sampler starts at high sigma —
so every consumer that only understands one transformer keeps working
against the one that opens the generation.
vae: PathBuf§spatial_upscaler: Option<PathBuf>§temporal_upscaler: Option<PathBuf>§distilled_lora: Option<PathBuf>§low_noise_distilled_lora: Option<PathBuf>The distilled adapter for low_noise_transformer. Each expert of an
A14B pair is distilled separately; swapping them is not a degradation,
it is the wrong model.
t5_encoder: Option<PathBuf>§clip_encoder: Option<PathBuf>§t5_tokenizer: Option<PathBuf>§clip_tokenizer: Option<PathBuf>§clip_encoder_2: Option<PathBuf>CLIP-G / OpenCLIP encoder (SDXL only)
clip_tokenizer_2: Option<PathBuf>CLIP-G / OpenCLIP tokenizer (SDXL only)
text_encoder_files: Vec<PathBuf>Generic text encoder shard paths (Qwen3 for Z-Image)
text_tokenizer: Option<PathBuf>Generic text encoder tokenizer (Qwen3 for Z-Image)
decoder: Option<PathBuf>Stage B decoder weights (Wuerstchen only)
Implementations§
Source§impl ModelPaths
impl ModelPaths
Sourcepub fn all_file_paths(&self) -> Vec<&Path>
pub fn all_file_paths(&self) -> Vec<&Path>
Every resolved local artifact that can participate in engine creation. Policy fences consume this before inspecting or loading any artifact.
Sourcepub fn resolve(model_name: &str, config: &Config) -> Option<Self>
pub fn resolve(model_name: &str, config: &Config) -> Option<Self>
Resolve paths for a model. Checks config, then env vars. Returns None if transformer and VAE paths can’t be resolved. All other paths are optional (depend on model family).
Sourcepub fn resolve_from_model_config_exact(model_cfg: &ModelConfig) -> Option<Self>
pub fn resolve_from_model_config_exact(model_cfg: &ModelConfig) -> Option<Self>
Resolve only the paths captured in model_cfg.
This intentionally does not consult MOLD_*_PATH environment variables,
manifests, sidecars, or model discovery. Durable chain jobs use it after
admission so a restart cannot silently substitute different artifacts.
Trait Implementations§
Source§impl Clone for ModelPaths
impl Clone for ModelPaths
Source§fn clone(&self) -> ModelPaths
fn clone(&self) -> ModelPaths
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreSource§impl Debug for ModelPaths
impl Debug for ModelPaths
impl Eq for ModelPaths
Source§impl PartialEq for ModelPaths
impl PartialEq for ModelPaths
impl StructuralPartialEq for ModelPaths
Auto Trait Implementations§
impl Freeze for ModelPaths
impl RefUnwindSafe for ModelPaths
impl Send for ModelPaths
impl Sync for ModelPaths
impl Unpin for ModelPaths
impl UnsafeUnpin for ModelPaths
impl UnwindSafe for ModelPaths
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.