Skip to content

Add an activity field to node progress and report model loading - #16202

Open
vqt123 wants to merge 2 commits into
masterfrom
node-progress-activity
Open

Add an activity field to node progress and report model loading#16202
vqt123 wants to merge 2 commits into
masterfrom
node-progress-activity

Conversation

@vqt123

@vqt123 vqt123 commented Sep 9, 2026

Copy link
Copy Markdown

A node that is loading weights looks the same as 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 to VRAM.

Adds an optional activity string 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.

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.
@coderabbitai

coderabbitai Bot commented Sep 10, 2026

Copy link
Copy Markdown

Review Change StackReview Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: ASSERTIVE

Plan: Advanced

Run ID: bb04c8af-c281-456a-a39d-ca5adad57cd6

📥 Commits

Reviewing files that changed from the base of the PR and between 2e8960e and e766252.

📒 Files selected for processing (1)
  • comfy/model_base.py

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)
  • GitHub Check: test (windows-latest)
🧰 Additional context used
📓 Path-based instructions (3)
Core ML/diffusion engine.

⚙️ CodeRabbit configuration file

Files:

  • comfy/model_base.py
IMPORTANT: Only comment on issues directly introduced by this PR's code changes.

⚙️ CodeRabbit configuration file

Files:

  • comfy/model_base.py
Documentation and README edits should be concise, factual, and tied to the changed behavior.

📄 CodeRabbit inference engine (AGENTS.md)

Files:

  • comfy/model_base.py
🔇 Additional comments (1)
comfy/model_base.py (1)

85-85: LGTM!

Also applies to: 370-371


📝 Walkthrough

Walkthrough

The change adds a global progress-activity context manager and hook. Model loading reports "loading" through this context. ProgressRegistry stores activity for running nodes and notifies enabled handlers when it changes. WebUI progress payloads include activity only when set. Main execution wiring connects the hook to the executing node. Unit tests cover storage, serialization, cleanup, exceptions, and missing hooks.

Merge Risk: ⚪ Minimal · up to e7662

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)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 25.00% which is insufficient. The required threshold is 80.00%. Docstring coverage is scoped to functions touched by this diff. Analyzed 20 functions across 6 files. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Linked Issues check ✅ Passed Check skipped because no linked issues were found for this pull request.
Out of Scope Changes check ✅ Passed Check skipped because no linked issues were found for this pull request.
Description check ✅ Passed The description clearly explains the new activity field, loading activity reporting, compatibility behavior, frontend support, and tests.
Title check ✅ Passed The title clearly and concisely summarizes the main changes: adding node activity reporting and reporting model loading.
  • Fix all pre-merge checks with AI

Comment @coderabbitai help to get the list of available commands.

coderabbitai[bot]
coderabbitai Bot previously approved these changes Sep 10, 2026
@vqt123
vqt123 force-pushed the node-progress-activity branch from 2e8960e to e766252 Compare September 10, 2026 17:19
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant