ComfyUI Node

Image to Image

Upscale or Transform Images With One Node (Image to Image)

By kadirnar·Created 3 years ago·Updated 7 months ago· 25
Image to Image
  • image
  • image
model_namecaidas/swin2SR-classical-sr-x2-64

Image to Image takes one image and produces another, transformed image. The twist is that the transformation is decided entirely by the model you point it at - and the default model makes this node a one-click upscaler. It ships with caidas/swin2SR-classical-sr-x2-64, a Swin2SR super-resolution checkpoint that doubles image resolution. In a graph that means you can route any image into this node and get a clean 2x upscale out, no sampler, no checkpoint, no VAE.

Under the hood it's the Hugging Face image-to-image pipeline. The node converts your image's first frame to PIL, runs the pipeline, and converts the result back to a standard ComfyUI IMAGE tensor. Whatever the model does - upscale, denoise, restore, colorize - the interface is the same: image in, image out.

The inputs and output

  • image - the IMAGE tensor to transform.
  • model_name - Hub model ID as a string. The default caidas/swin2SR-classical-sr-x2-64 is a 2x classical super-resolution model; the x4 variant upscales 4x instead. Plenty of other image-to-image models on the Hub work here.

The output is a single image (IMAGE). Wire it into a save node or onward into the rest of your graph.

How to install it

Standard pack install - ComfyUI Manager (search "ComfyUI-Transformers") or:

cd ComfyUI/custom_nodes
git clone https://github.com/kadirnar/ComfyUI-Transformers

Restart ComfyUI. Swin2SR is a couple hundred MB on first download, and requirements.txt covers the transformers stack.

Where people get burned

Expectations, mostly. The default is a classical super-resolution model - it doubles resolution cleanly but it's not the hallucinating detail that upscaler nodes with latent diffusion give you. For "make my image bigger without artifacts," it's solid and fast. For "reconstruct details that aren't there," a dedicated upscaling pipeline will do more. Also note that, like the rest of the pack, model_name is a free string: type the ID exactly, and remember the model's x2/x4 behavior is baked into which checkpoint you pick. One more thing - since this node's output type is IMAGE rather than a string path or JSON, it's one of the friendlier nodes in the pack to drop into an existing workflow. It just plugs in.

CategoryTransformers/ImageToImage

Inputs (2)

NameTypeDefaultDescription
imageIMAGE
model_nameSTRINGcaidas/swin2SR-classical-sr-x2-64

Outputs (1)

NameTypeDescription
imageIMAGE