pipeline_registry
¶
Classes¶
fastvideo.pipelines.pipeline_registry.PipelineType
¶
Enumeration for different pipeline types.
Inherits from str to allow string comparison for backward compatibility.
Functions¶
fastvideo.pipelines.pipeline_registry.PipelineType.choices
classmethod
¶
fastvideo.pipelines.pipeline_registry.PipelineType.from_string
classmethod
¶
from_string(value: str) -> PipelineType
Convert string to PipelineType enum.
Source code in fastvideo/pipelines/pipeline_registry.py
Functions¶
fastvideo.pipelines.pipeline_registry.get_pipeline_registry
¶
get_pipeline_registry(pipeline_type: PipelineType | str | None = None) -> _PipelineRegistry
Get a pipeline registry for the specified mode, pipeline type, and workload type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_type
|
PipelineType | str | None
|
Pipeline type to load. If None and mode is provided, will be derived from mode. |
None
|
Returns:
| Type | Description |
|---|---|
_PipelineRegistry
|
A pipeline registry instance. |
Source code in fastvideo/pipelines/pipeline_registry.py
fastvideo.pipelines.pipeline_registry.import_pipeline_classes
cached
¶
import_pipeline_classes(pipeline_types: list[PipelineType] | PipelineType | None = None) -> dict[str, dict[str, dict[str, type[ComposedPipelineBase] | None]]]
Import pipeline classes based on the pipeline type and workload type.
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
pipeline_types
|
list[PipelineType] | PipelineType | None
|
The pipeline types to load (basic, preprocess, training). If None, loads all types. |
None
|
Returns:
| Type | Description |
|---|---|
dict[str, dict[str, dict[str, type[ComposedPipelineBase] | None]]]
|
A three-level nested dictionary: |
dict[str, dict[str, dict[str, type[ComposedPipelineBase] | None]]]
|
{pipeline_type: {architecture_name: {pipeline_name: pipeline_cls}}} |
dict[str, dict[str, dict[str, type[ComposedPipelineBase] | None]]]
|
e.g., {"basic": {"wan": {"WanPipeline": WanPipeline}}} |
Source code in fastvideo/pipelines/pipeline_registry.py
130 131 132 133 134 135 136 137 138 139 140 141 142 143 144 145 146 147 148 149 150 151 152 153 154 155 156 157 158 159 160 161 162 163 164 165 166 167 168 169 170 171 172 173 174 175 176 177 178 179 180 181 182 183 184 185 186 187 188 189 190 191 192 193 194 195 196 197 198 199 200 201 202 203 204 205 206 207 208 209 210 211 212 213 214 215 216 217 218 219 220 221 222 | |