fix: Proper memory estimation for frame interpolation (CORE-150)#13698
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: CHILL Plan: Pro Run ID: 📒 Files selected for processing (3)
📝 WalkthroughWalkthroughThe PR adds memory-usage estimation methods to two frame interpolation models (FILMNet and IFNet). It updates the frame interpolation node to use CoreModelPatcher instead of ModelPatcher for model loading. The GPU memory-handling logic is refactored to query the model's memory requirements via the new method instead of using a fixed formula, and then passes this value to load_models_gpu. The computation order of image alignment and dimensions is adjusted to occur after GPU loading. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Review rate limit: 7/8 reviews remaining, refill in 7 minutes and 30 seconds.Comment |
|
I think this can be merged by anyone at anytime, if everything's seems fine 👌 |
Should fix #13583
load_model_gpu + separate free_memory could evict the just-loaded interp model back to CPU, causing a CUDA/CPU mismatch on forward. Replaced with a single load_models_gpu(memory_required=...) call (matches some existing patterns such as VAEs), profiled memory_used_forward on IFNet/FILMNet replacing the under-reserved 20× heuristic, and switched loader to CoreModelPatcher.