Summary

img2prompt is an open-source AI tool by Methexis Inc. that converts images into descriptive text prompts for text-to-image models such as Stable Diffusion. It analyzes an image's content, style and details and generates a prompt that can recreate a similar-looking version of the image.

Key Features

Generates approximate text prompts from any input image
Uses OpenAI CLIP models to match the image against artists, mediums and styles
Combines CLIP results with BLIP captions to build the prompt
Prompts optimized for Stable Diffusion (CLIP ViT-L-14 for SD 1.x, ViT-H-14 for SD 2.x, ViT-bigG-14 for SDXL)
Runs on Replicate with an API for integration into other applications
Open source and self-hostable with Docker
Predictions typically complete within about 24 seconds
Runs on Nvidia T4 GPU hardware on Replicate
Pay-per-use pricing, about $0.0053 per run

About img2prompt


It is built on the CLIP Interrogator: OpenAI's CLIP models test the image against a variety of artists, mediums and styles, and the results are combined with a BLIP caption to suggest a text prompt. It is hosted on Replicate, runs on Nvidia T4 GPUs, typically completes in about 24 seconds, and is available via API or self-hosted with Docker.


img2prompt is aimed at artists, designers and developers who want to reverse-engineer prompts, explore styles or integrate image-to-prompt capability into their own workflows. Replicate hosting costs about $0.0053 per run, and the self-hosted open-source version is free.

Get more likes & reach the top of search results by adding this button on your site!

Embed button preview - Light theme
Embed button preview - Dark theme
TurboType Banner

Subscribe to the AI Search Newsletter

Get top updates in AI to your inbox every weekend. It's free!