Skip to content

Latest commit

 

History

History
49 lines (32 loc) · 2.15 KB

README.md

File metadata and controls

49 lines (32 loc) · 2.15 KB

Ideogram inpainting

This simple demo shows you how to use the Ideogram V2 inpainting model on Replicate using Node.js.

inpainting

What is inpainting?

Inpainting is like an AI-powered erasing and painting tool. You can use it to remove unwanted objects from an image, or change parts of an image to create something new.

To inpaint an image, you need:

  1. A starting image that you want to change. (See duck.jpg)
  2. A mask image that describes which parts of the image you want to inpaint. Black areas are inpainted and white areas are left unchanged. (See mask.png)
  3. A text prompt that describes the changes you want to see.

Usage

To run this demo, you'll need to have Node.js installed.

Create a Replicate API token and add it to your environment variables:

export REPLICATE_API_TOKEN=r8_...

Then, install the dependencies and run the script:

npm install
node index.js

This will:

  • Run the model with Replicate's cloud API
  • Save the output image to output.png
  • Open the output image in your default image viewer

See also