vllm_omni.diffusion.model_loader.diffusers_loader ¶
DIFFUSION_MODEL_BIN_WEIGHTS_INDEX module-attribute ¶
DIFFUSION_MODEL_WEIGHTS_INDEX module-attribute ¶
SAFETENSORS_INDEX_FILES module-attribute ¶
SAFETENSORS_INDEX_FILES = [
DIFFUSION_MODEL_WEIGHTS_INDEX,
TRANSFORMER_WEIGHTS_INDEX,
]
SHARDED_SAFETENSORS_PATTERN module-attribute ¶
SHARDED_SAFETENSORS_PATTERN = re.compile(
"^(?P<family>.+)-\\d+-of-(?P<count>\\d+)\\.safetensors$"
)
TRANSFORMER_WEIGHTS_INDEX module-attribute ¶
DiffusersPipelineLoader ¶
Bases: HWRLoaderMixin
Model loader that can load diffusers pipeline components from disk.
counter_after_loading_weights class-attribute instance-attribute ¶
counter_after_loading_weights: float = 0.0
counter_before_loading_weights class-attribute instance-attribute ¶
counter_before_loading_weights: float = 0.0
ComponentSource dataclass ¶
get_all_weights ¶
get_all_weights(
model: Module,
sources: Sequence[ComponentSource] | None = None,
) -> Generator[tuple[str, Tensor], None, None]
load_model ¶
load_model(
load_device: str,
load_format: str | None = "default",
custom_pipeline_name: str | type[Module] | None = None,
device: device | None = None,
) -> Module
Load a model with the given configurations.
load_weights ¶
load_weights(
model: Module,
*,
stream_online_quant_to_cpu: bool = False,
sources: Sequence[ComponentSource] | None = None,
planned_weights: Iterable[str] = (),
) -> None
take_host_weight_plan ¶
take_host_weight_plan() -> HostWeightPlan | None
Transfer the loader-produced plan to the offload backend.