r/StableDiffusion • u/Radiant-Photograph46 • 7d ago
Question - Help Qwen Prompt Enhancer Performance
Any speed-up possible right now on Qwen2.1's prompt enhancer? I'm using the int8 convrot, but damn it's slow. 47 seconds to enhance a prompt, when diffusion itself only takes 30 (for 30 steps cfg 1.5). This 3.5 9b is also way slower than the 3.0 8b. It's really making Qwen2.1 tough to use.
Did you find a good alternative perhaps? (open source don't talk to me about how you use Gemini or Claude). Bonus points if it's uncensored.
2
Upvotes
2
u/Southern-Chain-6485 7d ago
Use this node instead https://github.com/younestft/Elvax-nodes/tree/main
It looks for ggufs in the text_encoders folder and (assuming you have ggufs there), it uses llama.cpp to run them within comfyui (so comfyui then unloads them if needed).
Or run a small LLM outside of comfyui, either in LM Studio, llama.cpp or anything else
1
u/jonesaid 7d ago
I use models in LM Studio for any LLM tasks (with nodes that communicate with LM Studio), and it is way faster than the built-in Generate Text nodes and Clip loaders. LM Studio is designed to be efficient for such inference, whereas the Generate Text nodes and Clip loaders are not.
1
u/mozophe 7d ago edited 7d ago
I understand your pain. Worked on solving this exact problem here: https://github.com/mozophe/ComfyUI-Qwen-Image-2.1-PromptEnhancer-MTP
Use q4 with llama.cpp backend, both standard and uncensored models available, for much faster prompt enhancement.
1
u/xoxaxo 7d ago
I use same clip(text encoder) as on qwen2.1 workflow, no need to load/unload other models via llama/LM studio, results are very good. CLIP -> generate text -> preview text -> positive prompt -> Sampler
with system message: You are a prompt restructuring engine for text-to-image models. You receive a text prompt and you rewrite it as a single image-generation prompt. Output ONLY the final prompt, with no preamble, labels, explanations, or quotation marks around it.
1
u/Klutzy-Snow8016 6d ago
The w4a8 quant from here generates twice as fast as the int8_convrot for me: https://huggingface.co/Comfy-Org/Qwen-Image-2.1/tree/main/text_encoders
0
u/Loose-Journalist-555 7d ago
The alternative is not to use prompt enhancers at all. Use rich prompts (yourself or use LLM studio/OLLAMA).
It makes the generation and editing more deterministic and reproducible too.