cjwbw
/
rudalle-sr
Real-ESRGAN super-resolution model from ruDALL-E
Run cjwbw/rudalle-sr with an API
Use one of our client libraries to get started quickly.
Set the REPLICATE_API_TOKEN
environment variable
export REPLICATE_API_TOKEN=<paste-your-token-here>
Learn more about authentication
Install Replicate’s Node.js client library
npm install replicate
Run cjwbw/rudalle-sr using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
import Replicate from "replicate";
const replicate = new Replicate();
const input = {
image: "https://replicate.delivery/mgxm/a19ec501-e575-47e9-aa2c-f4153ac21dc6/out_1.png",
scale: "8"
};
const output = await replicate.run("cjwbw/rudalle-sr:32fdb2231d00a10d33754cc2ba794a2dfec94216579770785849ce6f149dbc69", { input });
import { writeFile } from "node:fs/promises";
await writeFile("output", output);
//=> output written to disk