cuda_graph_instance is a cudaGraphExec_t from cudaGraphInstantiate()
and must be released with cudaGraphExecDestroy(), not cudaGraphDestroy().
The handle-type mismatch corrupted the CUDA context on CUDA 13, causing
a silent process death after the node finished (keep_model_loaded=False)
or cudaErrorInvalidValue on the next run (keep_model_loaded=True).
Ported and adapted from Fannovel16/ComfyUI-Frame-Interpolation:
- gc.collect() after soft_empty_cache() to reduce RAM fragmentation
- Explicit float32 cast in postprocess_frames for fp16 engine safety
- InterpolationStateList class + MakeInterpolationStateList node to
skip/keep specific frame pairs during interpolation
- Per-pair multiplier schedule (comma-separated list) overriding uniform
multiplier, with automatic padding to match the number of pairs
- Automatic tiling with cosine feathering when frame dimensions exceed
the TensorRT engine optimization profile (fixes 1440x2560 with max=1920)
- Padding with replicate mode when frame dimensions are below profile min
- get_input_profile_bounds() on Engine to retrieve min/opt/max shapes
- Batch inference: process multiple (pair, timestep) tasks per GPU call
with dynamic batch axis in ONNX export and engine profile
- Backward compatible: all new features are opt-in via optional inputs
Generated with [Devin](https://devin.ai)
Co-Authored-By: Devin <158243242+devin-ai-integration[bot]@users.noreply.github.com>