[PR #3] [MERGED] Implement Cuda based hooking #54

Closed
opened 2026-10-26 22:24:10 +00:00 by bsakaguchi · 0 comments
Owner

📋 Pull Request Information

Original PR: https://github.com/Comfy-Org/comfy-aimdo/pull/3
Author: @rattus128
Created: 2/21/2026
Status: ✅ Merged
Merged: 2/21/2026
Merged by: @rattus128

Base: master ← Head: dev/detours


📝 Commits (7)

  • d9f3558 restructure sources
  • 85f8f27 control: don't create null ctypes signatures
  • 319b37a add more comprehensive logging infrastructure
  • edfd63b implement cudaMalloc/cudaFree intercepts
  • 54c7a8f model-vbar:minimize syncrhonize on vram_free
  • 019699c torch: put deprecation notice on PluggableAllocator
  • 6544980 async shared spill

📊 Changes

12 files changed (+335 additions, -67 deletions)

View changed files

📝 .github/workflows/build-wheels.yml (+13 -6)
📝 build-linux-docker (+1 -1)
📝 comfy_aimdo/control.py (+17 -45)
📝 comfy_aimdo/model_vbar.py (+0 -3)
📝 comfy_aimdo/torch.py (+9 -0)
➕ src-win/cuda-detour.c (+81 -0)
📝 src-win/shmem-detect.c (+2 -2)
📝 src/control.c (+14 -0)
📝 src/model-vbar.c (+6 -5)
📝 src/plat.h (+46 -5)
➕ src/pyt-cu-plug-alloc-async.c (+99 -0)
📝 src/pyt-cu-plug-alloc.c (+47 -0)

📄 Description

Contribution Agreement

  • [ X ] I agree that my contributions are licensed under the GPLv3.
  • [ X ] I grant Comfy Org the rights to relicense these contributions as outlined in CONTRIBUTING.md.

Comfy-aimdo 0.2.0 content.

See https://github.com/Comfy-Org/ComfyUI/pull/12557 for details.


🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.

## 📋 Pull Request Information **Original PR:** https://github.com/Comfy-Org/comfy-aimdo/pull/3 **Author:** [@rattus128](https://github.com/rattus128) **Created:** 2/21/2026 **Status:** ✅ Merged **Merged:** 2/21/2026 **Merged by:** [@rattus128](https://github.com/rattus128) **Base:** `master` ← **Head:** `dev/detours` --- ### 📝 Commits (7) - [`d9f3558`](https://github.com/Comfy-Org/comfy-aimdo/commit/d9f355822c345100b5f6cfbf046f346dc2f37d31) restructure sources - [`85f8f27`](https://github.com/Comfy-Org/comfy-aimdo/commit/85f8f272ccb5f187040546af725a78b347690c7b) control: don't create null ctypes signatures - [`319b37a`](https://github.com/Comfy-Org/comfy-aimdo/commit/319b37ae65ae9ce6e1a112f1ae8003955a82133a) add more comprehensive logging infrastructure - [`edfd63b`](https://github.com/Comfy-Org/comfy-aimdo/commit/edfd63b8254c2e4a80df9ed044aaca0c40418711) implement cudaMalloc/cudaFree intercepts - [`54c7a8f`](https://github.com/Comfy-Org/comfy-aimdo/commit/54c7a8fb500cc28a7c5cfa95860499fa60bd7cea) model-vbar:minimize syncrhonize on vram_free - [`019699c`](https://github.com/Comfy-Org/comfy-aimdo/commit/019699c0dc0cf042d07df274dfb9edc1a8973ead) torch: put deprecation notice on PluggableAllocator - [`6544980`](https://github.com/Comfy-Org/comfy-aimdo/commit/65449804d37e87e4fa537492e072774474a2384e) async shared spill ### 📊 Changes **12 files changed** (+335 additions, -67 deletions) <details> <summary>View changed files</summary> 📝 `.github/workflows/build-wheels.yml` (+13 -6) 📝 `build-linux-docker` (+1 -1) 📝 `comfy_aimdo/control.py` (+17 -45) 📝 `comfy_aimdo/model_vbar.py` (+0 -3) 📝 `comfy_aimdo/torch.py` (+9 -0) ➕ `src-win/cuda-detour.c` (+81 -0) 📝 `src-win/shmem-detect.c` (+2 -2) 📝 `src/control.c` (+14 -0) 📝 `src/model-vbar.c` (+6 -5) 📝 `src/plat.h` (+46 -5) ➕ `src/pyt-cu-plug-alloc-async.c` (+99 -0) 📝 `src/pyt-cu-plug-alloc.c` (+47 -0) </details> ### 📄 Description ### Contribution Agreement - [ X ] I agree that my contributions are licensed under the GPLv3. - [ X ] I grant **Comfy Org** the rights to relicense these contributions as outlined in [CONTRIBUTING.md](./CONTRIBUTING.md). Comfy-aimdo 0.2.0 content. See https://github.com/Comfy-Org/ComfyUI/pull/12557 for details. --- <sub>🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.</sub>
bsakaguchi 2026-10-26 22:24:10 +00:00
Sign in to join this conversation.
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
The due date is invalid or out of range. Please use the format "yyyy-mm-dd".

No due date set.

Dependencies

No dependencies set.

Reference
Comfy-Org/comfy-aimdo#54
No description provided.