pipeline¶
Main pipeline orchestration for Direktor.
direktor.core.pipeline
¶
Main pipeline orchestration for Direktor.
This module coordinates all stages of the video generation pipeline.
PipelineResult
dataclass
¶
Result of running the Direktor pipeline.
Source code in direktor/core/pipeline.py
success
property
¶
Return True if the pipeline completed without an error.
main(input_file, stage=6, keywords=None, *, output_dir=None, temp_dir=None, clean=False, resume=True, optimize=True, progress_callback=None)
¶
Run the Direktor video generation pipeline.
The pipeline has 6 stages
- Generate podcast script from input text
- Generate audio from the script
- Generate transcript from the audio
- Generate image prompts from the transcript
- Generate images from the prompts
- Create the final video
Parameters:
| Name | Type | Description | Default |
|---|---|---|---|
input_file
|
str | Path
|
Path to the input text file. |
required |
stage
|
int
|
Stage to run up to (1-6). Previous outputs must exist for stages greater than 1. |
6
|
keywords
|
list[tuple[str, float, float]] | None
|
Optional list of |
None
|
output_dir
|
str | Path | None
|
Directory for the final output. Defaults to the temporary working directory. |
None
|
temp_dir
|
str | Path | None
|
Temporary working directory. Defaults to a hashed directory
under the configured |
None
|
clean
|
bool
|
If True, remove the temporary working directory before starting. |
False
|
resume
|
bool
|
If True, skip stages whose output files already exist. |
True
|
optimize
|
bool
|
If True, run narrative optimization on the input text. |
True
|
progress_callback
|
ProgressCallback | None
|
Optional callable |
None
|
Returns:
| Name | Type | Description |
|---|---|---|
A |
PipelineResult
|
class: |
Source code in direktor/core/pipeline.py
57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 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 | |