ComfyUI Extension
Mask Tensor I/O
Save and load ComfyUI MASK tensors as .pt files
swanjohn99/comfyUIcostumNodes
Nodes2
On cloudLocal install
Categorymask_io
Stars0
Updatedabout 12 hours ago
Nodes (2)
Readme
ComfyUI Mask Tensor I/O
Save and load ComfyUI MASK tensors as .cmask files (exact float values).
Nodes (category mask_io):
- Save Mask Tensor - write
MASKtooutput/masks/{prefix}_{#####}.cmask, pass-through - Load Mask Tensor - read a
.cmask(or legacy.pt) back asMASK[B,H,W] - download (both nodes) - opens a picker of
output/{subfolder}/*.cmask; download and/or delete selected files (survives ComfyUI restart)
Legacy .pt mask files still load, but ComfyUI may false-flag them as missing models. Re-save with Save Mask Tensor and switch the workflow to the new .cmask file.
Install
cd ComfyUI/custom_nodes
git clone <this-repo-url>
Restart ComfyUI. No pip install; uses Comfy's torch and folder_paths.
Comfy Registry / Manager
- Create a publisher + API key at https://registry.comfy.org (set
PublisherIdinpyproject.tomlif different fromswanjohn99). - Publish:
comfy node publish - Install from ComfyUI Manager, or search the registry.
Usage
- Wire
SAM3_TrackToMaskmasksinto Save Mask Tensor, then into your mask consumers. - Later: Load Mask Tensor instead of re-running SAM3.