This is a ComfyUI custom node that implements the Golden Noise Generator from the paper "Golden Noise for Diffusion Models: A Learning Framework", specifically optimized for SDXL. The node enhances the initial latent noise used in the diffusion process to improve image quality and semantic consistency.
- Optimized for SDXL models
- Transformer-based noise processing using Swin Transformer
- SVD-based noise enhancement
- Residual connections for controlled noise modification
- Seamless integration with ComfyUI workflows
- Navigate to your ComfyUI's custom_nodes directory:
cd ComfyUI/custom_nodes
- Clone this repository:
git clone https://github.com/yourusername/Golden-Noise-for-Diffusion-Models
- Install required dependencies:
pip install timm einops
The node appears in ComfyUI as "Golden Noise Generator" under the "latent/noise" category.
- Source: Choose between CPU or GPU processing
- Use Transformer: Enable/disable Swin Transformer processing
- Use SVD: Enable/disable SVD-based noise enhancement
- Residual: Enable/disable residual connections
- Seed: Random seed for reproducibility
- Width: Output width (must be divisible by 8)
- Height: Output height (must be divisible by 8)
- Batch Size: Number of samples to generate
- Load your SDXL checkpoint
- Add the "Golden Noise Generator" node
- Connect the noise output to your KSampler's latent input
- Configure settings (recommended to start with all options enabled)
- Generate!
- Resolution: 1024x1024 (standard SDXL resolution)
- Use both transformer and SVD processing
- Enable residual connections for stable results
- Adjust seed for different noise patterns
link to the weights here
they are pth files so be careful and i would suggest converting them to safetensors.
i provide a very simple script to convert them to safetensors.
python convert.py --input weights --output weights
If you use this node in your work, please cite the original paper:
@misc{zhou2024goldennoisediffusionmodels,
title={Golden Noise for Diffusion Models: A Learning Framework},
author={Zikai Zhou and Shitong Shao and Lichen Bai and Zhiqiang Xu and Bo Han and Zeke Xie},
year={2024},
eprint={2411.09502},
archivePrefix={arXiv},
primaryClass={cs.LG}
}
This project is licensed under the MIT License.
- Original paper by Zikai Zhou et al.
- ComfyUI community
- Swin Transformer team for the pre-trained models