Yaser-nodes for ComfyUI
A collection of custom nodes for ComfyUI that provide dynamic input selection and intelligent upscaling functionality.
Nodes (14)
A reusable decimal-number source for your workflow
The switch node that grows its own inputs (and only runs the branch you pick)
Image Color Match (ComfyUI Essentials)
How big is this image, actually? The one-number answer.
Upscale with the model that matches your scale factor — in one node
Stacking without a stack of nodes
The knob that makes tiled diffusion stop leaving seams
Generate huge images on a GPU that shouldn't be able to
Decode a 4K latent on an 8GB card without OOMing — the VAE hack that still works
Encode a giant image into a latent without the OOM — the encoder twin
The batch-stretching utility you didn't know you needed
Depth and pose control for Wan generations
An actual ControlNet, not VACE or a LoRA
Negative prompts for Wan when speed LoRAs force CFG 1
Yaser-nodes for ComfyUI
A collection of custom nodes for ComfyUI that provide dynamic input selection and intelligent upscaling functionality.
Features
🔮 Conditional Selection Node
- Dynamic Inputs: Automatically adds new input slots as you connect cables
- Index-based Selection: Choose which input to pass through using an integer index
- Any Type Support: Works with any ComfyUI data type (images, latents, text, etc.)
🔮 Iterative Upscale with Models Node
- Multi-Scale Support: Choose from 1x, 2x, 4x, or 8x upscaling
- Model Selection: Use different upscale models for different scale factors
- Optimized Performance: Uses ComfyUI's tiled scaling for memory efficiency
- OOM Protection: Automatically reduces tile size if GPU memory is insufficient
Installation
Method 1: Git Clone (Recommended)
-
Navigate to your ComfyUI custom_nodes directory:
cd /path/to/ComfyUI/custom_nodes/ -
Clone this repository:
git clone https://github.com/YaserJaradeh/comfyui-yaser-nodes.git -
Restart ComfyUI
Method 2: Manual Download
- Download this repository as a ZIP file
- Extract it to your ComfyUI
custom_nodesdirectory - Ensure the folder is named
Yaser-nodesorcomfyui-yaser-nodes - Restart ComfyUI
Method 3: ComfyUI Manager
- Open ComfyUI Manager in your ComfyUI interface
- Search for "Yaser-nodes"
- Click Install
- Restart ComfyUI
Usage
Conditional Selection Node
- Add the node: Search for "Conditional Selection Node" in the node menu
- Connect inputs:
- The node starts with one input slot
- As you connect cables to existing slots, new input slots automatically appear
- Connect as many inputs as you need (any data type)
- Set selection index: Use the
selection_indexparameter to choose which input to output (0-based indexing) - Output: The selected input will be passed through to the output
Example Use Cases:
- Switch between different prompts based on conditions
- Select different models dynamically
- Choose between processed and original images
- Route different data types conditionally
Iterative Upscale with Models Node
- Add the node: Search for "Iterative Upscale with Models Node" in the node menu
- Connect inputs:
image: The input image to upscalemodel1x,model2x,model4x,model8x: Different upscale models for each scale factor
- Select scale factor: Choose from the dropdown (1, 2, 4, or 8)
- Output: The upscaled image using the appropriate model
Tips:
- Use models that match their intended scale factor for best results
- For 1x scale, you can use any model (output will match the model's native scale)
- Ensure you have upscale models loaded in ComfyUI's
models/upscale_models/directory
File Structure
Yaser-nodes/
├── __init__.py # Node registration
├── nodes.py # Main node definitions
├── types.py # Custom type definitions
├── upscale_utils.py # Upscaling utility functions
├── web/ # Frontend JavaScript
│ └── js/
│ └── dynamicInputs.js # Dynamic input handling
├── requirements.txt # Python dependencies
Requirements
- ComfyUI (latest version recommended)
- Python 3.8+
- PyTorch
- Standard ComfyUI dependencies
No additional Python packages are required beyond what ComfyUI already uses.
Troubleshooting
Nodes Not Appearing
- Ensure the folder is in the correct
custom_nodesdirectory - Check that all Python files are present and not corrupted
- Restart ComfyUI completely
- Check the ComfyUI console for any error messages
Dynamic Inputs Not Working
- Make sure the
webdirectory and JavaScript files are present - Clear your browser cache
- Ensure ComfyUI is serving the web directory correctly
Upscaling Errors
- Verify that your upscale models are compatible with ComfyUI
- Check that you have sufficient GPU memory
- Try reducing image size if getting out-of-memory errors
- Ensure the upscale models are in the correct format (.pth, .safetensors)
Performance Issues
- Use smaller tile sizes for large images
- Close other GPU-intensive applications
- Consider using CPU upscaling for very large images
Contributing
Contributions are welcome! Please feel free to:
- Report bugs by opening an issue
- Suggest new features
- Submit pull requests with improvements
- Share your workflow examples
License
This project is open source. Please check the license file for details.
Acknowledgments
- Built for the amazing ComfyUI by comfyanonymous
- Upscaling functionality based on ComfyUI's core upscale implementation
- Dynamic input system inspired by community custom nodes
Support
If you find these nodes useful, please:
- ⭐ Star this repository
- 🐛 Report any bugs you encounter
- 💡 Suggest improvements or new features
- 📺 Share your workflows using these nodes
For support, please open an issue on GitHub with:
- Your ComfyUI version
- Steps to reproduce any problems
- Screenshots if applicable
- Console error messages (if any)