fofr
/
ays-text-to-image
Uses 'Align your steps' for faster higher quality images
Run fofr/ays-text-to-image 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 fofr/ays-text-to-image 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 = {
width: 1156,
height: 768,
prompt: "a beautiful portrait photo of a cat",
checkpoint: "ProteusV0.4.safetensors"
};
const output = await replicate.run("fofr/ays-text-to-image:a004c3ac8f62ac95a90b5a0c264beb47b66a6d1f8141b76fb27cd90e9a8bfe8e", { input });
import { writeFile } from "node:fs/promises";
for (const [index, item] of Object.entries(output)) {
await writeFile(`output_${index}.webp`, item);
}
//=> output_0.webp written to disk