LDSR

LDSR

Enlarges a small picture 4 times with latent diffusion, drawing in new plausible detail. A creative upscale: richer than the faithful upscalers, slower, and not exact.

Image Editingsuper-resolutionupscalingdiffusioncreative-upscaleapache-2.0Fine-tunable
LDSR: Image Editing model on Kainguru

About LDSR

Capabilities

  • 4x larger — the result is 4 times the width and height of the picture you send
  • Adds detail — a diffusion model draws in textures and fine structure the small picture does not contain
  • Repeatable — the same seed and inputs give the same picture; the steps trade speed for finish
  • Fine-tunable — train it on your own pairs of small and 4x larger pictures

Good to know

  • Pictures are PNG, JPEG or WebP, at most 50 MB, at least 16 pixels a side and at most 65,536 pixels (for example 256 x 256): the model works in tiles of 128 pixels, each denoised from scratch, so large pictures take minutes.
  • The new detail is invented, not recovered: faces, text and small structures can come out different from the original. Use a faithful upscaler such as SWINIR when exactness matters.
  • Steps (10 to 100, default 50) are the denoising steps of every tile; the seed, when you give one, makes the result repeatable.
  • Fine-tuning takes one ZIP (at most 4 GB, no password) with 4 to 1000 pairs and a manifest.jsonl holding one {"input": "...", "target": "..."} line per pair, paths relative to the manifest. Each target is exactly 4 times its input's width and height; inputs are at least 64 pixels a side.
  • Training stops after the steps you ask for or after 9 hours, whichever comes first, and keeps what it has learned.

LDSR inputs and output

NameTypeRequiredDefaultDetails
imagefileYes—The picture to enlarge: PNG, JPEG or WebP, at most 50 MB, at least 16 pixels a side and at most 65536 pixels in all (for example 256 x 256); the result is 4 times as wide and as tall.
1–2048 characters · image/png, jpeg, webp
stepsintegerNo50Denoising steps for every tile: more is finer and slower.
10–100
scaleintegerNo4How many times wider and taller the result is.
Allowed: 4 · 4–4
seedintegerNo—The same seed and inputs give the same picture. Leave empty for a random seed.
0–2147483647

Output. Returns PNG image: The enlarged picture as a PNG, scale times the width and height of the input.

Run LDSR 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=LDSR" \
  -H "X-API-Key: kg_your_api_key" \
  -H "Content-Type: application/json" \
  -d '{
  "input": {
    "image": "https://example.com/input.png",
    "scale": 4,
    "steps": 50
  },
  "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(
        "LDSR",
        {
          "image": "https://example.com/input.png",
          "scale": 4,
          "steps": 50
        },
        output_format="json",
    )
    result = client.executions.await_completion(submitted.id)
    print(result.execution.output)

Fine-tune LDSR

You can fine-tune LDSR on your own data and run the tuned model through the same API. Dataset: One ZIP (at most 4 GB, no password) with 4 to 1000 pairs of a low-resolution picture and the same picture exactly scale 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.

LDSR pricing

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

Licence and source

Swin2SR: Image Editing model on Kainguru
Image Editing

Swin2SR

Enlarges a JPEG-compressed photo 4 times in width and height and removes its blocky compression artefacts as it does.

Fine-tunable
SwinIR: Image Editing model on Kainguru
Image Editing

SwinIR

Enlarges real-world photos 2 or 4 times in width and height and cleans up the blur, noise and compression they carry.

Fine-tunable
waifu2x: Image Editing model on Kainguru
Image Editing

waifu2x

Enlarges illustrations, anime and photos 2 or 4 times and can remove JPEG noise as it does. Three styles: art, photo…

Fine-tunable
Kandinsky 2 2 Img2img: Image Editing model on Kainguru
Image Editing

Kandinsky 2 2 Img2img

Kandinsky 2.2 restyles a photo from a text prompt and keeps its layout; the strength sets how far the result moves…

Qwen-Image-Edit-2509: Image Editing model on Kainguru
Image Editing

Qwen-Image-Edit-2509

Edit a picture from a written instruction, changing objects, people, text or style while keeping the rest consistent.

Fine-tunable
Kandinsky 2 2 Inpaint: Image Editing model on Kainguru
Image Editing

Kandinsky 2 2 Inpaint

Kandinsky 2.2 inpainting: paints the masked part of a photo from a text prompt and leaves the rest untouched.