ImageSize(FaceParsing)
Read an image's width and height as numbers
- image
- width
- height
About as simple as ComfyUI nodes get: feed it an image, get back its width and height as two plain integers. No processing, no side effects - it just reads the numbers off the tensor. If you've used any of the several other custom node packs that ship an "ImageSize"-style utility, this one behaves exactly the way you'd expect.
Why a face-parsing pack ships this at all
On its own this node has nothing to do with face parsing specifically - it's a general-purpose utility that happens to live in this pack's node category rather than a standalone "utils" pack. It earns its place here because so much of this pack's own machinery is bbox- and coordinate-driven: cropping to a detected face, resizing an image to match a bounding box, inserting a small mask back into a full-size canvas. Any of those steps can end up needing "what are this image's actual dimensions" as a plain number to feed into arithmetic elsewhere in your graph - say, working out padding relative to the image size rather than a fixed pixel count, or sanity-checking that a crop and the canvas you're about to insert it into actually agree on scale.
Practically, you'll reach for this less often than the pack's other nodes, since most of the bbox/crop machinery here (ImageResizeWithBBox, MaskInsertWithBBox) already knows the dimensions it needs internally and doesn't require you to extract them by hand. It's there for the cases that fall outside that - custom math nodes, conditional logic based on image size, or just debugging a graph where you want to confirm an image is the resolution you think it is without opening a preview.
Inputs and outputs
image- the image you want dimensions for. That's the whole input list.
Two outputs: width and height, both INT. Wire them into anything expecting a plain number - a Primitive node for later reuse, arithmetic nodes computing a padding value relative to image size, or a conditional gate that behaves differently for portrait versus landscape input.
Installing the pack
Through ComfyUI Manager: search comfyui_face_parsing, install, restart. Or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/Ryuukeisyou/comfyui_face_parsing.git
Restart ComfyUI. This particular node needs no model weights - it's reading tensor shape, nothing more - but if your graph also uses the pack's actual face-parsing nodes, expect a one-time download of the segmentation model into models/face_parsing/ and a YOLOv8 face detector into models/ultralytics/bbox, both pulled from HuggingFace on first use (jonathandinu/face-parsing and Bingsu/adetailer). The README lists manual download links for both if that connection isn't reliable where you're running ComfyUI.
Where this could bite, honestly
There isn't much to go wrong with a node this simple, and there's no README-documented or community-reported failure mode specific to it worth inventing one for. The one thing worth knowing: if you've got a batch of images going through this node rather than a single image, make sure you understand which one in the batch it's reporting on before you build logic around the result - a batch of differently-sized images (unusual, but possible depending on how you assembled it) can make "the width" an ambiguous question. For the overwhelmingly common case of a single image or a uniform batch, this node just works.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| width | INT | — |
| height | INT | — |