spark-local-media-generation
Spark local media generation
Hero still first, frames second, clips last, interpolation after. Each step is anchored to the one before it, so product identity is decided where a retry costs seconds, not minutes. The default film is a 30-second master: six storyboard shots, so six frames and six 5-second clips, generated at native 1080p and interpolated to 60 fps.
Before every GPU phase
-
Check memory with
spark-model-scheduler. One diffusion family resident at a time;cinefoundry mem freewhen switching between them. The harness does this at every phase boundary (enterPhase) and puts the language models to sleep for frames and clips. -
Evict the page cache of the model files. On DGX Spark CUDA can only allocate memory that is truly free (
MemFree), not what Linux counts as available:MemAvailableincludes the page cache, and every model file just read from NVMe - tens of GB of safetensors - sits there looking reclaimable. With a warm cache a video model load can fail, or sample with far less room thancinefoundry mem statussuggests. Compare the two, and drop the cache when the gap is large:grep -E '^(MemFree|MemAvailable|Cached):' /proc/meminfo # The engine does this itself at every phase boundary (enterPhase -> releaseFileCache, no root needed). # By hand, for a process outside the engine: python3 -c "import os,sys; [os.posix_fadvise(os.open(os.path.join(d,f),os.O_RDONLY),0,0,os.POSIX_FADV_DONTNEED) for d,_,fs in os.walk(sys.argv[1]) for f in fs]" ~/modelsDo it after
cinefoundry mem freeand before the video phase above all: LTX-2.5 at native 1080p is the largest allocation of the film.