A custom node for ComfyUI that generates creative and detailed prompts using OpenAI's GPT models.
A custom node for ComfyUI that generates creative and detailed prompts using OpenAI's GPT models.
Make sure you have ComfyUI installed and working properly.
Navigate to your ComfyUI's custom_nodes directory:
cd ComfyUI/custom_nodes
git clone https://github.com/nisimjoseph/ComfyUI_OpenAI-Prompter
pip install openai
Set up your OpenAI API key:
# On Windows (Command Prompt)
set OPENAI_API_KEY=your-api-key-here
# On Windows (PowerShell)
$env:OPENAI_API_KEY="your-api-key-here"
# On Linux/MacOS
export OPENAI_API_KEY="your-api-key-here"
Restart ComfyUI
In the ComfyUI interface, find the "OpenAI Prompt Generator" node under the "prompt" category
Configure the node parameters:
model
: Select from available GPT modelsprompt_context
: Enter your prompt context/instructionsmax_tokens
: Adjust the maximum length of the generated prompt (256-4096)temperature
: Control creativity (0.0-2.0)seed
: Set for reproducible resultsConnect the node's output to other ComfyUI nodes that accept text prompts
If you see "Error: OpenAI API key not found or invalid":
If the node isn't appearing:
If prompts aren't being generated:
If you encounter any issues or have questions: