mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-05 07:47:40 +00:00
[PR #29] [CLOSED] Adding c10d ops and additional aten ops for DTensor and FSDP2 #89
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#89
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/29
Author: @komikndr
Created: 2/6/2026
Status: ❌ Closed
Base:
main← Head:main📝 Commits (10+)
e0321f1c10d implementation for fp8f6b8fb7add additional ops require for shardingbc5d7ddaten ops alias, and broadcastd5538c6Add scater ops, and rework copy to quantized dst to src format1db1945Add new_zeros opda71067pre and post gather fsdp_hookc738713Change README and NOTICEbc2f646Remove monkey patching for fsdp pre/post_all_gather79ebc96NVFP4 Enable6bfe97bUpdate README for NVFP4📊 Changes
5 files changed (+828 additions, -30 deletions)
View changed files
📝
NOTICE(+3 -0)📝
README.md(+10 -0)📝
comfy_kitchen/tensor/base.py(+59 -4)📝
comfy_kitchen/tensor/fp8.py(+278 -5)📝
comfy_kitchen/tensor/nvfp4.py(+478 -21)📄 Description
Preliminary pull request adding FP8 operators to support Raylight custom nodes.
The c10d operators will not be touched during a normal Comfy run, sincen as far as I know only Raylight uses DTensor and its operators, which require an initialized distributed process group. Normal
ComfyUI/main.pyexecution does not initialize this.The operators being added:
c10d
all_gather_into_tensorbroadcast_wait_tensorscatter_aten
slicesplitnew_zerosas_stridedcataliasIn practice, for c10d only
all_gather_into_tensorandwait_tensorare currently required, sincewait_tensoris needed for the FSDP unshard path where an in-place copy cannot directly transfer aQuantizedTensorinto an unquantized tensor.To use this inside a model, the
nn.Modulecannot inherit from a "disable init weight" operator, since every sharded parameter must be properly accounted for.🔄 This issue represents a GitHub Pull Request. It cannot be merged through Gitea due to API limitations.