Add an activity field to node progress and report model loading - #16202
Add an activity field to node progress and report model loading#16202vqt123 wants to merge 2 commits into
Conversation
A node that is loading weights looks identical to one that is computing: progress_state carries only state/value/max, and load_models_gpu runs inside the sampler, so the UI shows the sampler sitting at 0% while weights move. Adds an optional activity field to the node progress state, reported through a hook like the existing progress bar hook, and sets it to "loading" around the VRAM load. The field is absent unless something sets it, so existing clients are unaffected.
|
No actionable comments were generated in the recent review. 🎉 ℹ️ Recent review info⚙️ Run configurationConfiguration used: Path: .coderabbit.yaml Review profile: ASSERTIVE Plan: Advanced Run ID: 📒 Files selected for processing (1)
Included review availability: Your plan provides up to 10 included reviews per hour; 7 remain after this review. 📜 Recent review details⏰ Context from checks skipped due to timeout. (1)
🧰 Additional context used📓 Path-based instructions (3)Core ML/diffusion engine.⚙️ CodeRabbit configuration file Files:
IMPORTANT: Only comment on issues directly introduced by this PR's code changes.⚙️ CodeRabbit configuration file Files:
Documentation and README edits should be concise, factual, and tied to the changed behavior.📄 CodeRabbit inference engine (AGENTS.md) Files:
🔇 Additional comments (1)
📝 WalkthroughWalkthroughThe change adds a global progress-activity context manager and hook. Model loading reports Merge Risk: ⚪ Minimal · up to This adds optional model-loading status to progress updates without changing existing loading behavior or client payloads when no activity is set. No actionable merge-blocking risk remains. 🚥 Pre-merge checks | ✅ 4 | ❌ 1❌ Failed checks (1 warning)
✅ Passed checks (4 passed)
Comment |
2e8960e to
e766252
Compare
A node that is loading weights looks the same as one that is computing.
progress_statecarries onlystate/value/max, andload_models_gpuruns inside the sampler, so the UI shows the sampler sitting at 0% while weights move to VRAM.Adds an optional
activitystring to the node progress state, reported through a global hook in the same shape as the existing progress bar hook, and sets it to"loading"around the VRAM load and around diffusion-model weight assignment. The field is left out of the websocket payload unless something sets it, so existing clients see no change.Reader: Comfy-Org/ComfyUI_frontend#17367 shows the value as a badge on the node header (merges first; harmless without this producer).
Tests:
tests-unit/execution_test/progress_activity_test.py.