ops: opt out of deferred weight init if subclassed#12967
Conversation
If a subclass BYO _load_from_state_dict and doesnt call the super() the needed default init of these weights is missed and can lead to problems for uninitialized weights.
|
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 (1)
📝 WalkthroughWalkthroughThe PR modifies guard conditions in 🚥 Pre-merge checks | ✅ 2 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (2 passed)
✏️ Tip: You can configure your own custom pre-merge checks in the settings. 📝 Coding Plan
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. Comment Tip CodeRabbit can use OpenGrep to find security vulnerabilities and bugs across 17+ programming languages.OpenGrep is compatible with Semgrep configurations. Add an |
#12949
If a subclass BYO _load_from_state_dict and doesn't call the super() the needed default init of these weights is missed and can lead to problems for uninitialized or left over meta weights.
I never reproduced this issue. This is a theoretical defensive fix based on the backtrace.
Regression Tests:
Linux 5090 WAN2.2 Q8 GGUF ✅
Linux 5090 ZiT GGUF (+TE) ✅
Windows, 5060, WAN Q8 2.2 GGUF ✅ (no commit charge surge)