ImageResizeTarget PM
The Exact-Size Resizer That Keeps Every Other Portrait Node Happy
- image
- IMAGE
Let's be honest about what this node is: PM_ImageResizeTarget is the boring one. It resizes an image to an exact width and height you type in, it's done, no model involved. It's also the node you'll quietly need in almost every Portrait-Maker workflow, because the rest of the pack is fussy about dimensions. EasyPhoto's face matting, the makeup GAN, the merge nodes - they all want images that line up, and nothing in ComfyUI does "shove this into exactly 512x512, no questions asked" more plainly.
What it actually does
It takes your image and resamples it to the target width and height using LANCZOS, which is the good high-quality resampling filter. That's the whole mechanism - a resize call under the hood. The source isn't doing anything clever like padding or cropping, and there's no AI upscaling here. If you ask it to stretch a 1024x1024 image to 512x768, it will happily squish the pixels and distort the proportions.
That's the one thing to keep in your head. This node does not preserve aspect ratio. If you want the shorter side to hit a size while keeping proportions, reach for its sibling PM_ImageScaleShort instead. ImageResizeTarget is for when you know the exact dimensions you need - like matching a face crop to a mask, or pre-sizing two images so a merge node doesn't error on mismatched shapes.
The inputs that matter
The schema is about as minimal as it gets:
- image - any IMAGE tensor.
- width - target width, 0–2048, default 512.
- height - target height, 0–2048, default 512.
One IMAGE comes out. That's it. The default of 512x512 is a sensible resting spot for this pack because a lot of the EasyPhoto-derived steps expect working around that resolution.
Where beginners get burned: they feed an already-small image in and ask for 2048x2048 expecting detail magically. LANCZOS upscaling is smooth, but it can't invent texture - if you want real detail, this pack's PM_PortraitEnhancement nodes are the ones doing neural upscaling. Use this node to format, not to enhance.
Installing the pack
You're installing the whole Portrait-Maker pack, since this node ships inside it. Either ComfyUI Manager (search "Portrait-Maker" under custom nodes) or the manual route:
cd ComfyUI/custom_nodes
git clone https://github.com/THtianhao/ComfyUI-Portrait-Maker.git
Then restart ComfyUI. Fair warning from the README: the first start downloads a pile of models (face detection, face skin, makeup, inswapper, controlnets, a VAE…) and installs heavy dependencies like tensorflow, insightface, and modelscope. On Windows, Python 3.11 gets a bundled insightface wheel, and there are known unresolved Windows + modelscope issues the author is chasing down. None of that matters for this node specifically - ImageResizeTarget is pure PIL - but the pack downloads everything at startup regardless, so the first launch is slow and wants a stable connection. Don't interrupt the download; it has no hash verification, and a half-downloaded file means deleting it and starting over.
One last thing
Every node in this pack is filed under the category protrait/... - that's a typo in the pack ("portrait"), not you doing something wrong. Just search the node title.
This is the node you'll reach for when another node complains about image sizes. It doesn't deserve a fan club, but it's exactly the kind of dumb utility that keeps a workflow from falling apart.
Inputs (3)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| width | INT | 5120–2048 | — |
| height | INT | 5120–2048 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |