# pharmapsychotic/clip-interrogator

Image to prompt with BLIP and CLIP

Repository: https://github.com/pharmapsychotic/clip-interrogator
Canonical: https://ross.abutalabs.com/products/clip-interrogator
Language: Python
License: MIT
License Family: permissive
Topics: clip, pytorch
Last push: 2024-05-15T13:32:52+00:00

## Health v2 (maintenance only)
Score: 23/100 (v2, computed 2026-09-03T02:20:16.233290+00:00)
- activity 0, release rhythm 8, longevity 100
- inputs: {"age_days": 1486, "days_push": 840, "days_rel": null, "gap_med": null, "n_releases_24m": 0}
- flags: none
- formula: round(0.45*activity + 0.35*rhythm + 0.20*longevity); archived -> min(score, 10)

## Adoption (not part of the score)
Stars 2982, forks 434 (observed 2026-08-28T04:07:33.898054+00:00)

## What it is
A Python library that combines OpenAI's CLIP and Salesforce's BLIP to reverse-engineer text prompts from images, optimized for use with text-to-image models like Stable Diffusion. It is available as a pip package, Colab notebooks, HuggingFace Space, Replicate demo, and a Stable Diffusion Web UI extension.

## Use cases
- generate a text prompt from an image
- reverse-engineer prompts for stable diffusion
- find what prompt would recreate an existing image
- caption images with detailed style descriptions
- compare different CLIP models for image-to-prompt matching
- integrate image-to-prompt into a python pipeline

## When to choose
- you need to derive prompts from reference images for text-to-image generation
- you want a pip-installable library or hosted demo for image captioning with CLIP/BLIP
- you want to pick specific CLIP models like ViT-L-14/openai for Stable Diffusion versions

## When to avoid
- you need general-purpose image classification or object detection
- you need a production image captioning service with high throughput
- you don't have GPU resources and need fast inference

## Facets
- artifact type: library
- maturity: stable
- function: machine-learning, image-processing, prompt-engineering, nlp
- domain: artificial-intelligence, image-processing, large-language-models
- platform: python, cross-platform
- tags: clip, blip, stable-diffusion, text-to-image, image-captioning, pytorch, gpu

## Member repositories
- pharmapsychotic/clip-interrogator (main) score 23

## Provenance
- Observed fields: from GitHub, fetched 2026-08-28T04:07:33.898054+00:00.
- Health v2: computed from the inputs above; adoption is never an input.
- Inferred fields (summary, facets, guidance): AI-extracted, prompt v1, taxonomy v1, on 2026-08-30T07:31:28.588524+00:00, confidence not recorded.
  - readme: https://github.com/pharmapsychotic/clip-interrogator (fetched 2026-08-28T04:07:33.898054+00:00, sha 626338bbd0db)
  - registry_pypi: https://pypi.org/pypi/clip-interrogator/json (fetched 2026-08-29T09:46:31.942347+00:00, sha 1ec3ef2ffe61)
- Data as of 2026-08-30T08:39:29.467469+00:00.
