jschoormans / lora-laagaam

  • Public
  • 133 runs
  • L40S

Run jschoormans/lora-laagaam 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
Learn more about setup

Run jschoormans/lora-laagaam 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 = {
    prompt: "a woman wearing a TOK jacket"
};

const output = await replicate.run("jschoormans/lora-laagaam:d3b9eea061eb73aa65c27accbedf44f20932e1ecdc6e1f430b6ec2695a414057", { 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
Learn more