Skip to content

cache-ram: lower thresholds#14089

Merged
comfyanonymous merged 1 commit into
Comfy-Org:masterfrom
rattus128:prs/cache-thresholds
May 24, 2026
Merged

cache-ram: lower thresholds#14089
comfyanonymous merged 1 commit into
Comfy-Org:masterfrom
rattus128:prs/cache-thresholds

Conversation

@rattus128

@rattus128 rattus128 commented May 24, 2026

Copy link
Copy Markdown
Contributor

Use the RAM right up to the wire as the community is bit accustomed too.

This trades off headroom for the case where large chunky intermediates arrive and potentially hits pagefile/swap, but a lot of people have "it just fits" workflows out there, so strike a compromise with 75->90%.

Disable the inactive cache for all but the very high RAM users.

Regression Tests:

Windows RTX5060 32GB WAN 2.2 FP16 NVME gen4 ✅
Windows RTX5060 32GB WAN 2.2 FP8 NVME gen4 ✅
Linux RTX5090 64GB RAM WAN 2.2 FP8 ✅
Linux RTX5090 64GB RAM WAN 2.2 FP16 NVME gen1 ✅
Linux RTX5090 64GB RAM stable cascade -> flux2 ✅
Linux RTX5090 64GB RAM ace-step 1.5 turbo XL ✅

Use the RAM right up to the wire as the community is bit accustomed too.

This trades off headroom for the case where large chunky intermediates
arrive and potenitally hits pagefile/swap, but a lot of people have
"it just fits" workflows out there, so strike a compromise with
75->90%.

Disable the incative cache for all but the very high RAM users.
@rattus128 rattus128 marked this pull request as ready for review May 24, 2026 15:03
@coderabbitai

coderabbitai Bot commented May 24, 2026

Copy link
Copy Markdown

Review Change Stack

No actionable comments were generated in the recent review. 🎉

ℹ️ Recent review info
⚙️ Run configuration

Configuration used: Path: .coderabbit.yaml

Review profile: CHILL

Plan: Pro

Run ID: 1c993f3c-0df6-4b89-8384-66a17db6b215

📥 Commits

Reviewing files that changed from the base of the PR and between ea62dc1 and afb90f4.

📒 Files selected for processing (2)
  • comfy/cli_args.py
  • main.py

📝 Walkthrough

Walkthrough

This PR adjusts the default RAM cache sizing behavior in ComfyUI's prompt worker and documents the changes in the CLI help text. The active cache (cache_ram) now allocates 10% of total system RAM instead of 25%, with adjusted minimum and maximum bounds. The inactive cache (cache_ram_inactive) uses a new scaling formula based on total_ram divided by 1024, with an upper cap of 96GB and no minimum bound. The help text is updated to communicate these new thresholds to users.

🚥 Pre-merge checks | ✅ 4 | ❌ 1

❌ Failed checks (1 warning)

Check name Status Explanation Resolution
Docstring Coverage ⚠️ Warning Docstring coverage is 0.00% which is insufficient. The required threshold is 80.00%. Write docstrings for the functions missing them to satisfy the coverage threshold.
✅ Passed checks (4 passed)
Check name Status Explanation
Title check ✅ Passed The title 'cache-ram: lower thresholds' directly and concisely describes the main change: reducing RAM cache thresholds to use more available memory.
Description check ✅ Passed The description is directly related to the changeset, explaining the rationale for lowering thresholds (to match community workflows) and documenting regression tests performed.
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.

✏️ Tip: You can configure your own custom pre-merge checks in the settings.


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.

❤️ Share

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

@comfyanonymous comfyanonymous merged commit b30e980 into Comfy-Org:master May 24, 2026
14 checks passed
simonri pushed a commit to simonri/ComfyUI-flash-attention-3 that referenced this pull request May 26, 2026
Use the RAM right up to the wire as the community is bit accustomed too.

This trades off headroom for the case where large chunky intermediates
arrive and potenitally hits pagefile/swap, but a lot of people have
"it just fits" workflows out there, so strike a compromise with
75->90%.

Disable the incative cache for all but the very high RAM users.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

2 participants