mirror of
https://github.com/storytold/effectcraft.git
synced 2026-10-24 10:09:32 -06:00
#783: Object Matte mattes persist in the disk cache
Problem: computed Object Matte segmentations lived only in the in-memory cache, so every restart or memory eviction segmented the shot again (After Effects 26.5 keeps Object Matte results in its disk cache). Fix: the persistent disk cache gets a third entry kind, Matte (folder `mattes`, LZ4-compressed FrameSeg bytes, same checksum, atomic writes, LRU eviction under the one size limit, purged with the rest). Entries are keyed by the segmentation's chain key and scale; chain keys already hash the Input Key (the layer's source, timing, masks and effects above), the prompt, the mode and the model, so any change simply misses. The effects crate gets a SegStore trait behind its memory cache: Chain::ensure reads from it on a memory miss and writes what it computes. The engine installs the session's DiskCache as the store (held weakly, so switching the disk cache off drops it). Roto Brush segmentations go through the same chain and are persisted too. Frozen mattes already persist in the project (the Frozen parameter). Tests: engine tests_roto::object_matte_mattes_persist_in_the_disk_cache (a second session on the same folder and project gets all tracked frames back without being able to read a single input frame, renders identically, and a moved prompt finds nothing); render disk_cache segmentations_round_trip_and_reopen (round trip, reopen, damaged file is a miss, size limit evicts). Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
560767dfe7
commit
3466538d0e
+3
-1
@@ -482,7 +482,9 @@ prompt. `objectMatte.propagate {layer, effect?, direction?, wait?}` tracks the m
|
||||
frames around the reference frame in the background (`roto.cancel` stops it; edits to the prompt
|
||||
or the layer's frames queue it again), `objectMatte.freeze {wait?}` / `objectMatte.unfreeze`
|
||||
store or drop the final mattes, and `objectMatte.status {layer, effect?}` reports the job's
|
||||
progress, the frozen state, the tracked frames and which are computed.
|
||||
progress, the frozen state, the tracked frames and which are computed. With the disk cache on (Settings ▸
|
||||
Media & Disk Cache), computed Object Matte and Roto Brush segmentations are also kept there, keyed
|
||||
by what they are made of, so reopening a project reuses them.
|
||||
|
||||
```sh
|
||||
effectcraft-cli run clip.ecproj objectMatte.apply '{"layer":"#1","point":[320,200],"box":[250,120,400,300]}' \
|
||||
|
||||
Reference in New Issue
Block a user