usamaehsan / flux-controlnet

  • Public
  • 8 runs
Iterate in playground

Input

Run this model in Node.js with one line of code:

npx create-replicate --model=usamaehsan/flux-controlnet
or set up a project from scratch
npm install replicate
Set the REPLICATE_API_TOKEN environment variable:
export REPLICATE_API_TOKEN=<paste-your-token-here>

Find your API token in your account settings.

Import and set up the client:
import Replicate from "replicate";
import fs from "node:fs";

const replicate = new Replicate({
  auth: process.env.REPLICATE_API_TOKEN,
});

Run usamaehsan/flux-controlnet using Replicate’s API. Check out the model's schema for an overview of inputs and outputs.

const output = await replicate.run(
  "usamaehsan/flux-controlnet:1402751f4ebd1b5e318955a8d69d79716b2772ecab463f739bee3cb8ecf8fab9",
  {
    input: {
      steps: 8,
      prompt: "A girl in city, 25 years old, cool, futuristic",
      widthh: 0,
      heightt: 0,
      guidance_scale: 3.5,
      controlnet_type: "canny",
      control_strength: 0.6,
      realism_lora_weight: 0,
      hyperflex_lora_weight: 0.125,
      add_details_lora_weight: 0
    }
  }
);

// To access the file URL:
console.log(output.url()); //=> "http://example.com"

// To write the file to disk:
fs.writeFile("my-image.png", output);

To learn more, take a look at the guide on getting started with Node.js.

Output

No output yet! Press "Submit" to start a prediction.

Run time and cost

This model runs on Nvidia L40S GPU hardware. We don't yet have enough runs of this model to provide performance information.

Readme

This model doesn't have a readme.