---
title: Stable Diffusion Latent Upscaler | Runware Docs
url: https://runware.ai/docs/models/stable-diffusion-latent-upscaler
description: 2× latent-space upscaler for Stable Diffusion outputs
---
# Stable Diffusion Latent Upscaler

![Stable Diffusion Latent Upscaler](https://assets.runware.ai/covers/stable-diffusion-latent-upscaler.jpg)

Stable Diffusion Latent Upscaler is a diffusion upscaling model that operates in Stable Diffusion’s latent space to perform fast 2× resolution enhancement before VAE decoding, improving detail without changing global composition.

- **Status**: live
- **ID**: `runware:502@1`
- Try in Playground
- **Release Date**: March 23, 2023
- **Zero Data Retention**: Yes
- **Capabilities**: Image to Image, Upscale, Checkpoint

## Pricing

$0.0134 from, per run · ~14s per request

**Measured runs**

- upscaleFactor 2 · settings.steps 20 · 1024×1024 input: `$0.0134` (~14s)
- upscaleFactor 2 · settings.steps 60 · 1024×1024 input: `$0.0179` (~17s)

**4 example generations**

- [upscale](https://runware.ai/docs/models/stable-diffusion-latent-upscaler/examples#example-marionette-workshop-photo-restoration): `$0.0032` (~11s)
- [upscale](https://runware.ai/docs/models/stable-diffusion-latent-upscaler/examples#example-railway-safety-feature-illustration): `$0.0032` (~14s)
- [upscale](https://runware.ai/docs/models/stable-diffusion-latent-upscaler/examples#example-antique-diving-helmet-catalog-cutout): `$0.0045` (~13s)
- [upscale](https://runware.ai/docs/models/stable-diffusion-latent-upscaler/examples#example-aerospace-recruitment-portrait-composite): `$0.0058` (~14s)

billed by compute time, so a request costs what it took · times vary, measured end to end · [How pricing works](https://runware.ai/docs/models-api/pricing)

## Request Parameters

**API Options**

Platform-level options for task execution and delivery.

### [taskType](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `upscale`

Identifier for the type of task being performed.

### [taskUUID](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID v4 identifier for tracking tasks and matching async responses. Must be unique per task.

### [outputType](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-outputtype)

- **Type**: `string`
- **Default**: `URL`

Image output type.

**Allowed values**: `URL` `base64Data` `dataURI`

### [outputFormat](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-outputformat)

- **Type**: `string`
- **Default**: `JPG`

Specifies the file format of the generated output. The available values depend on the task type and the specific model's capabilities.

- \`JPG\`: Best for photorealistic images with smaller file sizes (no transparency).
- \`PNG\`: Lossless compression, supports high quality and transparency (alpha channel).
- \`WEBP\`: Modern format providing superior compression and transparency support.

> [!NOTE]
> \*\*Transparency\*\*: If you are using features like background removal or LayerDiffuse that require transparency, you must select a format that supports an alpha channel (e.g., \`PNG\`, \`WEBP\`, \`TIFF\`). \`JPG\` does not support transparency.

**Allowed values**: `JPG` `PNG` `WEBP`

### [outputQuality](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-outputquality)

- **Type**: `integer`
- **Min**: `20`
- **Max**: `99`
- **Default**: `95`

Compression quality of the output. Higher values preserve quality but increase file size.

### [webhookURL](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-webhookurl)

- **Type**: `string`
- **Format**: `uri`

Webhook URL that receives JSON responses via HTTP POST when generation tasks complete. For batch requests with multiple results, each completed item triggers a separate webhook call as it becomes available.

**Learn more** (1 resource):

- [Webhooks](https://runware.ai/docs/models-api/webhooks) (platform)

### [deliveryMethod](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-deliverymethod)

- **Type**: `string`
- **Default**: `sync`

Determines how the API delivers task results.

**Allowed values**:

- `sync` Returns results directly in the API response. Over HTTP, a task still running after 120 seconds continues as an async task and comes back with status 'processing'. Poll for its results using getResponse.
- `async` Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse.

**Learn more** (1 resource):

- [Task Polling](https://runware.ai/docs/models-api/task-polling) (platform)

### [uploadEndpoint](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-uploadendpoint)

- **Type**: `string`
- **Format**: `uri`

Specifies a URL where the generated content will be automatically uploaded using the HTTP PUT method. The raw binary data of the media file is sent directly as the request body. For secure uploads to cloud storage, use presigned URLs that include temporary authentication credentials.

**Common use cases:**

- **Cloud storage**: Upload directly to S3 buckets, Google Cloud Storage, or Azure Blob Storage using presigned URLs.
- **CDN integration**: Upload to content delivery networks for immediate distribution.

```text
// S3 presigned URL for secure upload
https://your-bucket.s3.amazonaws.com/generated/content.mp4?X-Amz-Signature=abc123&X-Amz-Expires=3600

// Google Cloud Storage presigned URL
https://storage.googleapis.com/your-bucket/content.jpg?X-Goog-Signature=xyz789

// Custom storage endpoint
https://storage.example.com/uploads/generated-image.jpg
```

The content data will be sent as the request body to the specified URL when generation is complete.

### [ttl](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-ttl)

- **Type**: `integer`
- **Min**: `60`

Time-to-live (TTL) in seconds for generated content. Only applies when `outputType` is `URL`.

### [includeCost](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-includecost)

- **Type**: `boolean`

Include task cost in the response.

**Inputs**

Input resources for the task (images, audio, etc). These must be nested inside the \`inputs\` object.

### [image](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-inputs-image)

- **Path**: `inputs.image`
- **Type**: `string`
- **Required**: true
- **Area**: `up to 1.15 MP`

Image input (UUID, URL, Data URI, or Base64).

**Core Parameters**

Primary parameters that define the task output.

### [model](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-model)

- **Type**: `string`
- **Required**: true
- **Value**: `runware:502@1`

Send `auto` instead of an AIR identifier to have the model router choose the model for this task. The rest of the request is unchanged, every value you send is kept, and only the parameters you leave out are filled in. See [Model Router](https://runware.ai/docs/models-api/model-router).

**Learn more** (3 resources):

- [Text To Image: Model Selection](https://runware.ai/docs/learn/text-to-image#model-selection) (learn)
- [Image Inpainting: Model Specialized Inpainting Models](https://runware.ai/docs/learn/image-inpainting#model-specialized-inpainting-models) (learn)
- [Image Outpainting: Other Critical Parameters](https://runware.ai/docs/learn/image-outpainting#other-critical-parameters) (learn)

### [upscaleFactor](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-upscalefactor)

- **Type**: `integer`

Factor by which to upscale the generated image. A value of 2 doubles width and height.

**Allowed values**: `2`

**Settings**

Technical parameters to fine-tune the inference process. These must be nested inside the \`settings\` object.

### [positivePrompt](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-settings-positiveprompt)

- **Path**: `settings.positivePrompt`
- **Type**: `string`

Text prompt describing elements to include in the generated output.

**Learn more** (1 resource):

- [Prompts](https://runware.ai/docs/learn/prompts) (learn)

### [negativePrompt](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-settings-negativeprompt)

- **Path**: `settings.negativePrompt`
- **Type**: `string`

Prompt to guide what to exclude from generation. Ignored when guidance is disabled (CFGScale ≤ 1).

**Learn more** (1 resource):

- [Prompts: Negative Prompts](https://runware.ai/docs/learn/prompts#negative-prompts) (learn)

### [seed](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-settings-seed)

- **Path**: `settings.seed`
- **Type**: `integer`
- **Min**: `0`
- **Max**: `9223372036854776000`

Random seed for reproducible generation. When not provided, a random seed is generated in the unsigned 32-bit range.

**Learn more** (1 resource):

- [Seed](https://runware.ai/docs/learn/seed) (learn)

### [steps](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-settings-steps)

- **Path**: `settings.steps`
- **Type**: `integer`
- **Min**: `20`
- **Max**: `60`

Total number of denoising steps. Higher values generally produce more detailed results but take longer.

**Learn more** (1 resource):

- [Steps](https://runware.ai/docs/learn/steps) (learn)

### [CFGScale](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-settings-cfgscale)

- **Path**: `settings.CFGScale`
- **Type**: `float`
- **Min**: `3`
- **Max**: `12`
- **Step**: `0.01`

Guidance scale representing how closely the output will resemble the prompt. Higher values produce results more aligned with the prompt.

**Learn more** (1 resource):

- [Cfg Scale](https://runware.ai/docs/learn/cfg-scale) (learn)

### [clipSkip](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#request-settings-clipskip)

- **Path**: `settings.clipSkip`
- **Type**: `integer`
- **Min**: `0`
- **Max**: `2`

Number of layers to skip in the CLIP model.

**Learn more** (2 resources):

- [Clip Skip](https://runware.ai/docs/learn/clip-skip) (learn)
- [Custom Stickers: Clip Skip](https://runware.ai/docs/models/sdxl/guides/custom-stickers#clip-skip) (learn)

## Response Parameters

### [taskType](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#response-tasktype)

- **Type**: `string`
- **Required**: true
- **Value**: `upscale`

Identifier for the type of task this response belongs to.

### [taskUUID](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#response-taskuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID v4 identifier echoed from the original request, used to match async responses to their tasks.

### [imageUUID](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#response-imageuuid)

- **Type**: `string`
- **Required**: true
- **Format**: `UUID v4`

UUID of the output image.

### [imageURL](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#response-imageurl)

- **Type**: `string`
- **Format**: `uri`

URL of the output image.

### [imageBase64Data](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#response-imagebase64data)

- **Type**: `string`

Base64-encoded image data.

### [imageDataURI](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#response-imagedatauri)

- **Type**: `string`
- **Format**: `uri`

Data URI of the output image.

### [cost](https://runware.ai/docs/models/stable-diffusion-latent-upscaler#response-cost)

- **Type**: `float`

Task cost in USD. Present when `includeCost` is set to `true` in the request.

## Examples

### upscale (upscale)

![Antique Diving Helmet Catalog Cutout](https://assets.runware.ai/examples/stable-diffusion-latent-upscaler/954909c4-6789-4a21-a532-7725dbc181e0.jpg)

```json
{
  "taskType": "upscale",
  "taskUUID": "db73e0df-b861-45fd-9a4a-9a6a722af94e",
  "model": "runware:502@1",
  "upscaleFactor": 2,
  "settings": {
    "positivePrompt": "Preserve the exact composition of the centered antique copper-and-brass deep-sea diving helmet on the seamless matte deep-teal catalog background. Enhance the fine rivets, solder seams, oxidized green patina, scratches, embossed fittings, threaded ports, rubber gaskets, circular glass windows, controlled reflections, crisp extraction edges, soft upper-left studio lighting, and subtle grounding shadow. Maintain the original proportions, camera angle, background, and object placement without introducing new objects or altering the silhouette."
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/ca3b8ff5-aeb7-458d-aaab-d56970cc26c1.jpg"
  }
}
```

---

### upscale (upscale)

![Marionette Workshop Photo Restoration](https://assets.runware.ai/examples/stable-diffusion-latent-upscaler/70ee8d63-692f-49cb-a85c-3c164c74cc73.jpg)

```json
{
  "taskType": "upscale",
  "taskUUID": "60168231-66a0-4465-981c-ac9a355a15e7",
  "model": "runware:502@1",
  "upscaleFactor": 2,
  "settings": {
    "positivePrompt": "Faithful archival restoration of the exact black-and-white marionette workshop photograph, preserving the original portrait framing, subject positions, documentary lighting, tonal character, and period authenticity. Enhance the craftsman's facial features, carved wood grain, puppet joints, fine suspension strings, worn fabric weave, hand tools, shelf edges, and workbench textures. Reduce fine scratches, dust marks, water-stain distraction, and the visible fold crease while retaining subtle silver gelatin grain and natural age. Crisp but photographic detail, balanced grayscale tones, no compositional changes and no new objects."
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/2a2dc37c-b58e-46f1-96bd-361fc5a63dc6.jpg"
  }
}
```

---

### upscale (upscale)

![Aerospace Recruitment Portrait Composite](https://assets.runware.ai/examples/stable-diffusion-latent-upscaler/5d74fcd4-87f1-4baf-a1ff-45b441f10fea.jpg)

```json
{
  "taskType": "upscale",
  "taskUUID": "27bf5ce5-fa7d-47a7-a403-6ec21dec9686",
  "model": "runware:502@1",
  "upscaleFactor": 2,
  "settings": {
    "positivePrompt": "Enhance the existing approved aerospace recruitment portrait composite at 2× resolution. Preserve the exact subject, pose, facial identity, three-quarter framing and cleanroom background placement. Resolve realistic facial detail, individual hair strands, white micro-ripstop coverall weave, zipper teeth, stitched seams, glove texture, circular unlettered patch, gold thermal-foil crinkles, fine cable bundles, perforated metal panels and ceiling-grid edges. Maintain the cool white lighting, deep cobalt ambience, subtle rim light and existing depth of field without changing the composition or adding anything.",
    "negativePrompt": "new objects, altered pose, changed identity, changed expression, different clothing, added text, logos, extra patches, extra fingers, distorted hands, duplicated cables, rearranged background, changed crop, oversharpening, halos, plastic skin, painterly texture"
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/db6990d4-e230-41eb-80b0-7bed2a6e776a.jpg"
  }
}
```

---

### upscale (upscale)

![Railway Safety Feature Illustration](https://assets.runware.ai/examples/stable-diffusion-latent-upscaler/3394381e-0b8c-437a-8976-bfd32de2ae32.jpg)

```json
{
  "taskType": "upscale",
  "taskUUID": "54b9797a-7dec-4e20-9bff-305d7d90439a",
  "model": "runware:502@1",
  "upscaleFactor": 2,
  "settings": {
    "positivePrompt": "Restyle the supplied railway inspection photograph as a refined 1930s WPA-inspired screen-printed lithograph for an engineering magazine feature. Preserve the exact vertical crop, low three-quarter camera angle, engineer's kneeling pose, track geometry, switch mechanism, and position of every existing object. Render the weathered steel rails, switch points, bolts, springs, grease marks, angular ballast stones, reflective jacket seams, gloves, and inspection gauge with crisp carved linework and controlled screen-print texture. Limited palette of petroleum teal, oxidized orange, charcoal, and warm parchment; purposeful industrial mood, strong tonal separation, subtle paper grain, clean detailed edges. No new objects, no text, and no compositional changes."
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/1520aa90-2f7e-4bfd-98af-801dfadc140d.jpg"
  }
}
```