Readme
Sorry for wasting your time, folks! this is just a fork of https://replicate.com/viktorfa/oot_diffusion_with_mask
Don't mind me :) this is just a fork of viktorfa/oot_diffusion_with_mask
Run this model in Node.js with one line of code:
npm install replicate
REPLICATE_API_TOKEN
environment variable:export REPLICATE_API_TOKEN=<paste-your-token-here>
Find your API token in your account settings.
import Replicate from "replicate";
import fs from "node:fs";
const replicate = new Replicate({
auth: process.env.REPLICATE_API_TOKEN,
});
Run jbilcke/oot_diffusion_with_mask using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
const output = await replicate.run(
"jbilcke/oot_diffusion_with_mask:26537c045ccf18d3d135dd6d35303c2db452a3d05d02111a82d6b4cba2210259",
{
input: {
seed: 0,
steps: 20,
model_image: "https://raw.githubusercontent.com/viktorfa/oot_diffusion/main/oot_diffusion/assets/model_1.png",
num_samples: 1,
person_mask: "https://raw.githubusercontent.com/viktorfa/oot_diffusion/main/oot_diffusion/assets/model_1_mask.png",
garment_image: "https://raw.githubusercontent.com/viktorfa/oot_diffusion/main/oot_diffusion/assets/cloth_1.jpg",
guidance_scale: 2
}
}
);
// To access the file URL:
console.log(output[0].url()); //=> "http://example.com"
// To write the file to disk:
fs.writeFile("my-image.png", output[0]);
To learn more, take a look at the guide on getting started with Node.js.
No output yet! Press "Submit" to start a prediction.
This model runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.
Sorry for wasting your time, folks! this is just a fork of https://replicate.com/viktorfa/oot_diffusion_with_mask