Handle psutil.virtual_memory failures on macOS#14716
Conversation
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Pro Plus Run ID: 📒 Files selected for processing (1)
📜 Recent review details🧰 Additional context used📓 Path-based instructions (3)**/*.py📄 CodeRabbit inference engine (AGENTS.md)
Files:
**⚙️ CodeRabbit configuration file
Files:
⚙️ CodeRabbit configuration file
Files:
comfy/**⚙️ CodeRabbit configuration file
Files:
🧠 Learnings (2)📚 Learning: 2026-02-21T14:01:41.482ZApplied to files:
📚 Learning: 2026-05-13T12:31:45.069ZApplied to files:
🔇 Additional comments (3)
📝 WalkthroughWalkthroughChangesA new Related Issues: None specified. Related PRs: None specified. Suggested labels: memory-management, refactor Suggested reviewers: None specified Poem: A fallback woke on memory’s shore, 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
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 |
|
I pushed the docstring fix. The required workflows are awaiting maintainer approval. |
Summary
This PR prevents ComfyUI from crashing when
psutil.virtual_memory()raises aRuntimeError.On macOS 27 beta 2,
psutil.virtual_memory()can fail with:This was reported in #14498.
The crash happens during prompt execution when ComfyUI checks available system memory. This PR wraps ComfyUI's psutil.virtual_memory() usage and falls back to safe/default memory values when that call fails, allowing execution to continue instead of crashing the prompt worker thread.
Fixes #14498
Changes
Testing