---
title: "Inpainter with Stable Diffusion"
description: "Next.js application for inpainting with Stable Diffusion using the Replicate API."
url: "https://vercel.com/templates/next.js/inpainter-stable-diffusion"
links:
  repository: "https://github.com/replicate/inpainter"
  demo: "https://inpainter.vercel.app/"
  deploy: "https://vercel.com/new/clone?demo-title=Inpainter+with+Stable+Diffusion&demo-description=Next.js+application+for+inpainting+with+Stable+Diffusion+using+the+Replicate+API.&demo-url=https%3A%2F%2Finpainter.vercel.app%2F&demo-image=%2F%2Fimages.ctfassets.net%2Fe5382hct74si%2FBHQac6GdSOrGw5xvKBdcR%2F2f0613991a93e5e8f6bc53a434c1f5f7%2FCleanShot_2022-12-09_at_13.19.13.png&project-name=Inpainter+with+Stable+Diffusion&repository-name=inpainter-stable-diffusion&repository-url=https%3A%2F%2Fgithub.com%2Freplicate%2Finpainter&from=templates&skippable-integrations=1&env=REPLICATE_API_TOKEN&envDescription=Create+a+Replicate+API+Token+here%3A&envLink=https%3A%2F%2Freplicate.com%2Faccount"
---

# Inpainter with Stable Diffusion

Next.js application for inpainting with Stable Diffusion using the Replicate API.

# 🎨 Inpainter

A web GUI for inpainting with [Ideogram v2](https://replicate.com/ideogram-ai/ideogram-v2) and [Ideogram v2 Turbo](https://replicate.com/ideogram-ai/ideogram-v2-turbo) using the Replicate API.

Try it out at [inpainter.app](https://inpainter.app)

https://user-images.githubusercontent.com/2289/188992670-3dc9db47-fb8e-45c1-85ee-afc850009c48.mp4

## How it works

🐢🚀 This is a Node.js app! It's powered by:

- [Replicate](https://replicate.com/), a platform for running machine learning models in the cloud.
- [Ideogram v2](https://replicate.com/ideogram-ai/ideogram-v2) and [Ideogram v2 Turbo](https://replicate.com/ideogram-ai/ideogram-v2-turbo), advanced text-to-image generation models.
- Next.js [server-side API routes](https://github.com/replicate/inpainter/tree/main/pages/api) for talking to the Replicate API
- Next.js React components for the inpainting GUI
- [Tailwind CSS](https://tailwindcss.com/) for styling
- [Lucide](https://lucide.dev/) for Icons

## Development

Prerequisites:

1. Recent version of Node.js
2. [Replicate API token](https://replicate.com/account/api-tokens)


Set your Replicate API token in your environment:

```
REPLICATE_API_TOKEN=<your-token-here>
```

Then install dependencies and run the server:

```sh
npm install
npm run dev
```

Open [http://localhost:3000](http://localhost:3000)

## Related Templates

### [Alt Text Generator](https://vercel.com/templates/next.js/ai-alt-text-generator)

Generate descriptions for your images using AI.

### [Dall-E 2 AI Art Generator](https://vercel.com/templates/next.js/dall-e)

Dall-E 2 frontend using Upstash for message queue + Redis.

---

## Additional documentation

The [Vercel Knowledge Base](https://vercel.com/kb) contains guides and answers to common questions about Vercel, including deployment, framework configuration, domains, caching, and troubleshooting.
