Nodes Browser
ComfyDeploy: How ComfyUI-IO-Helpers works in ComfyUI?
What is ComfyUI-IO-Helpers?
A custom nodes package for ComfyUI that enhances workflow flexibility by providing specialized nodes for saving and loading intermediate data (encoded prompts and sampled latents) in multiple formats. This package leverages helper classes for file I/O, supports gzip compression for efficient storage, and integrates progress feedback via a progress bar to improve user experience during long operations.
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-IO-Helpers
and select it - Close the build step dialig and then click on the "Save" button to rebuild the machine
ComfyUI IO Helpers
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.
Features
- 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
Installation
Using ComfyUI Manager (Recommended)
- Install ComfyUI Manager
- Find and install 'ComfyUI-IO-Helpers' through the manager interface
- Restart ComfyUI
Manual Installation
Clone this repository into your ComfyUI custom_nodes directory:
cd custom_nodes
git clone https://github.com/austinbrown34/comfyui-io-helpers.git
Available Nodes
Encoded Prompt Nodes
-
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
Sampled Latents Nodes
-
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
Usage Examples
Saving Encoded Prompts
# Example workflow using EncodedPromptToFile
encoded_prompt_node = EncodedPromptToFile(
conditioning=your_conditioning,
filename_prefix="my_prompt",
output_format="pt",
compress=True
)
Loading Sampled Latents
# Example workflow using SampledLatentsFromFile
latents_node = SampledLatentsFromFile(
filepath="path/to/your/latents.pt.gz"
)
Technical Details
Supported File Formats
- PyTorch formats (.pt, .pth)
- NumPy format (.npy)
- All formats support gzip compression (.gz)
Dependencies
- Python 3.x
- PyTorch >= 1.7
- NumPy >= 1.19
- ComfyUI (latest version recommended)
Contributing
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.
License
This project is licensed under the MIT License - see the LICENSE file for details.
Credits
- 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
Contact
Austin Brown - austinbrown34@gmail.com
For bugs and feature requests, please open an issue on the GitHub repository.