Nodes/Comfyui_LG_Tools/图像尺寸调整
ComfyUI Node

图像尺寸调整

The interactive resize node

By LAOGOU-666·Created 2 years ago·Updated 7 months ago· 369
图像尺寸调整
  • image
  • IMAGE

Resizing an image in ComfyUI is normally a numbers game: pick an ImageScale node, type a width, hope it looks right. ImageSizeAdjustment (图像尺寸调整) takes the other approach. It shows your image live inside the node, you drag the handles to the size you actually want, and the resized image comes out the other side. What you see really is what you get, which is more than most resizer nodes can claim.

It's the sibling of ImageCropper in LAOGOU-666's Comfyui_LG_Tools pack, and it runs on the same "pause the graph, wait for the user" pattern. Its job in a real workflow is usually as a hand-tuning step - before an img2img pass, when you want a specific composition, or when a generated image needs to sit at a particular aspect ratio for the next node to accept it.

How it works

When the node runs, it base64-encodes the first frame of your image and ships it to the frontend, then blocks on an internal event with a 15-second timeout. You drag the resize handles on the node's preview, and the frontend posts the adjusted image back to /image_preview/apply. The node converts it back to a tensor and returns it.

That 15-second budget is the thing to remember - it's half the crop node's 30 seconds. If you don't confirm in time, the node gives up and returns the original image, sized 1:1. This is an interactive node through and through: run it headless or from an API queue and it's just a very slow pass-through.

The inputs that matter

  • image (IMAGE) - your input. Only the first frame gets previewed and adjusted, so feed it a single image (or be prepared to resize a batch frame by frame).

That's the only required input, and the output is a single IMAGE - the resized result - ready to feed straight into a latent encoder or sampler. Note the node is marked as an output node (OUTPUT_NODE = True), so ComfyUI will run it even if nothing is connected downstream.

Installing it

You get it with the whole pack, not on its own:

cd ComfyUI/custom_nodes
git clone https://github.com/LAOGOU-666/Comfyui_LG_Tools.git
pip install -r requirements.txt

Or via ComfyUI Manager - search "Comfyui_LG_Tools". After a restart it lives under Add Node → 🎈LAOGOU → Image as 图像尺寸调整. The pack's requirements (opencv-contrib-python, transparent-background) install along with it even though you only wanted the resizer.

Common issues

  • "It didn't resize anything." You almost certainly hit the 15-second timeout, or you're running it from an API call where there's no frontend to respond. Interact within the window and it works.
  • Batch inputs get dropped. Like the crop node, only image[0] is shown. Feed it single images.
  • Chinese-only UI. The whole pack is Chinese-first; the display name is 图像尺寸调整, and there's no English label. It's a drag-and-resize node - you can find it by memory even without reading a word.

It's not a node for batch pipelines, and it doesn't pretend to be. For the one-off "I need this exact size and I want to see it happen" moment, it's faster than typing dimensions into a text field and rerunning until it's right.

Category🎈LAOGOU/Image

Inputs (1)

NameTypeDefaultDescription
imageIMAGE

Outputs (1)

NameTypeDescription
IMAGEIMAGE