registry
¶
Central registry for FastVideo pipelines and model configuration discovery.
This module mirrors the organization of sglang's registry while keeping FastVideo's legacy behavior and mappings intact.
Classes¶
fastvideo.registry.ConfigInfo
dataclass
¶
ConfigInfo(sampling_param_cls: type[SamplingParam] | None, pipeline_config_cls: type[PipelineConfig], workload_types: tuple[WorkloadType, ...], model_family: str | None = None, default_preset: str | None = None)
Encapsulates sampling + pipeline config classes for a model family.
Functions¶
fastvideo.registry.get_default_preset
¶
Return the default_preset name for a model path.
Source code in fastvideo/registry.py
fastvideo.registry.get_model_family
¶
Return the model_family string for a model path, or None.
Source code in fastvideo/registry.py
fastvideo.registry.get_preset_selection
¶
Return (default_preset, model_family) for a model path.
Single-lookup variant of :func:get_default_preset +
:func:get_model_family; callers that need both should prefer this
to avoid walking the registry twice.
Source code in fastvideo/registry.py
fastvideo.registry.get_registered_model_paths
¶
Return all registered HuggingFace model paths.
Useful for UIs and tooling that need to enumerate supported models.
fastvideo.registry.get_registered_models_with_workloads
¶
Return models with workload metadata, optionally filtered by workload.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
workload_type
|
str | None
|
If set (e.g. "t2v", "i2v", "t2i"), only return models that support this workload. If None, return all with workload_types. |
None
|
Returns:
| Type | Description |
|---|---|
list[dict[str, Any]]
|
List of dicts with keys: id, label, workload_types. |
Source code in fastvideo/registry.py
fastvideo.registry.register_configs
¶
register_configs(sampling_param_cls: type[SamplingParam] | None, pipeline_config_cls: type[PipelineConfig], workload_types: tuple[WorkloadType, ...], hf_model_paths: list[str] | None = None, model_detectors: list[Callable[[str], bool]] | None = None, model_family: str | None = None, default_preset: str | None = None) -> None
Register config classes for a model family.
workload_types declares which UI workload options this config supports. Use () for configs not exposed as workload options.