Doom Image Resize
One resize node for megapixels, exact sizes, scale, or long/short side
- image
- image
- width
- height
- status
Doom Image Resize is the pack's universal image-resize node, and the word "universal" is doing real work: it covers five different ways to decide the target size and four different ways to fit into it, which between them handle almost every resize request you'll hit in a ComfyUI graph. If your current workflow is a knot of ImageScale, ImageScaleBy, and crop nodes with hand-computed constants, this is the node that collapses them.
Where it shines is pre-processing for the pack's own samplers: Flux models have resolution and divisibility requirements (step 8, and Flux.2's 16-channel VAE wants sane dimensions), and video models have stricter ones (MiniMax H3 / LTX want multiples of 32). Instead of doing that arithmetic in your head, you pick a target and a multiple_of and the node handles the rest.
How it works
The mode input picks how the target size is computed:
megapixels- scale so the image is N megapixels total (default 1.0). The "fit everything to ~1MP" workhorse for feeding batches to image models.width_height- exact targetwidth×height.scale_factor- multiply both dimensions by a factor (0.5 = half).long_side/short_side- fit the long (or short) edge totarget_side, keeping proportions. The classic "make everything 1024 on the long edge" mode.
Then resize_method decides how the image fits that box:
stretch- squash to the exact size, distorting aspect. The default; be deliberate about it.keep_proportion- fit inside the box, preserving aspect.fill_crop- scale to cover the box, then crop the overflow. Great for forcing a uniform aspect without distortion.pad_center- fit inside and letterbox with a fill color (pad_color_str, e.g.#000000orwhite).
Rounding is handled by multiple_of (0 = off) and interpolation (nearest/bilinear/bicubic/area/lanczos, default bicubic). Outputs: the resized image, the computed width and height ints (handy for wiring into a latent or a VAEEncode), and a status string describing what happened.
Installing it
cd ComfyUI/custom_nodes
git clone https://github.com/PeterMikhai/Doom_Flux_NodePack
Restart or ComfyUI Manager. No extra deps; current ComfyUI. The README's DoomAI_nodes.git clone line is stale - the live repo is Doom_Flux_NodePack.
Common issues
stretchas the default bites people. It's the firstresize_methodin the list and it destroys aspect ratios silently. If your images come out squished, you left it on stretch - switch tokeep_proportion,fill_crop, orpad_center.- Odd dimensions downstream. Set
multiple_ofto 8 for Flux, 32 for the video models; the pack'sDoomGetImageSizeNodeexists for the same divisibility discipline, and the samplers will silently fail or degrade on wrong sizes. - Megapixels mode upscales too. Targeting 1.0 MP will upscale small images to reach 1MP, not just downscale big ones. If you want only-downscale, use
long_side/short_sidewith a cap, or filter inputs upstream. pad_color_straccepts hex or names (#RRGGBB,black,white,grey…). A malformed color string falls back awkwardly; when in doubt, use hex.
It's a "why isn't this in core ComfyUI" kind of node: five sizing modes, four fitting methods, divisibility, and a status readout, all in one green box.
Inputs (11)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | Входное изображение | |
| mode | COMBO | megapixels | Способ расчёта размера |
| megapixels | FLOAT | 1.000.01–100 | Целевые мегапиксели (mode=megapixels) |
| width | INT | 10240–16384 | Целевая ширина (mode=width_height) |
| height | INT | 10240–16384 | Целевая высота (mode=width_height) |
| scale_factor | FLOAT | 1.000.01–10 | Множитель размера (mode=scale_factor) |
| target_side | INT | 10240–16384 | Целевая сторона (mode=long_side / short_side) |
| resize_method | COMBO | stretch | stretch — растянуть; keep_proportion — вписать; fill_crop — заполнить и обрезать; pad_center — вписать с заливкой |
| interpolation | COMBO | bicubic | Метод интерполяции (lanczos → bicubic) |
| multiple_of | INT | 00–512 | Кратность сторон (0 — без ограничения) |
| pad_color_str | STRING | #000000 | Цвет заливки при pad_center: '#RRGGBB' или имя (black/white/grey/...) |
Outputs (4)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | Изображение после ресайза |
| width | INT | Итоговая ширина |
| height | INT | Итоговая высота |
| status | STRING | Сводка операции |