Skip to content

A simple demo showing how to use the Ideogram inpainting model on Replicate using Node.js.

Notifications You must be signed in to change notification settings

replicate/ideogram-inpainting-example-js

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

5 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

A simple demo showing how to use the Ideogram inpainting model on Replicate using Node.js.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published