---
title: Upscaling images — Topaz Labs Wonder 4 | Runware Docs
url: https://runware.ai/docs/models/topazlabs-wonder-4/guides/upscaling-images
description: "How to upscale images with Topaz Wonder 4: sending the request, choosing a factor from 2 to 6, and keeping the source inside the output size limits."
---
### [Introduction](https://runware.ai/docs/models/topazlabs-wonder-4/guides/upscaling-images#introduction)

Resizing an image in an editor stretches the pixels it already has, so a small photo enlarged four times comes back as **a bigger version of the same blur**. Wonder 4 is a generative model. It **rebuilds the detail a resize cannot**, and in the same pass it denoises, deblurs, removes compression artifacts and recovers faces. There are no settings to tune: you send the image and a factor, and the model works out what each part of the frame needs.

**Source**:

![A navy knit running shoe with a coral heel tab on a light gray background, soft and blocky at low resolution](https://runware.ai/docs/assets/source-sneaker.PTnOldFo_Z1bB838.jpg)

**Wonder 4**:

![The same running shoe, sharp, with a visible knit pattern, clean laces and a crisp midsole edge](https://runware.ai/docs/assets/output-sneaker.D9I-tGqZ_18UfNc.jpg)

*A 512 px product thumbnail upscaled four times. Drag to compare.*

Both frames render at the same width, so the difference is in **how much detail each one holds**. A 100% crop of the upper shows it at the pixel level:

![A soft close-up crop of the shoe's navy mesh upper and white laces from the 512 px source](https://runware.ai/docs/assets/crop-source-sneaker.D_7l4bbu_1Snosk.jpg)

*Source · 100% crop*

![The same crop from the upscaled image, with open mesh holes, knit texture between them and clean lace edges](https://runware.ai/docs/assets/crop-output-sneaker.3zG6w5kt_21vbcl.jpg)

*Wonder 4 · 100% crop*

The mesh that is a soft navy blur in the source comes back as **open, evenly spaced holes** with knit texture between them, and the laces have clean edges. Wonder did not sharpen what was there, it **reconstructed what a 2048 px photo of that shoe would show**.

### [The request](https://runware.ai/docs/models/topazlabs-wonder-4/guides/upscaling-images#the-request)

An upscale takes one image and returns one image. Put the source in `inputs.image`, name the `model`, and set how far to enlarge it with `upscaleFactor`:

**TypeScript**:

```typescript
import { createClient } from '@runware/sdk'

const client = await createClient({ apiKey: process.env.RUNWARE_API_KEY })
await client.connect()

const [result] = await client.run({
  model: 'topazlabs:wonder@4',
  upscaleFactor: 4,
  inputs: {
    image: 'https://im.runware.ai/image/os/a14d18/ws/2/ii/7d2f4b8e-1c6a-4f3e-9b5d-8a2c6e4f1b97.jpg'
  }
})
```

**Python**:

```python
import asyncio
import os

from runware import Runware

async def main():
    async with Runware(api_key=os.environ["RUNWARE_API_KEY"]) as client:
        results = await client.run({
            "model": "topazlabs:wonder@4",
            "upscaleFactor": 4,
            "inputs": {
                "image": "https://im.runware.ai/image/os/a14d18/ws/2/ii/7d2f4b8e-1c6a-4f3e-9b5d-8a2c6e4f1b97.jpg"
            }
        })

asyncio.run(main())
```

**cURL**:

```bash
curl https://api.runware.ai/v1 \
  -H "Authorization: Bearer $RUNWARE_API_KEY" \
  -H "Content-Type: application/json" \
  -d '[
    {
      "taskType": "upscale",
      "taskUUID": "4c1e8a2f-7b3d-4e9a-8f6c-2d5b9e1a7c30",
      "model": "topazlabs:wonder@4",
      "upscaleFactor": 4,
      "inputs": {
        "image": "https://im.runware.ai/image/os/a14d18/ws/2/ii/7d2f4b8e-1c6a-4f3e-9b5d-8a2c6e4f1b97.jpg"
      }
    }
  ]'
```

**CLI**:

```bash
runware run topazlabs:wonder@4 \
  upscaleFactor=4 \
  inputs.image=https://im.runware.ai/image/os/a14d18/ws/2/ii/7d2f4b8e-1c6a-4f3e-9b5d-8a2c6e4f1b97.jpg
```

**JSON**:

```json
{
  "taskType": "upscale",
  "taskUUID": "4c1e8a2f-7b3d-4e9a-8f6c-2d5b9e1a7c30",
  "model": "topazlabs:wonder@4",
  "upscaleFactor": 4,
  "inputs": {
    "image": "https://im.runware.ai/image/os/a14d18/ws/2/ii/7d2f4b8e-1c6a-4f3e-9b5d-8a2c6e4f1b97.jpg"
  }
}
```

- `inputs.image` is the only required field. It takes a URL, the UUID of an earlier image, a data URI or plain base64.
- `upscaleFactor` multiplies the width and the height by a whole number from 1 to 6, and defaults to 2. A factor of 1 **keeps the size and only enhances**, covered in [enhancing at the original resolution](https://runware.ai/docs/models/topazlabs-wonder-4/guides/enhancing-at-original-resolution).
- There is nothing else to set. Denoising, deblurring, artifact removal and face recovery **run on every request**, at whatever strength each region of the image calls for.

A request that produces a few megapixels comes back in **about half a minute**, and larger outputs take longer.

### [Choosing the factor](https://runware.ai/docs/models/topazlabs-wonder-4/guides/upscaling-images#choosing-the-factor)

`upscaleFactor` multiplies both edges, so a factor of 4 turns a 512 × 512 source into 2048 × 2048. Work it out from **the size you have to deliver**: divide the target width by the source width and round up. A thumbnail headed for a product page or a print layout needs 4 or more, while an image that is already close to its final size only needs 2.

The listing photo below was exported at 1376 px wide with heavy compression, and a factor of 2 brings it to the 2752 px a full-width gallery wants:

**Source**:

![A bright staged living room with a cream sofa, a walnut coffee table and tall windows, soft and slightly blocky](https://runware.ai/docs/assets/source-living-room.BxMKIURP_1HSnJi.jpg)

**Wonder 4**:

![The same living room, sharp, with visible boucle texture on the sofa, oak grain on the floor and clean window frames](https://runware.ai/docs/assets/output-living-room.CwSPOD6U_2XIhk.jpg)

*A compressed 1376 px listing photo upscaled two times.*

At a factor of 2 the model has less ground to cover, so most of the gain is **cleanup rather than invention**. A 100% crop of the sofa shows it:

![A soft, blocky close-up crop of the cream boucle sofa and its cushions from the 1376 px source](https://runware.ai/docs/assets/crop-source-living-room.B8PnxqcA_TH5H8.jpg)

*Source · 100% crop*

![The same crop from the upscaled photo, with looped boucle texture on the sofa and a crisp knit on the cushion](https://runware.ai/docs/assets/crop-output-living-room.1UyfOV_z_1ifXAB.jpg)

*Wonder 4 · 100% crop*

The source flattens the boucle into smooth cream patches, and the upscale brings back **its looped texture**, along with the knit on the cushion behind it.

### [Size limits](https://runware.ai/docs/models/topazlabs-wonder-4/guides/upscaling-images#size-limits)

The cap is on the output: **256 megapixels in total, and 32,000 pixels on the longest side**. Because the factor multiplies the source, the largest input you can send **shrinks as the factor grows**:

| `upscaleFactor` | Largest input | Longest input side |
| --- | --- | --- |
| 1 | 256 MP | 32,000 px |
| 2 | 64 MP | 16,000 px |
| 3 | 28.4 MP | 10,666 px |
| 4 | 16 MP | 8,000 px |
| 5 | 10.2 MP | 6,400 px |
| 6 | 7.1 MP | 5,333 px |

> [!WARNING]
> A source over the limit for its factor is rejected, not resized. The rejection states the largest input that factor accepts, so a 7680 × 4320 frame sent at a factor of 4 is refused with a 16-megapixel limit even though the frame is well under 256. Lower the factor, or downscale the source before you send it.

### [What one pass corrects](https://runware.ai/docs/models/topazlabs-wonder-4/guides/upscaling-images#what-one-pass-corrects)

Wonder 4 treats **each region of the image separately**. A face gets face recovery while the noisy wall behind it gets denoised, in the same request. That is why the same call works on very different sources, and the other guides in this set take them one at a time:

- [Restoring photos](https://runware.ai/docs/models/topazlabs-wonder-4/guides/restoring-photos) covers old scans, compressed uploads, low-light noise and motion blur.
- [Text and graphics](https://runware.ai/docs/models/topazlabs-wonder-4/guides/text-and-graphics) covers packaging, screenshots and printed copy.
- [Transparent images](https://runware.ai/docs/models/topazlabs-wonder-4/guides/transparent-images) covers cutouts that carry an alpha channel, from see-through glass to loose hair.

### [Tips](https://runware.ai/docs/models/topazlabs-wonder-4/guides/upscaling-images#tips)

1. **Pick the factor from the target size.** Divide the size you need by the size you have and round up. A bigger factor than the job needs only costs more and takes longer.
    
2. **Upscale last.** Crop and color-correct first, then upscale the finished frame, so the rebuilt detail is not resampled again later in your pipeline.
    
3. **Send the best copy you have.** The model rebuilds from whatever signal survives in the source, so an original export gives it more to work with than a screenshot of a screenshot.
    
4. **Judge the result at 100%.** A page-width preview hides both the gains and any invented detail. Open the full image, or crop it at native size, before you ship it.