fofr / sdxl-abstract
(Updated 1 year, 8 months ago)
- Public
- 1.5K runs
-
L40S
- SDXL fine-tune
Run fofr/sdxl-abstract 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/sdxl-abstract 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: 768,
height: 1152,
prompt: "A TOK abstract photo",
refine: "expert_ensemble_refiner",
apply_watermark: false,
num_inference_steps: 30
};
const output = await replicate.run("fofr/sdxl-abstract:a28d461dc16846310d03d12f8cbc31c5ef487356aa7b48ac1709969418768a03", { input });
for (const [index, item] of Object.entries(output)) {
await writeFile(`output_${index}.png`, item);
}
//=> output_0.png written to disk