alexgenovese / flux-outpainting

Flux.1-Dev + Hyper + Inpainting Beta

  • Public
  • 266 runs
  • L40S
  • GitHub
Iterate in playground

Input

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

npx create-replicate --model=alexgenovese/flux-outpainting
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";

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

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

const output = await replicate.run(
  "alexgenovese/flux-outpainting:efce3edc0c02d7f7f6c4a2a3a66fb4bea4e96c0aaac4e84ba2fd4cedadb2364f",
  {
    input: {
      width: 720,
      height: 1280,
      alignment: "Middle",
      prompt_input: "",
      overlap_width: 72,
      resize_option: "Full",
      custom_resize_size: "50",
      num_inference_steps: 8
    }
  }
);

// 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

About

This endpoint is a Cog implementation for exploring Flux.1-Dev, Hyper, and Inpainting Beta. I upgraded the code with additional technical features to generate the image better and avoid weird results.

Reach out to me if you need customizations.

Follow me on Twitter/X | Website

License & Commercial Use

The code in this repository is licensed under the Apache-2.0 License.

Flux Dev falls under the FLUX.1 [dev] Non-Commercial License.

FLUX.1 [dev] fine-tuned weights and their outputs are non-commercial by default, but can be used commercially when running on Replicate.

You can use the images commercially if you generate images on Replicate with FLUX.1 models and their fine tunes.

If you download the weights off Replicate and generate images on your computer, you can’t use the images commercially.