Skip to content

vllm_omni.diffusion.model_loader.host_weights.source_identity

Canonical diffusion weight-source identity and one-load replacement guard.

FinalLayoutSourceContext dataclass

Resolved source identity plus process-local replacement observations.

identity instance-attribute

snapshots instance-attribute

snapshots: tuple[_SourceSnapshot, ...]

ensure_sources_unchanged

ensure_sources_unchanged() -> None

sources_unchanged

sources_unchanged() -> bool

NodeSourceDigestCache

Share content-backed local-source fingerprints across node workers.

entries instance-attribute

entries = root / 'source-digests-v1' / 'entries'

locks instance-attribute

locks = root / 'source-digests-v1' / 'locks'

timeout_seconds instance-attribute

timeout_seconds = timeout_seconds

content_id

content_id(path: Path, state: _FileState) -> str

PreparedWeightSource dataclass

Canonical source files and adapter ABI selected by the ordinary loader.

checkpoint_adapter class-attribute instance-attribute

checkpoint_adapter: ImplementationIdentity | None = None

model_or_path instance-attribute

model_or_path: str

prefix instance-attribute

prefix: str

requested_revision instance-attribute

requested_revision: str | None

resolved_root instance-attribute

resolved_root: Path

source_kind class-attribute instance-attribute

subfolder instance-attribute

subfolder: str | None

use_safetensors instance-attribute

use_safetensors: bool

weight_files instance-attribute

weight_files: tuple[Path, ...]

WeightSourceKind

Bases: str, Enum

HUGGING_FACE_HUB class-attribute instance-attribute

HUGGING_FACE_HUB = 'hugging_face_hub'

LOCAL_PATH class-attribute instance-attribute

LOCAL_PATH = 'local_path'

resolve_final_layout_source_identity

resolve_final_layout_source_identity(
    prepared_sources: Sequence[PreparedWeightSource],
    *,
    model_id: str,
    target_names: frozenset[str],
    digest_cache: NodeSourceDigestCache | None = None,
) -> FinalLayoutSourceContext

Resolve exact source identity for files covering the owned tensors.