ComfyUI Node

SVDRsizer

SVDRsizer snaps your source image to the 64 rule

By ShmuelRonen·Created 3 years ago·Updated about a year ago· 3
SVDRsizer
  • image
  • IMAGE
  • width
  • height
width576
height1024
interpolation
keep_proportionfalse

SVDRsizer is the one-line fix for a fiddly bit of the Stable Video Diffusion workflow: getting your source image to a size SVD will actually behave at. SVD (the November 2023 Stability release, Andreas Blattmann's video follow-up to latent diffusion) was trained at 1024x576, and it's pickier than your average SD model about what you feed it. ComfyUI's built-in SVD image-to-video workflow will happily accept whatever you drop in, and you'll get warped, jumpy, or just weird output for your trouble. This node resizes your image to a valid SVD size - and hands back the exact width and height it used, so the rest of your graph can't drift out of sync.

The mechanism is the whole point. 576 and 1024 share a greatest common divisor of 64, and SVD was trained on resolutions that are multiples of 64 within that band. The author's framing, straight from the README: SVD is "lenient" with resizes that stick to the rule, so you get coherent non-native videos instead of a coin flip. The node just takes your image, interpolates it to whatever 64-multiple size you asked for, and returns it - plus the actual resulting dimensions as INT outputs. Those two outputs are the clever bit: wire them into SVD_img2vid_Conditioning's width/height and the model conditions at the real size instead of assuming 1024x576.

The inputs that matter

There are only five, and four are obvious:

  • width / height - INT sliders, 576–1024, stepped in 64. The README's advice is the good advice: keep 1024 locked on one axis and play with the other. That keeps you in the trained sweet spot instead of inventing aspect ratios SVD never saw.
  • interpolation - nearest, bilinear, bicubic, area, nearest-exact, lanczos. Here's where people get burned: the default is nearest, which is the worst choice for rescaling a photo - it crunches edges into aliased staircases. For downscaling to 576x1024, area is the right call; bicubic or lanczos if you're going up. Change it once and forget it.
  • keep_proportion - BOOLEAN, default off. When on, it scales the image to fit inside your width×height box, preserving aspect ratio. Nice idea, but note the gotcha below.

Outputs: IMAGE (the resized image, feeds the SVD encode path), plus width and height INTs carrying the actual output dimensions for the conditioning node.

Installing it

Standard one-custom-node install, and it's light - pure ComfyUI-core dependencies (torch, torchvision, comfy.utils), no model downloads, no pyproject dependencies beyond ComfyUI itself.

cd ComfyUI/custom_nodes
git clone https://github.com/ShmuelRonen/ComfyUI-SVDResizer

Then restart ComfyUI. Or skip the terminal entirely: open ComfyUI Manager → Install Custom Nodes, search "SVDResizer", and hit install. The node lives under the "essentials" category.

Troubleshooting

  • Crunchy, aliased output. Almost certainly the nearest default. Switch interpolation to area.
  • Your video still misbehaves with keep_proportion on. The code computes a fit ratio and round()s the result - it does not snap back to a multiple of 64. So proportional mode can silently hand SVD a 593x847 that violates the very rule the node exists to enforce. Use it, but check the width/height outputs, or just keep the box at 576×1024.
  • Why is the page called "SVDRsizer"? The class name has a lowercase r - a typo in the source (NODE_CLASS_MAPPINGS = {"SVDRsizer": ...}). Display name is "SVDResizer", so search both.

Is it worth a permanent slot in your graph? If you run SVD more than once a month, yes - it's one less thing to babysit. If you've already got a resize step you trust, it's genuinely skippable. It's a utility, not magic.

Categoryessentials

Inputs (5)

NameTypeDefaultDescription
imageIMAGE
widthINT576576–1024
heightINT1024576–1024
interpolationCOMBO6 options: nearest, bilinear, bicubic, area, nearest-exact, lanczos
keep_proportionBOOLEANfalse

Outputs (3)

NameTypeDescription
IMAGEIMAGE
widthINT
heightINT