Add --enable-dynamic-vram options to force enable it.#13002
Add --enable-dynamic-vram options to force enable it.#13002comfyanonymous merged 1 commit intomasterfrom
Conversation
📝 WalkthroughWalkthroughThis PR introduces a new command-line flag 🚥 Pre-merge checks | ✅ 1 | ❌ 2❌ Failed checks (1 warning, 1 inconclusive)
✅ Passed checks (1 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 approve the review once all CodeRabbit's comments are resolved.Enable the |
There was a problem hiding this comment.
🧹 Nitpick comments (1)
comfy/cli_args.py (1)
151-152: Make dynamic VRAM enable/disable flags mutually exclusive.Line 152 adds the inverse of Line 151, but both flags can be provided together; current behavior silently prioritizes enable. Consider a mutual-exclusion group for clearer CLI semantics.
Proposed diff
-parser.add_argument("--disable-dynamic-vram", action="store_true", help="Disable dynamic VRAM and use estimate based model loading.") -parser.add_argument("--enable-dynamic-vram", action="store_true", help="Enable dynamic VRAM on systems where it's not enabled by default.") +dynamic_vram_group = parser.add_mutually_exclusive_group() +dynamic_vram_group.add_argument("--disable-dynamic-vram", action="store_true", help="Disable dynamic VRAM and use estimate based model loading.") +dynamic_vram_group.add_argument("--enable-dynamic-vram", action="store_true", help="Enable dynamic VRAM on systems where it's not enabled by default.")🤖 Prompt for AI Agents
Verify each finding against the current code and only fix it if needed. In `@comfy/cli_args.py` around lines 151 - 152, The two conflicting flags (--disable-dynamic-vram and --enable-dynamic-vram) should be placed into a mutually exclusive argparse group so they cannot be passed together; create a group via parser.add_mutually_exclusive_group() and add both parser.add_argument calls to that group (keeping action="store_true" and help text) to enforce exclusive selection and avoid silent precedence in the CLI handling.
🤖 Prompt for all review comments with AI agents
Verify each finding against the current code and only fix it if needed.
Nitpick comments:
In `@comfy/cli_args.py`:
- Around line 151-152: The two conflicting flags (--disable-dynamic-vram and
--enable-dynamic-vram) should be placed into a mutually exclusive argparse group
so they cannot be passed together; create a group via
parser.add_mutually_exclusive_group() and add both parser.add_argument calls to
that group (keeping action="store_true" and help text) to enforce exclusive
selection and avoid silent precedence in the CLI handling.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Path: .coderabbit.yaml
Review profile: CHILL
Plan: Pro
Run ID: ad10cd5b-96db-480f-9317-734ac8f2c134
📒 Files selected for processing (2)
comfy/cli_args.pymain.py
|
Using sage attention mode: auto Memory summary: |===========================================================================|
Got an OOM, unloading all loaded models. NVIDIA-SMI 570.124.06 After the update, it still resulted in an OOM (Out of Memory) error. I've already added |
No description provided.