Nodes Browser
ComfyDeploy: How ComfyUI Prompt Expander Node works in ComfyUI?
What is ComfyUI Prompt Expander Node?
A custom node for ComfyUI that expands text prompts using the SuperPrompt-v1 T5 model. This node helps generate more detailed and descriptive prompts from simple input text, which can be particularly useful for image generation workflows.
How to install it in ComfyDeploy?
Head over to the machine page
- Click on the "Create a new machine" button
- Select the
Edit
build steps - Add a new step -> Custom Node
- Search for
ComfyUI Prompt Expander Node
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
ComfyUI Prompt Expander Node
A custom node for ComfyUI that expands text prompts using the SuperPrompt-v1 T5 model. This node helps generate more detailed and descriptive prompts from simple input text, which can be particularly useful for image generation workflows.
Features
- Expands simple prompts into more detailed descriptions
- Configurable generation parameters
- Optional removal of incomplete sentences
- GPU acceleration support (when available)
- Automatic model downloading and caching
Requirements
- Python 3.x
- PyTorch
- Transformers
- ComfyUI
Installation
- Install ComfyUI if you haven't already
- Clone this repository into your ComfyUI custom nodes directory:
cd ComfyUI/custom_nodes/
git clone https://github.com/your-username/ComfyUI-Prompt-Expander.git
- Install the required dependencies:
pip install -r requirements.txt
Usage
- After installation, restart ComfyUI
- In the node menu, find the "Prompt Expander" node under the "text" category
- Connect the node to your workflow
Node Parameters
- prompt (STRING): The input text you want to expand
- max_new_tokens (INT): Maximum number of new tokens to generate (1-2048, default: 512)
- repetition_penalty (FLOAT): Penalty for repetition in generated text (0.0-2.0, default: 1.2)
- remove_incomplete_sentences (BOOLEAN): Whether to remove incomplete sentences from the output (default: True)
Example
Input prompt: "a beautiful girl" Output: [The model will generate a more detailed description of the scene]
Model Information
This node uses the roborovski/superprompt-v1
model, which will be automatically downloaded on first use and cached in the user's home directory under .models/
.
License
[Your License Here]
Credits
-
Model: roborovski/superprompt-v1
-
https://github.com/NeuralSamurAI/Comfyui-Superprompt-Unofficial