media-processing / library
Hunyuan PromptEnhancer
Capability: Hunyuan PromptEnhancer
Use it when
- Users type short vague prompts and your text-to-image model drops subjects, styles, or layout details; you want automatic chain-of-thought rewriting into structured prompts before generation
- Your image-editing pipeline receives terse instructions like remove the watermark and you want them expanded into precise edit prompts using the input image as visual context
What it solves
Not the fit when
- end-to-end pixel generation without a downstream image model; this only rewrites prompts
- text-only chat prompt optimization; the default system prompt targets image generation and editing
- resource-constrained environments: the 7B download is about 13GB and guidance starts at 8GB memory; larger variants need roughly 20-35GB or more
- use in the European Union, United Kingdom, or South Korea, which the Tencent Hunyuan Community License excludes
- content-pipeline-stall
Install
git clone https://github.com/hunyuan-promptenhancer/PromptEnhancer && cd PromptEnhancer && pip install -r requirements.txt && huggingface-cli download tencent/HunyuanImage-2.1/reprompt --local-dir ./models/promptenhancer-7b
Invoke
from inference.prompt_enhancer import HunyuanPromptEnhancer; enhancer = HunyuanPromptEnhancer(models_root_path="./models/promptenhancer-7b", device_map="auto"); new_prompt = enhancer.predict(prompt_cot=user_prompt, temperature=0.7)
Alternatives
No reviewed alternatives recorded yet.