ComfyUI-PromptOptimizer is a custom node for ComfyUI designed to optimize prompts for text-to-image models. It leverages Pollinations' free models to transform user-input prompts into more detailed, diverse, and vivid descriptions, making them better suited for generating high-quality images. No local model required.
- Prompt Optimization: Optimizes user-input prompts to generate versions better suited for text-to-image models.
- Multilingual Support: Automatically translates non-English prompts into English.
- Rich Details: Adds details such as setting, colors, lighting, and overall mood.
- Style Expansion: Expands on visual styles or artist references if included in the prompt.
- Diverse Output: Avoids repetitive vocabulary and phrases to ensure unique and varied prompts.
- Easy Integration: Seamlessly integrates into your ComfyUI workflow as a custom node.
-
Clone this repository into the
custom_nodes
directory of your ComfyUI installation:git clone https://github.com/ciga2011/ComfyUI-PromptOptimizer.git
-
Launch ComfyUI and ensure the
Free Prompt Optimizer
node is available in the node list.
- Add the Free Prompt Optimizer node to your ComfyUI workflow.
- Input your original prompt in the
prompt
field. - Run the workflow. The node will output an optimized prompt tailored for text-to-image models.
Input Prompt:
A beautiful sunset over the mountains.
Optimized Prompt:
Envision a breathtaking twilight spectacle as the sun dips below a rugged mountain range, casting vibrant shades of crimson, amber, and violet across the expansive sky. Silhouettes of jagged peaks frame the horizon, their rugged textures kissed by the warm, fading light. Wispy clouds scatter like delicate brush strokes, reflecting the day's final glow. The atmosphere is imbued with a sense of tranquility and awe, inviting viewers to lose themselves in the captivating beauty of nature’s masterpiece.
This project is licensed under the GNU General Public License v3.0 (GPL-3.0). See the LICENSE file for details.
Contributions are welcome! If you'd like to contribute, please follow these steps:
- Fork the repository.
- Create a new branch for your feature or bugfix.
- Submit a pull request with a detailed description of your changes.
If you encounter any issues or have questions, please open an issue on the GitHub repository.
- Thanks to the ComfyUI team for creating an amazing framework.
- Thanks to Pollinations for providing the free APIs that make this project possible.
Enjoy optimizing your prompts and creating stunning images with ComfyUI-PromptOptimizer! 🚀