mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[PR #268] Add closest_hit_on_mesh CUDA op #272
Labels
No labels
pull-request
No milestone
No project
No assignees
1 participant
Notifications
Due date
No due date set.
Dependencies
No dependencies set.
Reference
Comfy-Org/comfy-kitchen#272
Loading…
Add table
Add a link
Reference in a new issue
No description provided.
Delete branch "%!s()"
Deleting a branch is permanent. Although the deleted branch may continue to exist for a short time before it actually gets removed, it CANNOT be undone in most cases. Continue?
📋 Pull Request Information
Original PR: https://github.com/Comfy-Org/comfy-kitchen/pull/268
Author: @kijai
Created: 10/22/2026
Status: 🔄 Open
Base:
main← Head:ray-cast📝 Commits (2)
2578373Add closest_hit_on_mesh CUDA opdf85a70Drop unused ray test variable📊 Changes
6 files changed (+343 additions, -4 deletions)
View changed files
📝
README.md(+1 -0)📝
comfy_kitchen/__init__.py(+18 -1)📝
comfy_kitchen/backends/cuda/__init__.py(+28 -0)📝
comfy_kitchen/backends/cuda/dlpack_bindings.cpp(+15 -0)📝
comfy_kitchen/backends/cuda/ops/mesh_bvh.cu(+118 -3)📝
tests/test_mesh_bvh.py(+163 -0)📄 Description
Nearest ray hit on a mesh_bvh, used for ray casting. Major speedups for any rendering nodes.
Performance
ComfyUI mesh nodes on an RTX 5090, Pixal3D jester mesh (0.70M triangles), pure-torch BVH vs comfy-kitchen.
End-to-end node timings, the kitchen side also builds its BVH with
mesh_bvh.The bake gains least because ray casting is only its depth pass. Kernel alone: 8M rays against 0.70M triangles in 4.6 ms.
🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.