Skip to content

offload to mmap - #13

Merged
sfiisf merged 50 commits into
masterfrom
refine_offload
Aug 26, 2026
Merged

offload to mmap#13
sfiisf merged 50 commits into
masterfrom
refine_offload

Conversation

@strint

@strint strint commented Jan 9, 2026

Copy link
Copy Markdown
Collaborator

启动 comfyui 的命令要加上环境变量 MMAP_MEM_THRESHOLD_GB=5,含义是若 cpu mem 小于 5G 时,遇到 offload 会 offload 到 mmap,避免爆 cpu 内存

sfiisf and others added 4 commits January 12, 2026 17:06
Refine model_unload behavior to improve robustness and offload precision.

- Normalize memory_to_free before logging to avoid None / invalid arithmetic
- Make partially_unload more precise by capping memory_to_free to loaded size
- Ensure full unload cases are handled correctly after partial unload
@sfiisf sfiisf mentioned this pull request Apr 24, 2026
8 tasks
sfiisf and others added 5 commits July 24, 2026 13:53
- support GDS offload to mmap
- support  QuantizedTensor offload to mmap
- refine mmap offload safety

---------

Co-authored-by: ccndcn <2301835860@qq.com>
Co-authored-by: FengWen <109639975+ccssu@users.noreply.github.com>
@sfiisf
sfiisf merged commit 00fdbaa into master Aug 26, 2026
16 of 19 checks passed
@github-actions github-actions Bot locked and limited conversation to collaborators Aug 26, 2026
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants