Real-ESRGAN Video

REAL_ESRGAN_VIDEO

Enlarges a video 2 or 4 times, frame by frame, with Real-ESRGAN: sharper detail and less noise and blur, with a photo model, a fast general model and an anime model to choose from.

Video Editingvideo-super-resolutionupscalingvideo-restorationanimebsd-3-clauseFine-tunable
Real-ESRGAN Video: Video Editing model on Kainguru

About Real-ESRGAN Video

Capabilities

  • 2x or 4x — the result is 2 or 4 times the width and height of your video
  • Three models — photo for real footage, general for fast results with adjustable denoise, anime for cartoons
  • Same timing — every frame is enlarged on its own, so the length, frame rate and motion are untouched
  • Fine-tunable — train a model on pairs of small and large clips of your own material

Good to know

  • Videos are MP4, MOV, WebM or MKV, at most 256 MB, 300 frames and 518,400 pixels a frame (960 x 540); the result has no sound and at most 3840 x 2160 pixels.
  • The result is an SDR video at a constant frame rate: a variable-frame-rate video is re-timed evenly at its average rate, and HDR (HLG or PQ) colours are not tone-mapped, so they look flatter than in an HDR player.
  • Frames are enlarged one at a time, so fine texture can shimmer from frame to frame; a video model that looks across frames keeps it steadier.
  • Denoise strength applies to the general model: 0 keeps noise and grain, 1 removes as much as it can.
  • Fine-tuning takes one ZIP (at most 4 GB, 128 MB a clip, no password) with 2 to 100 pairs and a manifest.jsonl holding one {"input": "low/a.mp4", "target": "high/a.mp4"} line per pair, paths relative to the manifest. Each target is exactly 4 times its input's width and height (at most 1920 x 1080), with the same number of frames; inputs are at least 64 pixels a side.
  • Training works on random 64 x 64 crops of the first 48 frames of each clip, one model per fine-tune (photo, general or anime), and stops after the steps you ask for or after 9 hours, keeping what it has learned.

Attribution

Real-ESRGAN by Xintao Wang, Liangbin Xie, Chao Dong and Ying Shan, released under the BSD 3-Clause Licence; its generator network is BasicSR's, under the Apache License 2.0.

Real-ESRGAN Video inputs and output

NameTypeRequiredDefaultDetails
videofileYes—The video to enlarge: MP4, MOV, WebM or MKV, at most 256 MB, 300 frames and 518,400 pixels a frame. The result has no sound.
1–2048 characters · video/mp4, quicktime, webm, x-matroska
varianttextNogeneralphoto: best detail for real footage; general: faster, with adjustable denoise; anime: cartoons and anime.
Allowed: photo, general, anime
scaleintegerNo4How many times wider and taller the result is.
Allowed: 2, 4 · 2–4
denoise_strengthnumberNo0.5General model only (the others ignore it): 0 keeps noise and grain, 1 removes as much of them as it can.
0–1

Output. Returns MP4 video: The enlarged video as an H.264 MP4 without sound, at the input's frame rate.

Run Real-ESRGAN Video with the API

Send your API key in the X-API-Key header. The run is asynchronous: submit it, then poll it until it finishes. Create an API key.

cURL
curl -X POST "https://api.kainguru.com/api/v1/executions?mlFlowId=REAL_ESRGAN_VIDEO" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "video": "https://example.com/input.png",
    "denoise_strength": 0.5,
    "scale": 4,
    "variant": "general"
  },
  "outputFormat": "json"
}'

# Poll until the execution reaches a terminal state
curl "https://api.kainguru.com/api/v1/executions/{executionId}" \
  -H "X-API-Key: kg_your_api_key"
Python
from kainguru import KainguruClient

with KainguruClient(api_key="kg_your_api_key", base_url="https://api.kainguru.com/api") as client:
    submitted = client.executions.execute(
        "REAL_ESRGAN_VIDEO",
        {
          "video": "https://example.com/input.png",
          "denoise_strength": 0.5,
          "scale": 4,
          "variant": "general"
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune Real-ESRGAN Video

You can fine-tune Real-ESRGAN Video on your own data and run the tuned model through the same API. Dataset: One ZIP (at most 4 GB, 128 MB a clip, no password) with 2 to 100 pairs of a clip and the same clip exactly 4 times larger, and manifest.jsonl with one {"input", "target"} line per pair. More: Good to know, in the README.

The steps are in the docs.

Real-ESRGAN Video pricing

Price per frame: 0.002185 credits ($0.00002185). The price is shown again before every run; all prices are on the pricing page.

Licence and source

RealBasicVSR: Video Editing model on Kainguru
Video Editing

RealBasicVSR

Enlarges a real-world video 4 times, looking across frames so detail stays steady and flicker is lower than with…

Fine-tunable
Background Matting v2: Video Editing model on Kainguru
Video Editing

Background Matting v2

Cuts a person out of video precisely, hair included, when you also give a picture of the empty background from the…

Fine-tunable
Wan 2.1 VACE 1.3B: Video Editing model on Kainguru
Video Editing

Wan 2.1 VACE 1.3B

Video-editing model (Wan 2.1 VACE, 1.3B): follows a control clip, redoes a masked area or the end of a clip, or puts…

Fine-tunable
DeOldify Video: Video Editing model on Kainguru
Video Editing

DeOldify Video

Colourises black-and-white video with DeOldify's video model: plausible colour for every frame, laid over the original…

Fine-tunable
FILM: Video Editing model on Kainguru
Video Editing

FILM

Makes slow motion and higher frame rates by painting the frames between two frames, even when things move far between…

Fine-tunable
MODNet Video Matting: Video Editing model on Kainguru
Video Editing

MODNet Video Matting

Cuts people out of video with a soft alpha matte that keeps hair and fine edges, with no green screen and no…

Fine-tunable