Solution: Added an optional "Any" Parameter to loader node
This custom loader module addresses these issues by:
- Flexible Node Connections: Added an optional "any" parameter to all loader nodes, allowing them to connect to any output type
- Controlled Loading Order: Users can strategically place loader nodes after other nodes, optimizing the model loading sequence
- Memory Management: Enables better VRAM management by controlling when and which models are loaded
- Sequential Loading: Models are loaded only when needed, in a controlled sequence
- All standard ComfyUI loader nodes included with "_Any" suffix
- Optional "any" parameter for flexible connections
- Maintains all original functionality and parameters
- Compatible with existing ComfyUI workflows
CheckpointLoader_Any- Advanced checkpoint loadingCheckpointLoaderSimple_Any- Simple checkpoint loadingDiffusersLoader_Any- Diffusers model loadingunCLIPCheckpointLoader_Any- unCLIP checkpoint loadingLoraLoader_Any- LoRA model loadingLoraLoaderModelOnly_Any- LoRA model only loadingVAELoader_Any- VAE model loadingControlNetLoader_Any- ControlNet model loadingDiffControlNetLoader_Any- Diffusion ControlNet loadingUNETLoader_Any- UNET model loadingCLIPLoader_Any- CLIP model loadingDualCLIPLoader_Any- Dual CLIP model loadingCLIPVisionLoader_Any- CLIP vision model loadingStyleModelLoader_Any- Style model loadingGLIGENLoader_Any- GLIGEN model loading
- Reduced Memory Footprint: Load models only when needed
- Flexible Sequencing: Arrange loading order based on available memory
- Improved Workflow Stability: More predictable memory usage
The "_Any" suffix nodes can be used exactly like their original counterparts, with the added benefit that they can accept connections from any node type via the optional "any" parameter. This enables better workflow design for memory-constrained environments.
Here's an example workflow showing how the loader nodes with "any" parameter can be used to optimize memory management:
The workflow file is also available as workflow.json in this repository.
The key advantage of these loader nodes is that you can control WHEN models are loaded by connecting them strategically in your workflow. In the example above:
- The UNETLoader_Any is connected after the CLIPTextEncode nodes, allowing them to run before the heavy UNET model is loaded
- The VAELoader_Any is connected after sampling, allowing you to load the VAE only when needed for decoding
Simply use these nodes in place of the standard loader nodes, and strategically connect them to control when models are loaded into memory.
- Twitter: @Lrzjason
- Email: lrzjason@gmail.com
- QQ Group: 866612947
- Wechatid: fkdeai
- Civitai: xiaozhijason


