Mask Tensor I/O
Save and load ComfyUI MASK tensors as .pt files
Nodes (7)
Stop naming your bbox, mask and latent files after 00007
Feed a saved detection pass back in and skip the detector
Pull a saved H3 latent back in and redo only the decode
Get yesterday's mask back, in full float precision
Cache the detection pass before you re-render anything
Bank the sampler output so a 33B video render isn't a one-shot
Stop re-segmenting the same video every time you tweak a denoise
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.