vllm_omni.diffusion.model_loader.host_weights ¶
Typed diffusion adapters for runtime-ready final-layout artifacts.
Modules:
| Name | Description |
|---|---|
contracts | Typed semantic contracts shared by final-layout artifact representations. |
identity_adapter | Exact pre-load identity assembly for policy-defined final-layout artifacts. |
producers | Diffusion Host Weight Runtime producers. |
restorer | Generic validation-first restorer for exact final-layout tensor artifacts. |
source_identity | Canonical diffusion weight-source identity and one-load replacement guard. |
tensor_layout | Representation-neutral ownership discovery for final-layout tensors. |
FINAL_LAYOUT_BF16_SPEC module-attribute ¶
FINAL_LAYOUT_BF16_SPEC = FinalLayoutArtifactSpec(
representation=WeightRepresentation(
name=FINAL_LAYOUT_BF16_REPRESENTATION,
dtype=str(torch.bfloat16),
metadata=CanonicalJson.from_value(
{
"format": FINAL_LAYOUT_BF16_REPRESENTATION,
"mixed_precision_policy": "bf16-with-preserved-fp32",
}
),
),
producer=ProducerIdentity(
producer_id=FINAL_LAYOUT_BF16_PRODUCER_ID,
version=FINAL_LAYOUT_BF16_VERSION,
implementation_fingerprint=implementation_abi_fingerprint(
_BF16_IMPLEMENTATION_ABI
),
manifest_schema=FINAL_LAYOUT_BF16_MANIFEST_SCHEMA,
restorer_schema=FINAL_LAYOUT_TENSOR_RESTORER_SCHEMA,
),
implementation_abi=_BF16_IMPLEMENTATION_ABI,
)
FinalLayoutArtifactSpec dataclass ¶
Concrete representation, layout, producer, and restoration ABI.
component_ownership class-attribute instance-attribute ¶
component_ownership: str = 'complete-final-layout-tensors'
layout_name class-attribute instance-attribute ¶
layout_name: str = 'diffusion-final-module-layout-v1'
model_contract_schema class-attribute instance-attribute ¶
model_contract_schema: str = (
FINAL_LAYOUT_TENSOR_MODEL_CONTRACT_SCHEMA
)
FinalLayoutBF16Producer ¶
Publish finalized BF16-policy tensors through a store-scoped writer.
FinalLayoutIdentityContext dataclass ¶
Exact semantic identity plus process-local transaction guards.
FinalLayoutLoaderIdentity dataclass ¶
Loader ABI and exact configuration facts that may change final bytes.
FinalLayoutParallelIdentity dataclass ¶
Semantic parallel layout with DP and SP rank intentionally absent.
FinalLayoutRequest dataclass ¶
Representation-independent semantic request assembled by the loader.
adaptation class-attribute instance-attribute ¶
adaptation: AdaptationIdentity = field(
default_factory=AdaptationIdentity
)
parallel class-attribute instance-attribute ¶
parallel: FinalLayoutParallelIdentity = field(
default_factory=FinalLayoutParallelIdentity
)
FinalLayoutTensorRestorer ¶
Validate and plan restoration for one exact policy-defined lease.
plan_restore ¶
plan_restore(
model: object, lease: HostWeightLease
) -> FinalLayoutTensorRestorePlan
ImplementationIdentity dataclass ¶
NodeSourceDigestCache ¶
Share content-backed local-source fingerprints across node workers.
PreparedWeightSource dataclass ¶
Canonical source files and adapter ABI selected by the ordinary loader.
checkpoint_adapter class-attribute instance-attribute ¶
checkpoint_adapter: ImplementationIdentity | None = None
source_kind class-attribute instance-attribute ¶
source_kind: WeightSourceKind = WeightSourceKind.LOCAL_PATH
WeightSourceKind ¶
build_final_layout_identity ¶
build_final_layout_identity(
pipeline: Module,
*,
dit_modules: Sequence[tuple[str, Module]],
prepared_sources: Sequence[PreparedWeightSource],
request: FinalLayoutRequest,
policy: FinalLayoutTensorPolicy,
source_digest_cache: NodeSourceDigestCache
| None = None,
) -> FinalLayoutIdentityContext
Build exact source, representation, layout, and implementation identity.