Run CorridorKey inference on clips with Input + AlphaHint. Settings can be passed as flags for non-interactive use, or omitted to prompt interactively.
(
ctx: typer.Context,
backend: Annotated[
str,
typer.Option(help="Inference backend: auto, torch, mlx"),
] = "auto",
max_frames: Annotated[
Optional[int],
typer.Option("--max-frames", help="Limit frames per clip"),
] = None,
skip_existing: Annotated[
bool,
typer.Option("--skip-existing", help="Skip frames whose output files already exist (resume a partial render)"),
] = False,
linear: Annotated[
Optional[bool],
typer.Option("--linear/--srgb", help="Input colorspace (default: prompt)"),
] = None,
despill: Annotated[
Optional[int],
typer.Option("--despill", help="Despill strength 0–10 (default: prompt)"),
] = None,
despeckle: Annotated[
Optional[bool],
typer.Option("--despeckle/--no-despeckle", help="Auto-despeckle toggle (default: prompt)"),
] = None,
despeckle_size: Annotated[
Optional[int],
typer.Option("--despeckle-size", help="Min pixel size for despeckle (default: prompt)"),
] = None,
image_size: Annotated[
Optional[int],
typer.Option("--image-size", help="Inference image size"),
] = None,
refiner: Annotated[
Optional[float],
typer.Option("--refiner", help="Refiner strength multiplier (default: prompt)"),
] = None,
generate_comp: Annotated[
Optional[bool],
typer.Option("--comp/--no-comp", help="Generate comp previews (default: prompt)"),
] = None,
gpu_post: Annotated[
Optional[bool],
typer.Option("--gpu-post/--cpu-post", help="Use GPU post-processing (default: prompt)"),
] = None,
tiled_inference: Annotated[
Optional[bool],
typer.Option("--tile/--no-tile", help="Use mlx tiled inference (default: prompt)"),
] = None,
screen_color: Annotated[
Optional[str],
typer.Option(
"--screen-color",
help="Screen color: auto (detect), green, or blue (default: prompt)",
),
] = None,
)
| 315 | |
| 316 | @app.command("run-inference") |
| 317 | def run_inference_cmd( |
| 318 | ctx: typer.Context, |
| 319 | backend: Annotated[ |
| 320 | str, |
| 321 | typer.Option(help="Inference backend: auto, torch, mlx"), |
| 322 | ] = "auto", |
| 323 | max_frames: Annotated[ |
| 324 | Optional[int], |
| 325 | typer.Option("--max-frames", help="Limit frames per clip"), |
| 326 | ] = None, |
| 327 | skip_existing: Annotated[ |
| 328 | bool, |
| 329 | typer.Option("--skip-existing", help="Skip frames whose output files already exist (resume a partial render)"), |
| 330 | ] = False, |
| 331 | linear: Annotated[ |
| 332 | Optional[bool], |
| 333 | typer.Option("--linear/--srgb", help="Input colorspace (default: prompt)"), |
| 334 | ] = None, |
| 335 | despill: Annotated[ |
| 336 | Optional[int], |
| 337 | typer.Option("--despill", help="Despill strength 0–10 (default: prompt)"), |
| 338 | ] = None, |
| 339 | despeckle: Annotated[ |
| 340 | Optional[bool], |
| 341 | typer.Option("--despeckle/--no-despeckle", help="Auto-despeckle toggle (default: prompt)"), |
| 342 | ] = None, |
| 343 | despeckle_size: Annotated[ |
| 344 | Optional[int], |
| 345 | typer.Option("--despeckle-size", help="Min pixel size for despeckle (default: prompt)"), |
| 346 | ] = None, |
| 347 | image_size: Annotated[ |
| 348 | Optional[int], |
| 349 | typer.Option("--image-size", help="Inference image size"), |
| 350 | ] = None, |
| 351 | refiner: Annotated[ |
| 352 | Optional[float], |
| 353 | typer.Option("--refiner", help="Refiner strength multiplier (default: prompt)"), |
| 354 | ] = None, |
| 355 | generate_comp: Annotated[ |
| 356 | Optional[bool], |
| 357 | typer.Option("--comp/--no-comp", help="Generate comp previews (default: prompt)"), |
| 358 | ] = None, |
| 359 | gpu_post: Annotated[ |
| 360 | Optional[bool], |
| 361 | typer.Option("--gpu-post/--cpu-post", help="Use GPU post-processing (default: prompt)"), |
| 362 | ] = None, |
| 363 | tiled_inference: Annotated[ |
| 364 | Optional[bool], |
| 365 | typer.Option("--tile/--no-tile", help="Use mlx tiled inference (default: prompt)"), |
| 366 | ] = None, |
| 367 | screen_color: Annotated[ |
| 368 | Optional[str], |
| 369 | typer.Option( |
| 370 | "--screen-color", |
| 371 | help="Screen color: auto (detect), green, or blue (default: prompt)", |
| 372 | ), |
| 373 | ] = None, |
| 374 | ) -> None: |
nothing calls this directly
no test coverage detected