tommoore515 / material_stable_diffusion

Stable diffusion fork for generating tileable outputs

  • Public
  • 389.6K runs
  • L40S
  • GitHub
  • License

Run tommoore515/material_stable_diffusion 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 tommoore515/material_stable_diffusion 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: "Mossy Runic Bricks seamless texture, trending on artstation, stone, moss, base color, albedo, 4k"
};

const output = await replicate.run("tommoore515/material_stable_diffusion:3b5c0242f8925a4ab6c79b4c51e9b4ce6374e9b07b5e8461d89e692fd0faa449", { 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