CraterView.ai on Hugging Face and Replicate
Try Enhance and Denoise free in a Hugging Face Space, or run them from your own code on Replicate with your CraterView.ai API key. What each offers, how to use it and what it costs.
Enhance and Denoise are on two platforms besides the web app. Each has a Hugging Face Space, a page where you can try it in your browser, and a Replicate model, which you can run from your own code. Both send your photo to CraterView.ai and show you the result.
Hugging Face: try it in your browser
The Spaces are free and need no account or key:
- Enhance makes a photo up to four times larger and rebuilds its fine detail.
- Denoise takes the grain out of a photo shot in low light or at a high ISO.
To use one:
- Press Choose a photo, or pick a photo under Or try an example.
- If the photo is larger than the demo takes, an outlined part of it is used. Click the photo to move the outline to the part you want.
- In Enhance, Small face enhancement is on. It redraws small, blurry faces in the enlarged photo as a second step. A face that small is drawn to fit the photo, not recovered, and may not look like the person, so switch it off to keep the faces as Enhance leaves them.
- Press Enhance or Denoise and wait for the result. Drag the line across it to compare it with your photo, and press Download the result for the full-size file.
The Spaces run on the free community queue, which shares donated compute, so a job waits longer when the queue is busy. A Space that nobody has visited for two days takes about a minute to start. Your photo and its result are deleted from CraterView.ai once the job is done.
Replicate: run it from your code
The models are craterviewai/enhance and craterviewai/denoise. Each sends your photo to CraterView.ai under your own API key and returns the result, so you can use them wherever you already call Replicate.
You need a CraterView.ai API key, which you can make on your dashboard, and a
Replicate account. Pass the key as api_key. Replicate treats it as a secret and removes it
from the stored run once the model has it.
Enhance takes four inputs:
image: the photo.api_key: your CraterView.ai API key.scale: how many times larger the result is in each direction, from 1 to 4. It need not be a whole number, and left empty it is 4.small_faces: whether Small face enhancement runs as a second step, as in the Space. It is on unless you switch it off, and it is charged as a job of its own.
Denoise takes only image and api_key. Every other setting is left at the model’s own
default. The API and the clients offer all of
them.
From Python:
import os
import replicate
output = replicate.run(
"craterviewai/enhance",
input={
"image": open("photo.jpg", "rb"),
"api_key": os.environ["CV_API_KEY"],
"scale": 2,
},
)
# The result is one image, which Replicate sometimes returns in a list of one.
image = output[0] if isinstance(output, list) else output
print(image.url)
Each model’s page on Replicate also has a form for running it, and code for its other clients.
A run has two separate charges. CraterView.ai charges the job to your account at the prices on the pricing page, as it would through its own API. Without credit or a subscription, your jobs run free on the community queue. Replicate bills the time the run takes on its CPU, including the wait for the job.
A run waits up to 25 minutes for its result. If the job is still running then, the run fails and names the job, which carries on, is charged only if it succeeds, and can be collected through the API. Cancelling a run on Replicate ends the wait, not the job.
Which to use
- To see what Enhance or Denoise does with a photo, use the Space.
- To run them from a script or a pipeline that already uses Replicate, use the Replicate model.
- For larger photos, every setting, the other tools, or work you keep on your account, use the web app or the API.
Try it on your own file
No sign-up and no card — a workspace opens in your browser the moment you arrive.
Open Web App