HT Resolution Downsample
Standardize any image to a target long edge, aspect ratio intact
- image
- downsampled_image
A batch of images rarely arrives at one size. Some are 512px, some 2048px, some portrait and some landscape, and you need them all at a comparable resolution before a batch pass, a model, or a preview. HT Resolution Downsample is the node that does exactly one thing: pick the target length for the longest edge, and it scales the whole image so that edge hits that target while the other edge follows along - aspect ratio preserved, no cropping, no distortion.
What it does
Three required inputs:
image- your input (accepts batches).target_long_edge(default 1024, range 64–8192, stepped by 8) - the resolution you want the longer side to become. If the image is landscape 1920×1080 and you set 1024, the width becomes 1024 and the height scales to 576. Portrait images behave symmetrically.interpolation-nearest,bilinear,bicubic,area,lanczos.bicubicis the default and the right choice for most downsamples;lanczosfor the sharpest result;areais worth knowing for aggressive reductions since it averages well.
And the one that matters more than it looks: device - cuda or cpu, defaulting to cpu. This node is memory-aware (the source estimates memory requirements before running), and the default keeps big-batch downsamples off your VRAM so they don't compete with the sampler. Flip it to cuda for speed when you know you have headroom.
Output is a single downsampled_image. Aspect ratio is always preserved because the scale factor is computed from the current long edge to the target - that's the whole mechanism, grounded in the source's calculate_target_dimensions: find the long edge, scale both dimensions by the ratio, keep them proportional.
When you'd reach for it
- Batch standardization: make 50 differently-sized images uniform before a batch of comparisons, previews, or model input.
- Memory management: shrink very large images to a workable size before passing them on (e.g., before an upscaler that would otherwise explode VRAM).
- Multi-resolution workflows: the KB's upscaling essay covers why consistent intermediate sizes matter - a clean, correctly-sized base beats a stretched one every time.
The one thing it doesn't do is force divisibility - if a model needs multiples of 64, run the result through HT Smart Resize afterward. This node is about standardizing, not aligning.
Installing
Standard pack install:
cd ComfyUI/custom_nodes
git clone https://github.com/ArtHommage/HommageTools.git
cd HommageTools && pip install -r requirements.txt
restart, or Manager → "HommageTools for ComfyUI". No models, no extra dependencies.
The honest take
Simple, predictable, and exactly the kind of node that saves you from writing a resize into every batch workflow by hand. The main gotcha is the opposite of a bug: because it targets the long edge, an 8192px input and a 1024px input both land at your target, which is what you want for standardization but means you can't use it to upscale past the original - if the input's long edge is already below your target, nothing meaningful happens. For upscaling, that's a different node's job. And per the pack's alpha framing, keep the interpolation and device defaults in mind; the memory-aware CPU default is there for a reason.
Inputs (4)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| target_long_edge | INT | 102464–8192 | — |
| interpolation | COMBO | bicubic | 5 options: nearest, bilinear, bicubic, area, lanczos |
| device | COMBO | cpu | 2 options: cuda, cpu |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| downsampled_image | IMAGE | — |