Dynamic prompt expansion, powered by GPT-2 locally on your device.
The custom node will analyze your Positive prompt and Seed and incorporate additional keywords, which will likely improve your resulting image.
For example, (from the workflow image below):
Original prompt: "Portrait of robot Terminator, cybord, evil, in dynamics, highly detailed, packed with hidden details, style, high dynamic range, hyper realistic, realistic attention to detail, highly detailed"
Expanded prompt: "Portrait of robot Terminator, cybord, evil, in dynamics, highly detailed, packed with hidden details, style, high dynamic range, hyper realistic, realistic attention to detail, highly detailed, extremely lifelike, digital painting, artstation, illustration, concept art, smooth, sharp focus, 8k"
Based on my testing, it's evident that incorporating additional keywords generated by GPT-2 notably improves the quality of the resulting images.
Many thanks to the authors of the Fooocus project for generously providing most of the code.
https://github.com/meap158/ComfyUI-Prompt-Expansion.git
To use this custom node (located within the 'utils' submenu), simply connect your positive prompt to it, which will then output the joined prompt.
You can also load the example workflow by dragging the workflow file (workflow_example.json or workflow_example.png) onto ComfyUI.
<p float="left"> <img src="https://github-production-user-asset-6210df.s3.amazonaws.com/14327094/268447933-d5d60985-3ddf-43a9-b8f0-42b65118a409.png" width="1000" /> </p>Upon the first launch, the custom node will automatically download the model file (343MB) from the following link:
https://huggingface.co/lllyasviel/misc/resolve/main/fooocus_expansion.bin