ComfyUI Extension: Zerna Pack
A set of nodes for batch processing of text and images.
Custom Nodes (0)
README
Zerna Pack
Zerna Pack is a collection of custom nodes for ComfyUI designed to facilitate batch processing of text and images. It includes tools for dynamic prompt generation and other utilities to enhance your workflow.
Features
- Dynamic Prompt Injector: Generate prompts dynamically by replacing placeholders with content from text files.
- Batch Processing: Process multiple prompts or images efficiently.
Installation
- Clone or download the repository into the
custom_nodesdirectory of your ComfyUI installation:git clone https://github.com/RaymondProduction/comfyui-zerna-pack.git - Ensure that ComfyUI is installed and properly configured. No additional dependencies are required as this pack uses only the standard library and ComfyUI core.
Usage
Dynamic Prompt Injector
-
Place your
.txtfiles containing prompt data in thepromptsdirectory:comfyui-zerna-pack/prompts/Example files:
test.txt:helloexample01.txt:cat dog pig
-
Use the Dynamic Prompt Injector node in ComfyUI:
- Set the
prompt_textfield with a template containing[X]as a placeholder. - Select a
.txtfile from theprompt_filedropdown. - Configure optional parameters like
reload,load_cap, andstart_indexas needed.
- Set the
-
The node will replace
[X]in theprompt_textwith each line from the selected file and output the processed prompts.
Example
- Input:
prompt_text:"A photo of [X] in the forest."prompt_file:example01.txt
- Output:
A photo of cat in the forest. A photo of dog in the forest. A photo of pig in the forest.
Development
File Structure
zerna/: Contains the core logic for the Zerna Pack.prompt_generators.py: Implements the Dynamic Prompt Injector.
prompts/: Directory for storing.txtfiles used in prompt generation.__init__.py: Initializes the Zerna Pack and registers its nodes with ComfyUI.
Version
Current version: 0.0.1
Contributing
Feel free to submit issues or pull requests to improve the Zerna Pack. Contributions are welcome!
License
This project is licensed under the MIT License. See the LICENSE file for details.
Acknowledgments
Special thanks to the ComfyUI community for providing the tools and inspiration for this project.