caelum0x d56639a594
Some checks failed
build-images / web (push) Has been cancelled
vision2026-ci / Python SDK resource tests (push) Has been cancelled
build-images / api (push) Has been cancelled
build-images / worker-gpu (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (comfy-workflow-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (effects-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (eventbus-types) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (growth-analytics) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (provider-adapter-kit) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (publishing-connectors) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (render-core) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (shot-template-schema) (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (trends-schema) (push) Has been cancelled
vision2026-ci / Desktop engine crates (test + clippy + fmt) (push) Has been cancelled
codeql / Analyze (javascript-typescript) (push) Has been cancelled
codeql / Analyze (python) (push) Has been cancelled
perf / API hot-path micro-smoke (budgeted) (push) Has been cancelled
perf / Desktop engine crates (release build check) (push) Has been cancelled
vision2026-ci / API phase modules (ruff + pytest) (push) Has been cancelled
vision2026-ci / Alembic upgrade + drift check (push) Has been cancelled
vision2026-ci / Shared packages (TS≡Python golden parity) (caption-engine) (push) Has been cancelled
Menivor — open source release (MIT), free to use and fork
Paid, hosted product at menivor.com, now retired as a company project.
Fresh squashed history of the cleaned working tree (secret-scanned,
no .env, no customer data, no outreach logs). Built on
MoneyPrinterTurbo (MIT, harry0703) — see NOTICE.
2026-12-04 02:10:26 +03:00

49 lines
1.8 KiB
Python

"""Typed adapter around the migrated managed-video engine facade."""
from __future__ import annotations
from pathlib import Path
from reelforge_engine.contracts import GenerationRequest, GenerationResult
from reelforge_engine.runtime import runtime_profile
class ManagedVideoPipeline:
name = "managed-video"
def generate(self, request: GenerationRequest) -> GenerationResult:
# Importing the historical facade is deferred to the GPU worker call;
# importing contracts or the API application never loads model stacks.
# This is intentionally evaluated inside the GPU queue only. The
# profile is the auditable bridge to acceleration/pipeline/diffusion/
# model layers; clients see only the approved product capability.
runtime_profile(self.name)
from services.api_services.video_client import VideoClient
ratio = (
"9:16"
if request.height > request.width
else "16:9"
if request.width > request.height
else "1:1"
)
output = VideoClient().generate_video(
request.prompt,
str(request.reference_image_path) if request.reference_image_path else None,
str(request.output_path),
request.model,
request.duration_seconds,
video_ratio=ratio,
seed=request.seed,
**dict(request.parameters),
)
if not output:
raise RuntimeError("managed-video pipeline returned no output path")
return GenerationResult(
output_path=Path(output),
duration_seconds=float(request.duration_seconds),
provider_run_id=request.correlation_id,
model=request.model,
correlation_id=request.correlation_id,
)