jichengdu / flux-pulid
PuLID-FLUX-v0.9.0
Run jichengdu/flux-pulid 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 jichengdu/flux-pulid 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 = {
main_face_image: "https://replicate.delivery/pbxt/Me8PvHwdoSXGlm8jtoxY2yHT254b6dV9EzWMLp29RjlGqT5E/43.jpg"
};
const output = await replicate.run("jichengdu/flux-pulid:ca0b96aa9f0d0a0a7962a727377806215df25a517865e5f6949f24a26c24d2a6", { input });
for (const [index, item] of Object.entries(output)) {
await writeFile(`output_${index}.webp`, item);
}
//=> output_0.webp written to disk