Skip to main content
Endpoint: POST https://fal.run/fal-ai/topaz/upscale/image Endpoint ID: fal-ai/topaz/upscale/image

Try it in the Playground

Run this model interactively with your own prompts.

Quick Start

import fal_client

def on_queue_update(update):
    if isinstance(update, fal_client.InProgress):
        for log in update.logs:
           print(log["message"])

result = fal_client.subscribe(
    "fal-ai/topaz/upscale/image",
    arguments={
        "image_url": "https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_poor_1.jpeg"
    },
    with_logs=True,
    on_queue_update=on_queue_update,
)
print(result)

Input Schema

model
ModelEnum
default:"Standard V2"
Model to use for image enhancement. Default value: "Standard V2"Possible values: Low Resolution V2, Standard V2, CGI, High Fidelity V2, Text Refine, Recovery, Redefine, Recovery V2, Standard MAX, Wonder
upscale_factor
float
default:"2"
Factor to upscale the image by (e.g. 2.0 doubles width and height) Default value: 2Range: 1 to 4
crop_to_fill
boolean
default:"false"
image_url
string
required
Url of the image to be upscaled
output_format
OutputFormatEnum
default:"jpeg"
Output format of the upscaled image. Default value: "jpeg"Possible values: jpeg, png
subject_detection
SubjectDetectionEnum
default:"All"
Subject detection mode for the image enhancement. Applies to standard enhance and Recovery V2 models. Default value: "All"Possible values: All, Foreground, Background
face_enhancement
boolean
default:"true"
Whether to apply face enhancement to the image. Applies to standard enhance and Recovery V2 models. Default value: true
face_enhancement_creativity
float
default:"0"
Creativity level for face enhancement. 0.0 means no creativity, 1.0 means maximum creativity. Ignored if face enhancement is disabled.Range: 0 to 1
face_enhancement_strength
float
default:"0.8"
Strength of the face enhancement. 0.0 means no enhancement, 1.0 means maximum enhancement. Ignored if face enhancement is disabled. Default value: 0.8Range: 0 to 1
sharpen
float
Sharpening level (0.0-1.0). Applies to Standard V2, Low Resolution V2, CGI, High Fidelity V2, Text Refine, and Redefine models.Range: 0 to 1
denoise
float
Denoising level (0.0-1.0). Applies to Standard V2, Low Resolution V2, CGI, High Fidelity V2, Text Refine, and Redefine models.Range: 0 to 1
fix_compression
float
Compression artifact removal level (0.0-1.0). Applies to Standard V2, Low Resolution V2, High Fidelity V2, and Text Refine models.Range: 0 to 1
strength
float
Enhancement strength (0.01-1.0). Applies to Text Refine model only.Range: 0.01 to 1
creativity
integer
Creativity level for generative upscaling (1-6). Higher values produce more creative/hallucinated details. Applies to Redefine model only.Range: 1 to 6
texture
integer
Texture detail level for generative upscaling (1-5). Applies to Redefine model only.Range: 1 to 5
prompt
string
Text prompt to guide generative upscaling (max 1024 chars). Applies to Redefine model only.
autoprompt
boolean
Enable automatic prompt generation for generative upscaling. Applies to Redefine model only.
detail
float
Detail recovery level (0.0-1.0). Applies to Recovery V2 model only.Range: 0 to 1

Output Schema

image
File
required
The upscaled image.

Input Example

{
  "model": "Standard V2",
  "upscale_factor": 2,
  "crop_to_fill": false,
  "image_url": "https://storage.googleapis.com/falserverless/model_tests/codeformer/codeformer_poor_1.jpeg",
  "output_format": "jpeg",
  "subject_detection": "All",
  "face_enhancement": true,
  "face_enhancement_creativity": 0,
  "face_enhancement_strength": 0.8
}

Output Example

{
  "image": {
    "url": "",
    "content_type": "image/png",
    "file_name": "z9RV14K95DvU.png",
    "file_size": 4404019
  }
}

Limitations

  • upscale_factor range: 1 to 4
  • output_format restricted to: jpeg, png
  • subject_detection restricted to: All, Foreground, Background
  • face_enhancement_creativity range: 0 to 1
  • face_enhancement_strength range: 0 to 1
  • sharpen range: 0 to 1
  • denoise range: 0 to 1
  • fix_compression range: 0 to 1
  • strength range: 0.01 to 1
  • creativity range: 1 to 6
  • texture range: 1 to 5
  • detail range: 0 to 1