ltejedor / cmf

Stable Diffusion model fine-tuned on Color, Material, and Finish samples

  • Public
  • 196 runs
  • L40S
  • SDXL fine-tune
Iterate in playground

Run ltejedor/cmf 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 ltejedor/cmf 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 = {
    width: 512,
    height: 512,
    prompt: "a chair made of marble, glossy finish, in the style of TOK",
    num_outputs: 3
};

const output = await replicate.run("ltejedor/cmf:3af83ef60d86efbf374edb788fa4183a6067416e2fadafe709350dc1efe37d1d", { input });
for (const [index, item] of Object.entries(output)) {
  await writeFile(`output_${index}.png`, item);
}
//=> output_0.png, output_1.png, output_2.png written to disk
Learn more