PromptEnhancer rewrites prompts for text-to-image models while preserving original intent, producing clearer and more structured prompts that improve downstream generation quality. The project offers configurable inference parameters, published models on Hugging Face, an arXiv technical report, and evaluation datasets.
Features
- Chain-of-thought rewriting strategy (global → details → summary) to structure prompts
- Intent-preserving parsing with robust fallback strategies
- Configurable inference settings (temperature, top_p, max_new_tokens)
- Released models and datasets (e.g., PromptEnhancer-32B, T2I-Keypoints-Eval)
Use Cases
- Preprocessing step to improve prompt quality for image generation pipelines
- Creative and advertising workflows that need consistent visual outputs
- Integration into generation pipelines for more stable, higher-quality images
Technical Details
- Implementation: Python, relies on Hugging Face ecosystem and local model loading
- Models available on Hugging Face; supports
trust_remote_code
and local inference - Documentation, demos and report: https://hunyuan-promptenhancer.github.io/ and https://arxiv.org/abs/2509.04545
More: