---
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 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.

- **ID**: `runware:502@1`
- **Status**: live
- **Release Date**: March 23, 2023
- **Capabilities**: Image to Image, Upscale

## 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`

Specifies a webhook URL where JSON responses will be sent 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/platform/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 complete results directly in the API response.
- `async` Returns an immediate acknowledgment with the task UUID. Poll for results using getResponse.

**Learn more** (1 resource):

- [Task Polling](https://runware.ai/docs/platform/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`
- **Default**: `false`

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

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

**Generation Parameters**

Core parameters for controlling the generated content.

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

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

Identifier of the model to use for generation.

**Learn more** (3 resources):

- [Text To Image: Model Selection The Foundation Of Generation](https://runware.ai/docs/guides/text-to-image#model-selection-the-foundation-of-generation) (guide)
- [Image Inpainting: Model Specialized Inpainting Models](https://runware.ai/docs/guides/image-inpainting#model-specialized-inpainting-models) (guide)
- [Image Outpainting: Other Critical Parameters](https://runware.ai/docs/guides/image-outpainting#other-critical-parameters) (guide)

### [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** (2 resources):

- [Text To Image: Prompts Guiding The Generation](https://runware.ai/docs/guides/text-to-image#prompts-guiding-the-generation) (guide)
- [Image Outpainting: Other Critical Parameters](https://runware.ai/docs/guides/image-outpainting#other-critical-parameters) (guide)

### [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):

- [Text To Image: Prompts Guiding The Generation](https://runware.ai/docs/guides/text-to-image#prompts-guiding-the-generation) (guide)

### [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):

- [Text To Image: Seed Controlling Randomness Deterministically](https://runware.ai/docs/guides/text-to-image#seed-controlling-randomness-deterministically) (guide)

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

- **Path**: `settings.steps`
- **Type**: `integer`
- **Min**: `1`

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

**Learn more** (1 resource):

- [Text To Image: Steps Trading Quality For Speed](https://runware.ai/docs/guides/text-to-image#steps-trading-quality-for-speed) (guide)

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

- **Path**: `settings.CFGScale`
- **Type**: `float`
- **Min**: `0`
- **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):

- [Text To Image: Cfg Scale Balancing Creativity And Control](https://runware.ai/docs/guides/text-to-image#cfg-scale-balancing-creativity-and-control) (guide)

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

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

Number of layers to skip in the CLIP model.

**Learn more** (2 resources):

- [Text To Image: Clip Skip Adjusting Text Interpretation](https://runware.ai/docs/guides/text-to-image#clip-skip-adjusting-text-interpretation) (guide)
- [Custom Stickers: Clip Skip](https://runware.ai/docs/guides/custom-stickers#clip-skip) (guide)

## Response Parameters

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

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

Type of the task.

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

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

UUID of the task.

### [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

### Pixelated Harbor Tram Scene (Upscale)

![Pixelated Harbor Tram Scene](https://assets.runware.ai/examples/stable-diffusion-latent-upscaler/b9fa8648-d2d5-418f-84be-13c6078fde47.jpg)

**Request**:

```json
{
  "taskType": "upscale",
  "taskUUID": "129a4d18-bca3-41c0-b5b1-0e6c5d42ffdc",
  "model": "runware:502@1",
  "upscaleFactor": 2,
  "settings": {
    "positivePrompt": "clean detailed harbor tram scene, sharp edges, restored fine textures, clearer windows, crisp tram cables, defined waves, distant industrial shoreline, natural lighting, realistic detail, preserve original framing and layout",
    "negativePrompt": "extra vehicles, duplicated objects, warped tram, text, watermark, oversmoothing, heavy blur, painterly distortion, anatomy errors, surreal alterations",
    "steps": 20,
    "seed": 96292,
    "CFGScale": 6.5,
    "clipSkip": 1
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/ba517767-8979-44e5-900f-9614d677f501.jpg"
  }
}
```

**Response**:

```json
{
  "taskType": "imageUpscale",
  "taskUUID": "129a4d18-bca3-41c0-b5b1-0e6c5d42ffdc",
  "imageUUID": "ea5d11bb-4443-4229-945b-8ed5ca44261d",
  "imageURL": "https://im.runware.ai/image/os/a05d22/ws/2/ii/ea5d11bb-4443-4229-945b-8ed5ca44261d.jpg",
  "cost": 0.0013,
  "inputImageUUID": "ca0f38a4-d2ba-4fa6-a23e-ea976080aebc"
}
```

---

### Pixelated Desert Ruin Panorama (Upscale)

![Pixelated Desert Ruin Panorama](https://assets.runware.ai/examples/stable-diffusion-latent-upscaler/37b8c9a0-e000-4e6b-8614-9b671287f675.jpg)

**Request**:

```json
{
  "taskType": "upscale",
  "taskUUID": "b4e5135a-2304-45c2-bc6d-543f13ee0786",
  "model": "runware:502@1",
  "upscaleFactor": 2,
  "settings": {
    "positivePrompt": "ancient desert ruins with weathered sandstone arches, eroded statues, fine cracks in stone, drifting dust, layered distant mesas, soft amber daylight, faded blue cloth details, cinematic depth, realistic textures, preserved original framing and composition",
    "negativePrompt": "extra structures, people, animals, dramatic composition changes, heavy stylization, oversharpening, warped geometry, duplicate objects, text, watermark, frame",
    "steps": 20,
    "seed": 69186,
    "CFGScale": 6.5,
    "clipSkip": 1
  },
  "inputs": {
    "image": "https://assets.runware.ai/assets/inputs/3b9f956f-7bf7-4705-b184-48d909750431.jpg"
  }
}
```

**Response**:

```json
{
  "taskType": "imageUpscale",
  "taskUUID": "b4e5135a-2304-45c2-bc6d-543f13ee0786",
  "imageUUID": "760e3d09-1a23-463b-9b49-8b1ba4dc1446",
  "imageURL": "https://im.runware.ai/image/os/a17d13/ws/2/ii/760e3d09-1a23-463b-9b49-8b1ba4dc1446.jpg",
  "cost": 0.0013,
  "inputImageUUID": "3e3ebf3f-e815-48cc-b03d-65e23e61e225"
}
```