A custom nodes package for ComfyUI that enhances workflow flexibility by providing specialized nodes for saving and loading intermediate data. This package makes it easy to store and retrieve encoded prompts and sampled latents in multiple formats, with support for compression to optimize storage space.
- Save and load encoded prompts and sampled latents in multiple formats (pt, pth, npy)
- Gzip compression support for efficient storage
- Progress bar integration for better user feedback during operations
- Clean, modular design with helper classes for file I/O
- Seamless integration with ComfyUI workflows
- Install ComfyUI Manager
- Find and install 'ComfyUI-IO-Helpers' through the manager interface
- Restart ComfyUI
Clone this repository into your ComfyUI custom_nodes directory:
cd custom_nodes
git clone https://github.com/austinbrown34/comfyui-io-helpers.git
-
EncodedPromptToFile
- Save encoded prompts to file with optional compression
- Supports multiple output formats (pt, pth, npy)
- Includes progress tracking
-
EncodedPromptFromFile
- Load encoded prompts from saved files
- Automatic handling of compressed and uncompressed files
- Progress tracking during load operations
-
SampledLatentsToFile
- Save sampled latents to file with optional compression
- Multiple format support
- Built-in progress tracking
-
SampledLatentsFromFile
- Load sampled latents from saved files
- Handles both compressed and uncompressed formats
- Progress feedback during loading
# Example workflow using EncodedPromptToFile
encoded_prompt_node = EncodedPromptToFile(
conditioning=your_conditioning,
filename_prefix="my_prompt",
output_format="pt",
compress=True
)
# Example workflow using SampledLatentsFromFile
latents_node = SampledLatentsFromFile(
filepath="path/to/your/latents.pt.gz"
)
- PyTorch formats (.pt, .pth)
- NumPy format (.npy)
- All formats support gzip compression (.gz)
- Python 3.x
- PyTorch >= 1.7
- NumPy >= 1.19
- ComfyUI (latest version recommended)
Contributions are welcome! Please feel free to submit a Pull Request. For major changes, please open an issue first to discuss what you would like to change.
This project is licensed under the MIT License - see the LICENSE file for details.
- ComfyUI - The powerful and modular stable diffusion GUI that makes this project possible
- Inspired by the needs of the ComfyUI community for better intermediate data handling
Austin Brown - [email protected]
For bugs and feature requests, please open an issue on the GitHub repository.