lucataco
/
ip-adapter-faceid
(Research only) IP-Adapter-FaceID can generate various style images conditioned on a face with only text prompts
Run lucataco/ip-adapter-faceid 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 lucataco/ip-adapter-faceid using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.
import Replicate from "replicate";
const replicate = new Replicate();
const input = {
seed: 2212213399,
face_image: "https://replicate.delivery/pbxt/K5DSwf3aUzIpS4srbRhNQkESybPovfXwEfjIuDMj3Dz86tDV/demo.png",
negative_prompt: "monochrome, lowres, bad anatomy, worst quality, low quality, blurry, multiple people",
agree_to_research_only: true
};
const output = await replicate.run("lucataco/ip-adapter-faceid:fb81ef963e74776af72e6f380949013533d46dd5c6228a9e586c57db6303d7cd", { input });
import { writeFile } from "node:fs/promises";
for (const [index, item] of Object.entries(output)) {
await writeFile(`output_${index}.png`, item);
}
//=> output_0.png written to disk