{"id":19815927,"url":"https://github.com/replicate/ideogram-inpainting-example-js","last_synced_at":"2025-09-18T06:32:33.619Z","repository":{"id":259515642,"uuid":"878060532","full_name":"replicate/ideogram-inpainting-example-js","owner":"replicate","description":"A simple demo showing how to use the Ideogram inpainting model on Replicate using Node.js.","archived":false,"fork":false,"pushed_at":"2024-10-24T18:02:24.000Z","size":69,"stargazers_count":9,"open_issues_count":0,"forks_count":0,"subscribers_count":3,"default_branch":"main","last_synced_at":"2025-01-05T22:06:38.851Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"JavaScript","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":null,"status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/replicate.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":null,"code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2024-10-24T17:55:26.000Z","updated_at":"2024-12-07T12:33:26.000Z","dependencies_parsed_at":"2024-10-26T05:56:54.457Z","dependency_job_id":"02465ee7-2b34-44f8-a13c-5f2e8123f659","html_url":"https://github.com/replicate/ideogram-inpainting-example-js","commit_stats":null,"previous_names":["replicate/ideogram-inpainting-example-js"],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fideogram-inpainting-example-js","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fideogram-inpainting-example-js/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fideogram-inpainting-example-js/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/replicate%2Fideogram-inpainting-example-js/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/replicate","download_url":"https://codeload.github.com/replicate/ideogram-inpainting-example-js/tar.gz/refs/heads/main","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":233456045,"owners_count":18678965,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2024-11-12T10:07:44.134Z","updated_at":"2025-09-18T06:32:28.286Z","avatar_url":"https://github.com/replicate.png","language":"JavaScript","funding_links":[],"categories":[],"sub_categories":[],"readme":"# Ideogram inpainting\n\nThis simple demo shows you how to use the [Ideogram V2 inpainting model](https://replicate.com/blog/ideogram-v2-inpainting) on Replicate using Node.js.\n\n![inpainting](https://github.com/user-attachments/assets/2618ebc3-66fc-4d9b-9399-fcd57d07835a)\n\n## What is inpainting?\n\nInpainting 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.\n\nTo inpaint an image, you need:\n\n1. A starting image that you want to change. (See [duck.jpg](duck.jpg))\n2. 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](mask.png))\n3. A text prompt that describes the changes you want to see.\n\n\n## Usage\n\nTo run this demo, you'll need to have [Node.js](https://nodejs.org) installed.\n\nCreate a [Replicate API token](https://replicate.com/account/api-tokens) and add it to your environment variables:\n\n```sh\nexport REPLICATE_API_TOKEN=r8_...\n```\n\nThen, install the dependencies and run the script:\n\n```sh\nnpm install\nnode index.js\n```\n\nThis will:\n\n- Run the model with Replicate's cloud API\n- Save the output image to `output.png`\n- Open the output image in your default image viewer\n\n## See also\n\n- [replicate.com/ideogram-ai/ideogram-v2-turbo](https://replicate.com/ideogram-ai/ideogram-v2-turbo) - Turbo version of the model\n- [replicate.com/ideogram-ai/ideogram-v2](https://replicate.com/ideogram-ai/ideogram-v2) - Full version of the model\n- [Ideogram v2 inpainting on Replicate](https://replicate.com/blog/ideogram-v2-inpainting) - blog post announcing Ideogram v2 inpainting on Replicate\n- [Replicate Playground](https://replicate.com/playground) - Web-based tool for inpainting images right on replicate.com\n- [Inpainter.app](https://github.com/replicate/inpainter) - Open-source Next.js app for inpainting images\n- [Outpainter.app](https://github.com/replicate/outpainter) - Open-source Nuxt.js app for extending images beyond their original canvas\n- [Inpainting with Stable Diffusion](https://replicate.com/docs/guides/stable-diffusion/inpainting) - an older guide, but still useful.","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicate%2Fideogram-inpainting-example-js","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Freplicate%2Fideogram-inpainting-example-js","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Freplicate%2Fideogram-inpainting-example-js/lists"}