ComfyUI Node

VNCCS Character Sheet Cropper

Split a sprite sheet back into individual sprites

By AHEKOT·Created 11 months ago·Updated 24 days ago· 1,446
VNCCS Character Sheet Cropper
  • image
  • mask
  • cropped_images
  • cropped_masks
min_size64

VNCCS's generator nodes often produce a batch of sprites and masks together as one grouped result - convenient for the generation step, less convenient the moment you actually need each sprite as its own separate image. Character Sheet Cropper is the utility that does the un-grouping: give it an image and a mask, and it crops out every distinct region into its own image, discarding anything too small to be a real sprite.

What it does

Mechanically it's straightforward: it reads the mask, finds the separate connected regions in it, crops the source image to each one, and returns the set as a list - along with a matching list of the individual cropped masks. The one setting you control is a size floor, so stray noise pixels or tiny mask fragments don't come back as junk "sprite" entries in your output.

Inputs and outputs that matter

  • image (IMAGE) and mask (MASK) - the sheet and its region mask. These typically come straight from a generator node's output, or from Sprite Manager if you're reprocessing something already saved.
  • min_size (INT, default 64, range 11024) - the only real knob on this node. Regions smaller than this (in pixels) get dropped rather than returned as a cropped result. Raise it if you're getting spurious tiny crops from noisy masks; lower it if you're intentionally working with small sprite elements and losing ones you actually wanted.
  • Outputs: cropped_images (IMAGE, list) and cropped_masks (MASK, list) - one entry per detected region, in matching order.

That's the entire schema - no sorting options, no padding around the crop, no resize. It's a focused "detect and crop" step, not a full sprite-sheet toolkit.

Installing it

Comes with the base pack. ComfyUI Manager: search "VNCCS - Visual Novel Character Creation Suite", install latest, restart. Manual: cd ComfyUI/custom_nodes && git clone https://github.com/AHEKOT/ComfyUI_VNCCS.git, restart. No model downloads needed - this is a pure image-processing utility, useful even outside a full VNCCS pipeline if you already have a masked composite image from somewhere else.

Common issues & troubleshooting

Getting way more crops than expected, mostly tiny junk. Raise min_size. A mask with any noise or antialiasing artifacts along its edges can register as extra small regions - 64 is a reasonable starting point, but a noisy source mask may need it pushed higher.

Losing a sprite that should have been detected. If a legitimate sprite is smaller than the current min_size threshold - a small accessory or a distant/small pose - lower the threshold. Also worth checking that the mask actually covers that region distinctly rather than being merged with a neighbouring one; if two sprites' mask regions touch or overlap, this node will crop them together as one region rather than splitting them.

Crops come out oddly framed or clipped at the edges. The crop bounds follow the mask's bounding box exactly with no padding added - if you need breathing room around each sprite, pad the result afterward with a separate resize/pad node rather than expecting this one to add margin automatically.

CategoryVNCCS/Util

Inputs (3)

NameTypeDefaultDescription
imageIMAGE
maskMASK
min_sizeINT641–1024

Outputs (2)

NameTypeDescription
cropped_imagesIMAGE
cropped_masksMASK