From cc51b298fdec889d27a952d45846384ceb92a9ff Mon Sep 17 00:00:00 2001 From: OpenClaw Agent Date: Fri, 17 Jul 2026 09:21:55 +0000 Subject: [PATCH] Use external timeline runtime images --- ltx_director.py | 33 +++++++++++++++++++-------------- 1 file changed, 19 insertions(+), 14 deletions(-) diff --git a/ltx_director.py b/ltx_director.py index aa0dd87..6fee093 100644 --- a/ltx_director.py +++ b/ltx_director.py @@ -1541,7 +1541,7 @@ def _build_guide_data_from_timeline( img_segs = [ s for s in tdata.get("segments", []) if s.get("type", "image") in ("image", "video") - and (s.get("imageFile") or s.get("imageB64")) + and (s.get("imageFile") or s.get("imageB64") or s.get("runtime_image") is not None) and int(s.get("start", 0)) < start_frame + duration_frames and int(s.get("start", 0)) + int(s.get("length", 1)) > start_frame ] @@ -1565,20 +1565,25 @@ def _build_guide_data_from_timeline( tensor = _load_video_tensor(seg_for_load, frame_rate_f, input_dir=input_dir) cache_key = None else: - cache_key = ( - seg.get("imageFile") or "", - seg.get("imageB64") or "", - custom_width, - custom_height, - resize_method, - divisible_by, - img_compression, - ) - cached_tensor = processed_still_cache.get(cache_key) - if cached_tensor is not None: - tensor = cached_tensor - else: + if seg.get("runtime_image") is not None: + cache_key = None + cached_tensor = None tensor = _load_image_tensor(seg, cache=image_cache, input_dir=input_dir) + else: + cache_key = ( + seg.get("imageFile") or "", + seg.get("imageB64") or "", + custom_width, + custom_height, + resize_method, + divisible_by, + img_compression, + ) + cached_tensor = processed_still_cache.get(cache_key) + if cached_tensor is not None: + tensor = cached_tensor + else: + tensor = _load_image_tensor(seg, cache=image_cache, input_dir=input_dir) if cache_key is None or cached_tensor is None: src_h, src_w = tensor.shape[1], tensor.shape[2]