img2prompt - AI Image Tools Tool

Overview

img2prompt is an open-source image‑to‑prompt tool published on Replicate that extracts approximate text prompts (including style and artist tokens) from input images, optimized for Stable Diffusion workflows using a ViT‑L/14 CLIP backbone. The hosted model combines CLIP ranking of style/artist tokens with BLIP captioning to produce a compact prompt users can paste into Stable Diffusion or other text‑to‑image pipelines. The Replicate deployment reports millions of runs, low per‑run cost, and T4 GPU execution for cloud use, while the underlying implementation is derived from the CLIP Interrogator project so it can also be run locally. ([replicate.com](https://replicate.com/methexis-inc/img2prompt/)) Practically, img2prompt is used as a prompt‑engineering accelerator: it suggests media, lighting, camera, and artist descriptors and a caption-like core that designers and generative artists iterate on. The upstream CLIP Interrogator repository documents configurable clip_model_name, low‑VRAM modes, and BLIP integration (so users can tune for VRAM, beam/decoding settings, or custom label lists). For programmatic use, the Replicate Python client or HTTP API can call the model directly (image file or public URL inputs). ([github.com](https://github.com/pharmapsychotic/clip-interrogator))

Key Features

  • Generates Stable Diffusion‑ready prompts with style, artist, and medium tokens.
  • Combines CLIP ranking (ViT‑L/14) with BLIP captioning for richer descriptions.
  • Hosted on Replicate (Nvidia T4) with low per‑run cost and an API endpoint.
  • Open‑source lineage (CLIP Interrogator) with MIT licensing and local run options.
  • Configurable/low‑VRAM modes to run on machines with ~3GB VRAM.

Example Usage

Example (python):

import replicate

# Authenticate by setting REPLICATE_API_TOKEN in your environment.
# Run the hosted img2prompt model with a local image file.
output = replicate.run(
    "methexis-inc/img2prompt",
    input={"image": open("/path/to/image.jpg", "rb")}
)

# output is typically a list/strings containing the generated prompt(s)
print(output)

# See Replicate docs for async/webhook usage and file/URL input options. ([replicate.com](https://replicate.com/docs/get-started/python?utm_source=openai))

Pricing

Replicate lists an approximate hosted cost of $0.0065 per run for methexis-inc/img2prompt (varies by input size and runtime). The model is open‑source and can be run locally to avoid hosted fees. ([replicate.com](https://replicate.com/methexis-inc/img2prompt/))

Benchmarks

Total public runs (Replicate): 2.7M runs (Source: https://replicate.com/methexis-inc/img2prompt)

Typical prediction latency (hosted): ~29 seconds (median/typical) (Source: https://replicate.com/methexis-inc/img2prompt)

Approximate cost per run (hosted): $0.0065 per run (Replicate estimate; varies by input) (Source: https://replicate.com/methexis-inc/img2prompt)

Upstream repository stars (CLIP Interrogator): ≈2.9k stars (pharmapsychotic/clip-interrogator) (Source: https://github.com/pharmapsychotic/clip-interrogator)

VRAM usage (default / low‑VRAM): ≈6.3 GB default, ≈2.7 GB low‑VRAM (Source: https://github.com/pharmapsychotic/clip-interrogator)

Last Refreshed: 2026-01-09

Key Information

  • Category: Image Tools
  • Type: AI Image Tools Tool