Skip to content
← AI Tools

AI Image to Prompt

Drop any image, get a descriptive caption or Stable Diffusion-style prompt. ViT-GPT2 captioning runs entirely in your browser — no upload, no API key.

AI Image to Prompt

Drop any image, get a descriptive caption or Stable Diffusion-style prompt. ViT-GPT2 captioning runs entirely in your browser — no upload, no API key.

Why an AI Tool That Runs In Your Browser

Image-to-prompt tools are usually pitched at people running diffusion models locally and want a starting prompt for img2img or for fine-tuning. They are also useful for accessibility (writing alt text at scale), content auditing, and any workflow where you need a quick text description of a pile of images. Most hosted versions of this functionality require uploading your image to a third-party API. For unreleased designs, internal mockups, watermarked client work, or any sensitive image, that is a real problem. This tool uses a ViT-GPT2 captioning model (nlpconnect/vit-gpt2-image-captioning: a Vision Transformer image encoder with a GPT-2 text decoder, trained for captioning on the COCO dataset), released under the Apache 2.0 license and run in your browser with transformers.js; the browser files are Xenova's ONNX conversion. The model writes a short factual caption; the tool can wrap it with neutral quality tokens so it works as a starting prompt for Stable Diffusion, Midjourney or another image generator.

How AI Image to Prompt Works

Click Load model on first visit. The browser downloads the model (about 248 MB of 8-bit quantized files) from Hugging Face and keeps it in Cache Storage. Drop or pick an image. Two output modes are available: Caption gives the plain description, and SD prompt adds quality tokens ("detailed, professional photography, sharp focus, high quality"). In our test in desktop Chromium (October 2026) the model loaded in 20 seconds and captioned a photo of an orange cat in 9 seconds: "a cat is sitting on a sidewalk".

Captions are short, usually under 15 words, and cover the main subject and setting. The model misses fine detail such as exact colours, text in the image, brands or the number of small objects, and can get things wrong, so read the caption before using it as alt text. Larger captioning models (BLIP-2, LLaVA) write longer, more accurate descriptions but are too big to run comfortably in a browser.

Frequently Asked Questions

How big is the model download?+
About 248 MB: the 8-bit quantized image encoder (87.5 MB) and text decoder (158.6 MB) plus the tokenizer, downloaded once from Hugging Face and then cached by your browser.
Are uploaded images sent to a server?+
No. Only the model files are downloaded. Every caption is generated in your browser; the image stays on your device and is not sent to us, to Hugging Face or to any other service.
Which captioning model powers this tool and under what license?+
nlpconnect/vit-gpt2-image-captioning, a Vision Transformer encoder with a GPT-2 decoder trained for captioning on COCO, released under the Apache 2.0 license, which allows commercial use. The browser files are Xenova's ONNX conversion. Until October 2026 this page pointed at a BLIP model whose browser files are not publicly available, so the tool could not load; it now uses ViT-GPT2.
How long are the generated captions?+
Short: usually under 15 words covering the main subject and setting. For a longer description, edit the caption by hand or expand it with a text tool.
How do caption mode and SD prompt mode differ?+
Caption mode returns the model's description as it is. SD prompt mode adds neutral quality tokens (detailed, professional photography, sharp focus, high quality) so the text can be pasted into Stable Diffusion or Midjourney as a starting prompt.
What image formats and sizes work?+
Any image your browser can open, such as PNG, JPEG, WebP or GIF (first frame). The model resizes every image to 224 by 224 pixels, so a larger image does not give a more detailed caption; crop to the part you want described.
Why does the caption sometimes miss important details?+
The model is small and sees the image at 224 by 224 pixels, so it describes the main subject and setting and often misses colours, text, brands and small objects; it can also be plainly wrong. Check the caption against the image, and add the details you care about by hand.
Can I use the output prompts commercially?+
The model is Apache 2.0, which allows commercial use, and the captions it writes are yours to use. Whether an image generated from that prompt can be used commercially depends on the image generator's own terms.

Built by Derek Giordano · Part of Ultimate Design Tools

Privacy Policy · Terms of Service