comfyui-prompt-helper Introduction
comfyui-prompt-helper is a ComfyUI custom node that helps you turn a Chinese description of an image into English prompts for image generation. It produces both a positive prompt (what you want to see) and a negative prompt (what you want to avoid), along with Chinese translations so you can review the results.
The author created the extension to make prompt writing less dependent on repeatedly copying, pasting, and rewriting English text. Its interface brings prompt generation into your ComfyUI workflow, where you can choose a target image-model type and an API model to help write the prompts.
How comfyui-prompt-helper Works
Think of the node as a writing assistant between your idea and your image-generation workflow. You describe the image in Chinese, choose the type of image model you are prompting for, and let an API-based language model prepare the prompt text.
For example, you might enter a description of a portrait, its lighting, and its background. The node returns English positive and negative prompts, plus Chinese translations of both. You can read the translations to check whether the generated wording reflects your intent before using the English prompts elsewhere in your workflow.
The extension makes two different kinds of model choices available:
- SD model type tells the helper which image-model family the prompt is intended for: SD1.5, SDXL, or FLUX.
- API model is the language model used to generate the prompt text. The configuration example includes models from DeepSeek and OpenAI.
Generating prompts through an API requires a correctly configured API key.
comfyui-prompt-helper Features
Prompt Generation and Translation
The Prompt LLM Helper node has four outputs:
| Output | What it contains |
|---|---|
positive(en) | An English prompt describing what you want in the image |
negative(en) | An English prompt describing what you want to avoid |
positive(zhs) | A Chinese translation of the positive prompt |
negative(zhs) | A Chinese translation of the negative prompt |
The Chinese outputs give you a way to check the meaning of the generated English text, especially when writing English prompts yourself is difficult.
Choices You Can Make in the Node
In ComfyUI, look under conditioning for Prompt LLM Helper. The original documentation lists these inputs:
- Chinese prompt: Enter the image idea you want the helper to work from.
- SD model type: Choose SD1.5, SDXL, or FLUX according to the image model you intend to use.
- Model: Select the API language model that will generate the text.
- System prompt: Optionally provide instructions to guide the language model’s behavior.
- API key: Optionally enter a key in the interface. If you also have a key in
config.json, the interface-entered key takes priority. - Use context: Optionally enable context association. The original documentation does not describe how context is stored or selected, so review the resulting prompts when using this option.
For example, changing the SD model type changes the target you ask the helper to write for. Changing the API model changes which language model handles the writing. Because generated text can vary, check all four outputs after making either choice.
Provider and Connection Settings
The configuration example includes DeepSeek and OpenAI as API providers. For each provider, it shows a base URL, an API key, and a list of available models. It also shows a default provider and model.
The settings include an optional HTTP/HTTPS proxy. If your connection needs a proxy, it must be enabled and given the appropriate addresses in the configuration. The auto_save_api_key setting controls whether an API key entered in the interface is saved to config.json; the example has it set to false. Consider whether you want a key stored in that file before enabling automatic saving.
comfyui-prompt-helper Models
“Model” has two meanings here, so it helps to keep them separate:
| Choice | Options shown in the original documentation | Purpose |
|---|---|---|
| Target image-model type | SD1.5, SDXL, FLUX | Indicates which image-model family the prompt is intended for |
| API language model | deepseek-chat, deepseek-reasoner, gpt-4, gpt-3.5-turbo in the configuration example | Generates the prompt text |
Select the target image-model type to match the image model in your workflow. Select an API language model from the models available through your configured provider. The original documentation does not compare the listed API models’ output quality, speed, or cost, so it does not establish a best choice for a particular artistic style.
Troubleshooting comfyui-prompt-helper
The Node Does Not Produce Prompts
- Check that an API provider and model are configured.
- Check that the provider has an API key.
- If you entered a key in the node, check that key first: it takes priority over the key in
config.json. - If your connection uses a proxy, check that the proxy is enabled and its HTTP and HTTPS addresses are correct.
The Output Does Not Match Your Idea
- Make your Chinese description more specific about the subject and important visual details.
- Check that SD model type matches the image-model family you intend to use.
- Read
positive(zhs)andnegative(zhs)to see how the generated prompts express your idea. - Revise your description or optional system prompt, then generate the outputs again.
Frequently Asked Questions
Do I have to write my prompt in English?
No. The node accepts a Chinese prompt and returns English prompt text with Chinese translations.
Does the node generate an image?
The documented outputs are prompt text, not an image. Use the English outputs as appropriate in your ComfyUI workflow.
Which API key is used if I enter one in the interface and also configure one in a file?
The key entered in the interface takes priority.
Will a key entered in the interface be saved automatically?
Only if auto_save_api_key is enabled. It is set to false in the original configuration example.
Is “SD model type” the same as the API model?
No. SD1.5, SDXL, and FLUX identify the intended image-model family; the API model is the language model used to write the prompts.
Learn More about comfyui-prompt-helper
- comfyui-prompt-helper on GitHub: The project repository for its documentation and code.
- ComfyUI: The application in which the custom node runs.
The extension is listed under the MIT license in the original documentation.
