Nodes/ComfyUI EasyUse Anima/Anima Image Scale By Multiple
ComfyUI Node

Anima Image Scale By Multiple

Resize that actually lands on 32-multiples

By n0va39·Created 3 months ago·Updated a day ago· 24
Anima Image Scale By Multiple
  • image
  • image
  • width
  • height
  • applied_scale
scale_by1.50
upscale_methodbicubic
multiple32
max_long_edge0

Any ComfyUI veteran has been burned by the off-by-a-few-pixels resize: you upscale 1.5x, get 1536x864, feed it to a node that demands 32-multiples, and it silently snaps or errors. Anima Image Scale By Multiple exists to kill that class of bug. It scales an image by the nearest valid ratio that preserves the source aspect ratio and lands both output dimensions on your chosen multiple - 8, 16, 32, or 64. For Anima and its optimization nodes, the answer is 32.

Why 32 matters

Anima is a DiT, and a lot of the optimization tooling around it - latent-friendly resizes, the pack's own Highres stage, Spectrum sampler paths - wants latent dimensions that divide cleanly. The pack's Highres defaults literally use this node's settings: scale 1.5x, multiple 32, max long edge 2560. So when you see "32-multiple" demanded by an Anima workflow, it's not superstition; it's the latent size staying sampler-safe. This node gives you that guarantee with a real ratio, not a dumb snap.

The inputs that matter

  • image - the image to upscale.
  • scale_by - the requested ratio (default 1.5). The node uses the nearest ratio that satisfies the multiple constraint, so the actual applied scale may differ slightly - that's what applied_scale reports.
  • multiple - 8, 16, 32, or 64. This is the one you set for Anima work: 32.
  • upscale_method - interpolation: nearest-exact, bilinear, area, bicubic (default), or lanczos. Bicubic is the safe default for latent-stage work; lanczos for pixel work where you want crispness.
  • max_long_edge - a cap on the output's long edge (0 disables it, default). Set it when you want, say, 1.5x but never above 2560 on the long side.

The outputs worth using

  • image - the scaled result.
  • width and height - the final valid dimensions. Wire these to latent-size inputs or a display node if you're building adaptive graphs.
  • applied_scale - the ratio actually applied. Because the nearest valid ratio can be 1.49 instead of your requested 1.5, this is how you know what really happened. If a workflow ever seems to ignore your scale_by, check this - it didn't ignore you, it just couldn't hit the multiple exactly.

How it fits

The canonical spot is between a decoded first pass and a second-stage sampler: upscale with this node, then use the width/height outputs (or its image) to drive the Highres pass at a guaranteed-valid size. It's also the right tool before any optimization node that asserts 32-multiple inputs - KJNodes-style attention patchers, tiled VAEs, that whole family.

Install and gotchas

Pack install:

cd ComfyUI/custom_nodes
git clone https://github.com/n0va39/ComfyUI-EasyUseAnima
cd ComfyUI-EasyUseAnima && pip install -r requirements.txt

Restart ComfyUI; Manager: "ComfyUI EasyUse Anima".

The gotcha is the trade between scale_by fidelity and the multiple constraint - the tighter your multiple (64), the further the applied ratio can drift from what you asked. If exact scale matters more than multiples, don't use this node; if multiples matter (they do for Anima), the drift is the point. And remember max_long_edge interacts: with both set, the node picks the nearest valid ratio that also respects the cap.

CategoryEasyUse Anima/Image

Inputs (5)

NameTypeDefaultDescription
imageIMAGEInput image to upscale.
scale_byFLOAT1.500.01–8Requested image scale ratio. The node uses the nearest valid ratio for the selected multiple.
upscale_methodCOMBObicubicInterpolation method used for resizing.
multipleCOMBO32Output width and height must be multiples of this value.
max_long_edgeINT00–16384Maximum output long edge. Set 0 to disable this limit.

Outputs (4)

NameTypeDescription
imageIMAGEScaled image using the nearest valid ratio.
widthINTFinal valid image width.
heightINTFinal valid image height.
applied_scaleFLOATActual scale ratio applied to the image.