DeOldify

DEOLDIFY

Colourises old black-and-white photos in two styles: artistic, with bolder colours, or stable, calmer and more natural. Each photo keeps its own light and shade; only the colour is new.

Image Editingcolourisationcolorizationphoto-restorationold-photosmitFine-tunable
DeOldify: Image Editing model on Kainguru

About DeOldify

Capabilities

  • Two styles — artistic for vivid, daring colour, stable for realistic landscapes and portraits, chosen per request
  • Full size — the result has the photo's own size and keeps all of its detail: only the colour is new
  • Render factor — trade stability for vividness: the colours are worked out on a 16 x factor pixel square, 35 by default
  • Fine-tunable — teach either style the colours of your own collection with pairs of black-and-white and colour photos

Good to know

  • Photos are PNG, JPEG or WebP, at most 50 MB and 16.8 megapixels, at least 16 pixels a side. A colour photo works too: its colours are replaced.
  • The colours are worked out on a square copy of the photo (560 x 560 pixels at the default render factor of 35) and laid over the full-size original. Higher render factors, up to 45, are more vivid but less stable.
  • Fine-tuning takes one ZIP (at most 4 GB, no password) with 4 to 1000 pairs of a photo and its colour version, the same size and at least 192 pixels a side, and a manifest.jsonl holding one {"input": "...", "target": "..."} line per pair, paths relative to the manifest. A colour photo can be its own input. A fine-tune trains one style, the one named in its parameters; the fine-tuned model colours in that style.
  • Training works on 192 x 192 crops and stops after the steps you ask for or after 9 hours, whichever comes first, keeping what it has learned.
  • Fine-tuning is the generator stage of DeOldify's own training recipe (pixel and feature losses) without its adversarial stage, so a fine-tuned model's colours can look calmer than the original's; more pairs with the colours you want help.

Attribution

DeOldify by Jason Antic (github.com/jantic/DeOldify), Copyright (c) 2018 Jason Antic, MIT License. The two generators are the authors' released weights, fetched from a Hugging Face copy (spensercai/DeOldify, linked above) whose files are identical to the authors' own downloads.

DeOldify inputs and output

NameTypeRequiredDefaultDetails
imagefileYes—The black-and-white or faded photo: PNG, JPEG or WebP, at most 50 MB and 16.8 megapixels, at least 16 pixels a side. Its colours, if any, are replaced.
1–2048 characters · image/png, jpeg, webp
styletextNoartisticartistic: bolder, more vivid colours. stable: calmer, more natural colours, best for landscapes and portraits.
Allowed: artistic, stable
render_factorintegerNo35Size the colours are worked out at: 16 times this many pixels square. Higher is more vivid but less stable.
7–45

Output. Returns PNG image: The colourised photo as a PNG of the same size.

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

Fine-tune DeOldify

You can fine-tune DeOldify 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 photo and its colour version, the same size (a colour photo can be its own input), and manifest.jsonl with one {"input", "target"} line per pair.

The steps are in the docs.

DeOldify 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

DDColor: Image Editing model on Kainguru
Image Editing

DDColor

Colourises black-and-white and faded photos: it keeps each photo's own light and shade and adds natural colours.

Fine-tunable
HVI-CIDNet: Image Editing model on Kainguru
Image Editing

HVI-CIDNet

Brightens dark and low-light photos and restores their colour, lifting the shadows without washing out the highlights…

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

InstructIR

Restores a photo by following a sentence in plain English, such as remove the noise, take the rain out, fix the blur…

Fine-tunable
OmniGen v1: Image Editing model on Kainguru
Image Editing

OmniGen v1

Edits a picture from a plain-language instruction with OmniGen v1 (3.8B, MIT): add, remove or change objects, people…

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…