mirror of
https://github.com/Comfy-Org/comfy-kitchen.git
synced 2026-11-04 23:37:42 +00:00
[GH-ISSUE #28] Is it okay to quantized dst based on src layout in handle_copy base.py ? #15
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#15
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?
Originally created by @komikndr on GitHub (Feb 2, 2026).
Original GitHub issue: https://github.com/Comfy-Org/comfy-kitchen/issues/28
Preamble: I want to add multiple ops to enable FSDP2 + the DCP API for Raylight (parallel stuff).
Commit:
github.com/komikndr/comfy-kitchen-distributed@d5538c62abMany new ops have been written in their own Layout classes, and I think they should not touch the core ComfyUI forward path, since most of them are c10d operators (e.g.,
broadcast,all_gather,wait_tensor). These will not be invoked unless someone uses the DTensor API, which as far as I know, is currently only used by Raylight.However, there is a rewrite in
handle_copyinbase.py. Although it already checks whether the QuantizedTensor shares the same layout, I added a new case: ifdstis not a QuantizedTensor (i.e., it is a native PyTorch tensor), it will be quantized to match the source type. This change is required since FSDPwait_for_unshardneed to alloc some output buffer implied by QuantizedTensor.dtypeWill this break anything down the line? My preliminary tests have not caught any errors yet.
Thanks for your time 👍