leonmak/svd

SVD + in-painting

Public
469 runs

Run leonmak/svd 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
Learn more about setup

Run leonmak/svd using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.

import { writeFile } from "fs/promises";
import Replicate from "replicate";
const replicate = new Replicate();

const input = {
    cond_aug: 0.01,
    image_path: "https://replicate.delivery/pbxt/JynV692sdM5PCawSFUpj3YJ5lFkBpwcKztbkMMVN9VX6A9L8/clipspace-mask-409893.90000000596.png",
    motion_bucket_id: 81
};

const output = await replicate.run("leonmak/svd:177bf7e2a7a0931c11751535d524d8e090777190a6b431f3dbab4c979433dbe2", { input });

// To access the file URL:
console.log(output.url());
//=> "https://replicate.delivery/.../output.gif"

// To write the file to disk:
await writeFile("output.gif", output);
//=> output.gif written to disk
Learn more