What is Ultimate SD upscale?

One reason Stable Diffusion couldn't generate large images was that it wasn't trained on them, but there was another, simpler cause: computational cost.

Trying to generate an ultra-high-resolution image like 4K or 8K in one go is pretty tough on VRAM and compute time.

So instead of making it all at once, the idea came up to split the image and run Hires.fix on each piece.

  • 1. Enlarge the image
  • 2. Split it into tiles
  • 3. Run image2image on each tile separately
  • 4. Stitch the tiles back together at the end

Ultimate SD upscale is the well-known name, but what really matters is the idea of Tile (tiling).


Custom Nodes

There's also a node that is literally Ultimate SD upscale, ssitu/ComfyUI_UltimateSDUpscale, but this time I want to follow the underlying principle, so I'll use the simpler node above.


Tile's Weakness: Seams

First, let's look at how Tile basically behaves. I'll use the Tiled Diffusion nodes as an example, but any node will do as long as you get the idea.

tiled_diffusion_overlap0.json
  • 🟨 Resize the input image to 1024 × 1024 px
  • 🟩 Set tile size to 512 × 512 px

With these settings, the puppy image at the bottom left is split neatly into 4, and each tile is processed as an independent image2image.

As you can see, the tile boundaries are clearly visible, and the image doesn't hold together well as a whole. This is Tile's first weakness.


Blending seams with overlap

If the seams bother you, one idea is to place the tiles so they overlap a little. That's what tile_overlap does.

tiled_diffusion_overlap256.json
  • 🟩 Set tile_overlap to 256px
  • Instead of lining the tiles up neatly, picture placing them deliberately overlapping by about half.

The overlapping areas act like a cushion where neighboring tiles share information, so as sampling proceeds, the boundaries blend in and the seams become less noticeable.

However, the more overlap you add, the more times the same area gets sampled, so generation takes longer.


Tile's Other Weakness: The Prompt

Tile has one more big weakness. Because every tile uses the same prompt, extra things get generated in places you never intended.

In the previous workflow, set something like tile_overlap = 0 / denoise = 1, write only a dog in the prompt, and generate. As in the image, you get several dogs in a single image.

The top-left, top-right, bottom-left, and bottom-right tiles each try to draw one dog, so you end up with four dogs overall. This is Tile's second weakness.


What About a Different Prompt per Tile?

In theory, you could write a separate prompt for each tile.

  • Top left tile: dog right ear, right eye
  • Top right tile: dog left ear, left eye
  • Bottom left tile: dog front leg
  • Bottom right tile: dog back leg

That way, each tile should understand "I only need to handle the ear".

In practice, though, this is hardly ever used.

Writing a prompt for every tile isn't realistic, and above all, Stable Diffusion can't understand a prompt like "only the top-right quarter of a dog's face" and draw accordingly.


Locking the Structure with ControlNet Tile

This is where ControlNet Tile comes in.

ControlNet Tile is a ControlNet that generates a new image while holding on to the input image's structure quite strongly.

It doesn't copy the pixels as-is, but it behaves as if it were repainting textures and details while keeping the rough shapes and positions of objects.

tileddiffusion_controlnet_tile.json

In this workflow, I deliberately use tile_overlap = 0, denoise = 1, the settings where Tile's weaknesses show up the most.

Even so, you should be able to see that going through ControlNet Tile lets it upscale while keeping much of the original composition.


Finishing with overlap × ControlNet Tile

Put everything so far together, and a practical form of Tile upscaling starts to take shape.

tiled_diffusion_overlap_contolnet_tile.json
  • 🟩 overlap 256px
  • 🟦 Controlnet strength 0.6

It looks much more natural now.


Summary: The Ideas Behind Ultimate SD upscale

At its core, Ultimate SD upscale rests on three pillars.

  • 1. Tile (Tile Division) Instead of handling a large image as-is, split it into tiles and run image2image on each, aiming for super-resolution while keeping the VRAM and compute load down.
  • 2. overlap (Tile Overlap) Place the tiles slightly overlapping and let the boundaries blend during sampling, so the seams don't stand out.
  • 3. ControlNet Tile (fixing structure) Upscale the tiles while strongly preserving the input image's structure, to keep the "dogs inside the dog" problem and the whole image falling apart in check.

The actual Ultimate SD upscale nodes and presets are nothing more than this idea packaged into a single node.

By the way, the same idea carries over to video generation, where you split by frames instead. Something like splitting a 100-frame video into 20-frame chunks with a 5-frame overlap. I won't go into detail here, but the point is exactly the same: split things up finely to cut computational cost.