Saving renders
Most of the cost of AI video is in takes nobody uses. Raccord saves money at each point where it's about to be spent.
| When | Call | Saves |
|---|---|---|
| Before rendering | POST /v1/preflights |
Renders made with a wrong reference photo, or a prompt that contradicts the costume. |
| Before animating | POST /v1/keyframes |
Animating a start frame with the wrong face, costume or shape. |
| While rendering (open models) | POST /v1/previews |
The rest of a render that's clearly going wrong. |
| After each take | POST /v1/checks |
Asking for more takes once one passes. |
| After a batch | POST /v1/rankings |
Review time: people watch the best two. |
| Between extensions | POST /v1/extensions |
Paying for segments built on a broken one. |
Generate until a take passes
Ask your renderer for one take at a time and stop at the first that passes. If none passes within your budget, use the best of them.
from raccord_sdk import Raccord
raccord = Raccord()
paths = []
def make(n):
paths.append(render(seed=n)) # your renderer: returns the path of take n
return paths[-1]
take, checks = raccord.until_pass(make, max_takes=4, references={"Maya": ["maya.jpg"]})
if take:
print("Use", paths[len(checks) - 1], f"after {len(checks)} of 4 takes")
else:
best = raccord.rank(paths, references={"Maya": ["maya.jpg"]}).result["top_two"][0]
Gate a start frame
frame = raccord.keyframe_gate("start.png", references={"Maya": ["maya.jpg"]}, size=(1920, 1080))
if not frame.passed:
regenerate_start_frame(feedback=[f["fix"] for f in frame.findings])
Early abort
On models you run yourself (LTX-Video, Wan, Hunyuan through diffusers or ComfyUI), Raccord can look at a render partway and stop it if it's clearly doomed. With diffusers:
from raccord_sdk import Raccord
from raccord_sdk.early import EarlyAbort, RenderStopped, diffusers_callback, decode_ltx
abort = EarlyAbort(Raccord(), references={"Maya": ["maya.jpg"]}) # looks at 25%, 40% and 60% of the steps
callback = diffusers_callback(pipe, abort, decode_ltx, num_frames=121, height=512, width=768)
try:
video = pipe(prompt, image=start, num_frames=121, height=512, width=768, callback_on_step_end=callback).frames[0]
except RenderStopped as stop:
print(stop.decision["headline"], f"{stop.saved_fraction:.0%} of the steps saved")
At each look, the hook recovers the model's current guess of the finished video, decodes it, and sends six frames to /v1/previews. The guess is exact for flow-matching Euler samplers, as LTX-Video uses. In ComfyUI, use the Raccord KSampler (early abort) node.
How early real renders can be stopped, and how much that saves, is being measured. Results will be on the accuracy page.
Long shots built from extensions
for i, segment in enumerate(segments[1:], start=1):
c = raccord.check_extension(segments[i - 1], segment, references={"Maya": ["maya.jpg"]})
if not c.passed:
print("Stop at segment", i + 1, c.headline)
break