Week 8 · Lesson 6 of 10

Upscaling Images and Controlling Which Outputs Continue

0% Complete

Core Idea

Not all upscaling methods perform the same operation. A simple resize increases pixel dimensions but does not add meaningful detail. A model-based upscaler can sharpen and reconstruct detail. Because upscaling consumes additional computation, ComfyUI also needs a way to stop the workflow after initial generation and continue only with selected images.

How It Works

The basic Upscale Image By node resizes an image by a chosen factor. A 512 by 512 image scaled by two becomes 1024 by 1024. The result is larger, but the original blur and lack of detail remain. The method changes dimensions rather than generating new image structure, so it is not recommended when the purpose is to improve visible detail.

Upscale Image Using Model performs a different process. It requires an Upscale Model Loader connected to the node. Two useful model options are:

RealESRGAN x4, which is suitable for realistic photographs.

4x-UltraSharp, another strong general option.

A 4x model increases each dimension by four. A 512 by 512 input therefore becomes an image over 2000 pixels on each side. A 2x result requires a 2x upscaler model rather than assuming every model supports an arbitrary scale.

To compare methods, preview the decoded 512 by 512 image before the upscaler and the enlarged output after it. The model-based result shows sharper patterns in the subject's helmet and armor, whereas the basic resize preserves the original blur.

ComfyUI can pause a downstream branch with node muting. Selecting a node and pressing Ctrl+M mutes it, and everything after that point is paused. The workflow can generate the initial image, allow the user to inspect it, and proceed to upscaling only after the node is unmuted.

This two-stage method requires a fixed seed. If the seed remains randomized, queuing the graph after unmuting generates a new initial image and upscales that different result. With a fixed seed, the unchanged upstream image is reproduced, and ComfyUI can continue from the previously muted branch.

A more efficient option is the Image Chooser custom node. The batch size can be increased to four, and all four images are decoded into the chooser. The user selects one or more candidates and triggers Progress Selected Image. Only the selected output is sent into the upscaler.

Why It Matters

Upscaling every generated image wastes computation when many candidates are rejected for composition, pose, or design. Selection should occur before the expensive stage.

Distinguishing resizing from model-based upscaling also prevents a common evaluation error. A larger image can look more impressive in its dimensions while containing no additional detail. The useful comparison is not file size or resolution alone; it is the quality of reconstructed features at the same zoom level.

Practical Application

Build a selective model-upscaling branch:

  1. Generate a 512 by 512 image so the difference is easy to inspect.
  2. Preview the decoded original image.
  3. Add Upscale Image Using Model.
  4. Add Upscale Model Loader and select 4x-UltraSharp or RealESRGAN x4.
  5. Connect the decoded image to the upscaler.
  6. Add a second Preview Image node after the upscaler.
  7. Queue the workflow and compare the original and enlarged outputs.

For manual gating:

  1. Mute the first node in the upscaling branch with Ctrl+M.
  2. Set the KSampler seed control to Fixed.
  3. Queue the initial generation.
  4. Inspect the preview.
  5. If the image should continue, unmute the branch and queue again.
  6. Confirm that execution resumes at the upscaling stage rather than creating a different candidate.

For batch selection:

  1. Install the Image Chooser custom node.
  2. Increase batch size to four.
  3. Send the decoded images to Preview Chooser.
  4. Select the preferred image and keep the selection count at one, or increase it when multiple images should proceed.
  5. Choose Progress Selected Image.
  6. Send the chooser output to the model-based upscaler.

Trade-Offs and Limitations

Basic resizing preserves the original image exactly but does not add detail. Model-based upscaling adds sharpness but still may not produce the best possible facial, hair, or texture detail.

Manual muting is simple but depends on a fixed seed. Forgetting that setting changes the image between the inspection and upscaling passes.

The Image Chooser requires an additional custom node and restart, but it avoids regenerating an image and offers a cleaner selection process for batches.

A 4x model creates a very large output. The chosen scale should match the actual delivery requirement rather than being increased automatically.

Key Takeaway

Use model-based upscaling when detail matters, and place a deliberate selection gate before it. Larger dimensions alone do not equal higher visual detail, and computing resources should be spent only on candidates worth continuing.

Back to top