asiryan/counterfeit-xl-v2
Run asiryan/counterfeit-xl-v2 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 asiryan/counterfeit-xl-v2 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 = {
prompt: "cute style, 1girl, solo, blush, white shirt, green eyes, hair between eyes, hands up, white gloves, butterfly, looking at viewer, short sleeves, green skirt, interlocked fingers, animal ears, light brown hair, hair flower, white flower, white bow, own hands together, center frills, upper body, covered mouth",
strength: 1
};
const output = await replicate.run("asiryan/counterfeit-xl-v2:ecf81c8a283dee9629e20c782e1874f876be52cb0b207873cdde873209c4a172", { input });
// To access the file URLs:
console.log(output[0].url());
//=> "https://replicate.delivery/.../output_0.png"
// To write the files to disk:
for (const [index, item] of Object.entries(output)) {
await writeFile(`output_${index}.png`, item);
}
//=> output_0.png written to disk