andreasjansson / deepfloyd-if

The DeepFloyd IF model has been initially released as a non-commercial research-only model. Please make sure you read and abide to the license before using it.

  • Public
  • 2M runs
  • A100 (80GB)
  • GitHub
  • License

Run andreasjansson/deepfloyd-if 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 andreasjansson/deepfloyd-if 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: 1,
    prompt: "anime astronaut riding a horse on mars"
};

const output = await replicate.run("andreasjansson/deepfloyd-if:fb84d659df149f4515c351e394d22222a94144aa1403870c36025c8b28846c8d", { input });

import { writeFile } from "node:fs/promises";
await writeFile("output.png", output);
//=> output.png written to disk
Learn more