Run this model with HF Jobs

Run PromptEnhancer/PromptEnhancer-32B on Hugging Face's managed compute, monitor its progress, and retrieve the results when it's done.

Paste one of these prompts into your coding agent:

Fine-tune on my dataset

Use HF Jobs and TRL to fine-tune https://huggingface.co/PromptEnhancer/PromptEnhancer-32B. Ask me which dataset to train on, then push the fine-tuned model to a new model repo. Run `hf jobs --help` first to learn the CLI.

Run batch inference

Use HF Jobs to run batch inference with https://huggingface.co/PromptEnhancer/PromptEnhancer-32B on the inputs in a mounted HF Bucket. Ask me which Bucket to use, then write the outputs back to it and keep each input ID. Run `hf jobs --help` first to learn the CLI.

Evaluate on a benchmark

Use HF Jobs to evaluate https://huggingface.co/PromptEnhancer/PromptEnhancer-32B. Ask me which benchmark to run, then save the scores and the per-example results to a new dataset repo. Run `hf jobs --help` first to learn the CLI.

Quantize for lower memory use

Use HF Jobs to create a 4-bit version of https://huggingface.co/PromptEnhancer/PromptEnhancer-32B. Push it to a new model repo, then reload it from there and report its memory footprint. Run `hf jobs --help` first to learn the CLI.

PromptEnhancerV2 (32B)

PromptEnhancerV2 is a multimodal language model fine-tuned for text-to-image prompt enhancement and rewriting. It restructures user input prompts while preserving the original intent, producing clearer, layered, and logically consistent prompts suitable for downstream image generation tasks.

Model Details

Model Description

PromptEnhancerV2 is a specialized text-to-image prompt rewriting model that employs chain-of-thought reasoning to enhance user prompts.

  • Model type: Vision-Language Model for Prompt Enhancement
  • Language(s) (NLP): Chinese (zh), English (en)
  • License: Apache-2.0
  • Finetuned from model: Qwen/Qwen2.5-VL-32B-Instruct

Model Sources

How to Get Started with the Model

  • 1. Clone the repository::
git clone https://github.com/ximinng/PromptEnhancer.git
cd PromptEnhancer
pip install -r requirements.txt
  • 2. Model Download:
huggingface-cli download PromptEnhancer/PromptEnhancer-32B --local-dir ./models/promptenhancer-32b
  • 3. Use the model:
from inference.prompt_enhancer_v2 import PromptEnhancerV2

# Initialize the model
models_root_path = "./models/promptenhancer-32b"
enhancer = PromptEnhancerV2(models_root_path=models_root_path, device_map="auto")

# Enhance a prompt (Chinese or English)
user_prompt = "韩系插画风女生头像,粉紫色短发+透明感腮红,侧光渲染。"
enhanced_prompt = enhancer.predict(
    prompt_cot=user_prompt,
    device="cuda"
)

print("Enhanced:", enhanced_prompt)

Evaluation

The model is evaluated on the T2I-Keypoints-Eval dataset, which contains diverse text-to-image prompts across various categories and languages.

Citation

If you find this model useful, please consider citing:

BibTeX:

@article{promptenhancer,
  title={PromptEnhancer: A Simple Approach to Enhance Text-to-Image Models via Chain-of-Thought Prompt Rewriting},
  author={Wang, Linqing and Xing, Ximing and Cheng, Yiji and Zhao, Zhiyuan and Donghao, Li and Tiankai, Hang and Zhenxi, Li and Tao, Jiale and Wang, QiXun and Li, Ruihuang and Chen, Comi and Li, Xin and Wu, Mingrui and Deng, Xinchi and Gu, Shuyang and Wang, Chunyu and Lu, Qinglin},
  journal={arXiv preprint arXiv:2509.04545},
  year={2025}
}
Downloads last month
48
Safetensors
Model size
33B params
Tensor type
BF16
·
Inference Providers NEW
This model isn't deployed by any Inference Provider. 🙋 Ask for provider support

Model tree for PromptEnhancer/PromptEnhancer-32B

Finetuned
(73)
this model
Quantizations
2 models

Spaces using PromptEnhancer/PromptEnhancer-32B 4

Paper for PromptEnhancer/PromptEnhancer-32B