Nodes/ComfyUI-FaceChain/FC CropBottom
ComfyUI Node

FC CropBottom

FC CropBottom — the boring, dependable resize-and-trim utility

By THtianhao·Created 3 years ago·Updated about a year ago· 147
FC CropBottom
  • source_image
  • IMAGE
width512

FC CropBottom is the least glamorous node in ComfyUI-FaceChain and one of the most reliable. It's a straight resize-and-crop utility: it scales your image down to a target width and trims the bottom so the result has the dimensions ComfyUI's SD 1.5 pipeline wants. No models, no AI, no first-run downloads. Just numpy and PIL.

You'll reach for it because the rest of this pack - and a lot of the FaceChain workflow - was tuned around images that are 512 wide (or 1152-ish for higher-res passes), with heights clipped to multiples of 32. Feed it a random portrait from your camera roll and it normalizes it into something the downstream nodes and the sampler are comfortable with.

How it works

Two inputs: source_image (IMAGE) and width (INT, default 512, 0–2048). One IMAGE output.

The math is simple and worth knowing because it explains the weird constants:

  • If width is 512, the target height is 768; otherwise it's 1152.
  • The image is resized so its width matches your width and its height scales proportionally.
  • The height is then snapped down to a multiple of 32 (new_h // 32 * 32), capped at that target height.
  • The bottom of the image is cropped off to reach it.

So "crop bottom" is literal: whatever doesn't fit after the height is snapped to a 32-multiple gets chopped from the bottom of the frame. If your composition has important stuff near the feet, it's gone.

When you'd use it

  • Normalizing arbitrary input photos before they hit FC FaceDetectCrop or the inpainting pipeline.
  • Prepping a source image to 512×768 so it matches the pack's expected working resolution.
  • Forcing an oversized render down before a memory-hungry step - 512×768 is very friendly to mid-range GPUs.

It's a facechain/crop category node, part of the pack's standard install: ComfyUI Manager (search "ComfyUI-FaceChain") or clone into custom_nodes/ and restart. The pack's heavy startup dependency install still applies to the pack as a whole, but this node itself has no dependency beyond what ComfyUI already ships - which is refreshing in a pack whose other nodes drag in mmcv, onnxruntime, and a ModelScope account's worth of downloads.

One honest caveat: don't expect this to preserve aspect ratio in any clever sense. It crops, it doesn't pad. If preserving the full frame matters, resize manually first and pick a width whose math keeps the region you care about above the cut line.

Categoryfacechain/crop

Inputs (2)

NameTypeDefaultDescription
source_imageIMAGE
widthINT5120–2048

Outputs (1)

NameTypeDescription
IMAGEIMAGE