Nodes/comfyui-AGSoft/🔍 AGSoft Upscale Image
ComfyUI Node

🔍 AGSoft Upscale Image

One node to upscale with a model OR plain resize — pick your poison

By Art-xmaster·Created 12 months ago·Updated a day ago· 23
🔍 AGSoft Upscale Image
  • image
  • image
  • width
  • height
upscale_modelNone
moderescale
rescale_factor2.00
resize_value1024
resampling_methodlanczos
supersampletrue
rounding_modulus8
deviceauto

Upscaling in ComfyUI is usually a two-node dance: a model loader plus an upscale node, and if you want a plain geometric resize you're reaching for yet another node. 🔍 AGSoft Upscale Image collapses that into one: it can load an upscale model and apply it in the same pass, or skip the model entirely and just do a clean resize. The "None" default means it's also a perfectly good plain resize node - it earns its keep either way.

The bigger lesson from the upscaling community applies here too: decide which job you're doing. If your source already has the detail and you just want more pixels, skip the model and use Lanczos. If you want the model to invent detail, that's where upscale_model earns its keep.

How it works

The node reads your upscale models from the standard ComfyUI/models/upscale_models/ folder - .pth, .pt, .ckpt, .safetensors all show up in the dropdown. Select one and it's loaded once and cached by filename (so re-runs don't reload it every queue). Leave it at None and the node becomes a pure PIL resize.

The pipeline order matters: model upscale first, then your size math on top. Three modes cover the size handling:

  • rescale - multiplies the original dimensions by rescale_factor (default 2).
  • resize_width / resize_height - set one side via resize_value (default 1024), the other scales to keep proportions.

There's a genuinely nice touch in supersample (on by default): when upscaling, it renders at 2× the target and then downsamples back down - the classic anti-aliasing trick that gives noticeably cleaner edges than a straight single-pass resize. And rounding_modulus (default 8) snaps the output to model-friendly multiples; set 64 for SDXL pipelines.

Inputs and outputs worth knowing

The set is small: image in, upscale_model, mode, rescale_factor/resize_value, resampling_method (Lanczos default), supersample, rounding_modulus, device (auto picks your GPU). Out comes image, plus width and height ints you can feed into downstream latent math or text labels. Batch inputs are handled frame by frame.

Installing it

Pack standard: ComfyUI Manager → search comfyui-AGSoft → install, restart. Or:

cd ComfyUI/custom_nodes
git clone https://github.com/Art-xmaster/comfyui-AGSoft.git

No model downloads - the node ships empty and waits for you to add your own .safetensors files to models/upscale_models/. Drop a 4x-UltraSharp or an anime-specific Real-ESRGAN in there and it appears in the dropdown on the next refresh.

Common issues

  • Dropdown shows only "None" - your upscale models aren't in models/upscale_models/, or they have a format the node doesn't scan (.onnx won't show). Move them, restart.
  • Looks soft after model upscale - you may have gone model → then downscaled via resize_width to something small. The model ran, then the resize undid the detail. Pick one job.
  • Odd dimensions down the line - your source was an awkward size and the round to rounding_modulus left leftovers; that's what the rounding_modulus field is for, and it's on by default.

The one thing to keep straight: this node adds pixels, and with a model it can add detail - but a generative upscaler on a face will rewrite the face. If you need identity preserved, treat the face as its own pass, not this node's problem.

CategoryAGSoft/Image

Inputs (9)

NameTypeDefaultDescription
imageIMAGEВходное изображение для увеличения. Может быть одиночным изображением или батчем. Input image to upscale. Can be a single image or a batch.
upscale_modelCOMBONoneМодель для увеличения качества изображения. Модели должны находиться в папке: ComfyUI/models/upscale_models/ Поддерживаются форматы: .pth, .pt, .ckpt, .safetensors Выберите 'None' если не нужно использовать модель. Model for image quality enhancement. Models must be placed in: ComfyUI/models/upscale_models/ Supported formats: .pth, .pt, .ckpt, .safetensors Select 'None' if no model is needed.
modeCOMBOrescaleРежим работы: • rescale - масштабирование с коэффициентом (умножает оба размера) • resize_width - указать ширину, высота автоматически • resize_height - указать высоту, ширина автоматически Operation mode: • rescale - scale by factor (multiplies both dimensions) • resize_width - specify width, height auto • resize_height - specify height, width auto
rescale_factorFLOAT2.000.5–10Коэффициент масштабирования (только для режима rescale). Примеры: • 2.0 - увеличит изображение в 2 раза • 0.5 - уменьшит изображение в 2 раза • 1.5 - увеличит в 1.5 раза Scale factor (only for rescale mode). Examples: • 2.0 - doubles the image size • 0.5 - halves the image size • 1.5 - scales by 1.5x
resize_valueINT102464–8192Целевой размер (только для режимов resize_width/resize_height). Для resize_width - это ширина в пикселях. Для resize_height - это высота в пикселях. Вторая сторона будет рассчитана автоматически с сохранением пропорций. Target size (only for resize_width/resize_height modes). For resize_width - width in pixels. For resize_height - height in pixels. The other dimension will be calculated automatically maintaining aspect ratio.
resampling_methodCOMBOlanczosМетод интерполяции при изменении размера: • lanczos - наилучшее качество, рекомендуется для увеличения • bicubic - хорошее качество, быстрее чем lanczos • bilinear - среднее качество, быстро • nearest - низкое качество, артефакты, но максимально быстро Interpolation method for resizing: • lanczos - best quality, recommended for upscaling • bicubic - good quality, faster than lanczos • bilinear - medium quality, fast • nearest - low quality, artifacts, but fastest
supersampleBOOLEANtrueСуперсемплинг - улучшает качество при увеличении. Сначала увеличивает изображение в 2 раза больше, затем уменьшает до нужного размера. Рекомендуется включать для значительного увеличения. Supersampling - improves quality when upscaling. First upsamples 2x larger, then downsamples to target size. Recommended for significant upscaling.
rounding_modulusINT81–128Округление размеров до кратного значения. Необходимо для совместимости с VAE и другими нодами. Стандартное значение 8 подходит для большинства случаев. Значение 1 отключает округление. Round dimensions to multiples of this value. Required for compatibility with VAE and other nodes. Default value 8 works for most cases. Value 1 disables rounding.
deviceCOMBOautoУстройство для вычислений: • auto - автоматический выбор (обычно GPU если доступен) • cuda - принудительно использовать GPU • cpu - принудительно использовать CPU Compute device: • auto - automatic selection (usually GPU if available) • cuda - force GPU usage • cpu - force CPU usage

Outputs (3)

NameTypeDescription
imageIMAGE
widthINT
heightINT