Use external timeline runtime images
This commit is contained in:
@@ -1541,7 +1541,7 @@ def _build_guide_data_from_timeline(
|
|||||||
img_segs = [
|
img_segs = [
|
||||||
s for s in tdata.get("segments", [])
|
s for s in tdata.get("segments", [])
|
||||||
if s.get("type", "image") in ("image", "video")
|
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)) < start_frame + duration_frames
|
||||||
and int(s.get("start", 0)) + int(s.get("length", 1)) > start_frame
|
and int(s.get("start", 0)) + int(s.get("length", 1)) > start_frame
|
||||||
]
|
]
|
||||||
@@ -1564,6 +1564,11 @@ def _build_guide_data_from_timeline(
|
|||||||
seg_for_load["length"] = max(1, seg_length - offset)
|
seg_for_load["length"] = max(1, seg_length - offset)
|
||||||
tensor = _load_video_tensor(seg_for_load, frame_rate_f, input_dir=input_dir)
|
tensor = _load_video_tensor(seg_for_load, frame_rate_f, input_dir=input_dir)
|
||||||
cache_key = None
|
cache_key = None
|
||||||
|
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:
|
else:
|
||||||
cache_key = (
|
cache_key = (
|
||||||
seg.get("imageFile") or "",
|
seg.get("imageFile") or "",
|
||||||
|
|||||||
Reference in New Issue
Block a user