Analysis updated 2026-07-03
Improve AI-generated images by automatically rewriting a rough text description into a more detailed, structured prompt before sending it to a generation model.
Enhance an image editing instruction by providing both the instruction and an existing image so the tool sharpens the description using the image's visual content.
Try prompt enhancement without any code by using the Gradio web demo on Hugging Face Spaces.
| hunyuan-promptenhancer/promptenhancer | dataelement/clawith | ganymedenil/document.ai | |
|---|---|---|---|
| Stars | 3,677 | 3,677 | 3,675 |
| Language | Python | Python | Python |
| Setup difficulty | hard | moderate | moderate |
| Complexity | 3/5 | 4/5 | 3/5 |
| Audience | researcher | developer | developer |
Figures from each repo's GitHub metadata at analysis time.
Requires a GPU with at least 8GB of memory for the 7B model, models must be downloaded from Hugging Face before use.
PromptEnhancer is a Python tool from Tencent Hunyuan that rewrites text descriptions before sending them to AI image generation systems. When you want to create an image with an AI tool, the quality of the result depends heavily on how clearly and specifically you describe what you want. PromptEnhancer takes a short or loosely worded description, analyzes it, and produces a more structured and detailed version that tends to yield better images from generation models. The tool has two modes. In text-to-image mode, it takes a written prompt and rewrites it into a clearer, more detailed form while keeping the original intent. In image-to-image mode, it also accepts an existing image alongside a written instruction, and it uses the visual content of that image to sharpen the editing instruction before it is passed to a generation model. Two model sizes are available. The 7B model, which requires about 8 gigabytes of GPU memory and weighs 13 gigabytes to download, is the recommended starting point for most users. The 32B model offers higher output quality but needs at least 32 gigabytes of GPU memory and 64 gigabytes of storage. For users with less memory, quantized versions of the 32B model are also available at 20, 27, and 35 gigabytes, with the quality degrading only slightly at the smaller sizes. Installation uses pip with a requirements file. Models are downloaded from Hugging Face using their command-line tool. The Python API for using the enhancer is straightforward: you initialize it with a model path, call a predict method with your prompt, and receive the rewritten version as a string. Both Chinese and English prompts are accepted. The project was accepted to CVPR 2026 and includes a benchmark dataset called T2I-Keypoints-Eval for measuring how well prompt rewriting improves image generation results. A Gradio web demo is available on Hugging Face Spaces for trying it without writing any code.
A Python tool from Tencent that rewrites your short or vague image descriptions into detailed, structured prompts so AI image generators produce better results.
Mainly Python. The stack also includes Python, PyTorch.
License details not mentioned in the explanation.
Setup difficulty is rated hard, with roughly 1h+ to a first successful run.
Mainly researcher.
This repo across BitVibe Labs
Verify against the repo before relying on details.