https://github.com/ShmuelRonen/ComfyUI-PixArt_XL
A ComfyUI extension that integrates PixArt-Alpha models directly into ComfyUI with advanced memory management.
https://github.com/ShmuelRonen/ComfyUI-PixArt_XL
Last synced: 3 months ago
JSON representation
A ComfyUI extension that integrates PixArt-Alpha models directly into ComfyUI with advanced memory management.
- Host: GitHub
- URL: https://github.com/ShmuelRonen/ComfyUI-PixArt_XL
- Owner: ShmuelRonen
- License: mit
- Created: 2025-03-15T19:00:43.000Z (3 months ago)
- Default Branch: main
- Last Pushed: 2025-03-15T19:11:48.000Z (3 months ago)
- Last Synced: 2025-03-15T20:19:07.969Z (3 months ago)
- Language: Python
- Size: 23.4 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
- awesome-comfyui - **ComfyUI-PixArt_XL** - Alpha models directly into ComfyUI with advanced memory management. (All Workflows Sorted by GitHub Stars)
README
# ComfyUI-PixArt_XL
## Support My Work
If you find this project helpful, consider buying me a coffee:[](https://buymeacoffee.com/shmuelronen)
A ComfyUI extension that integrates PixArt-Alpha models directly into ComfyUI with advanced memory management.

## Features
- Use PixArt-Alpha XL models directly in ComfyUI
- Smart memory management using both GPU and system RAM
- Automatic fallback to lower resolutions with high-quality upscaling
- Support for both DPM-Solver and SA-Solver schedulers
- Full precision processing for maximum stability## Installation
1. Clone this repository into your ComfyUI custom nodes folder:
```bash
cd ComfyUI/custom_nodes
git clone https://github.com/ShmuelRonen/ComfyUI-PixArt_XL.git
```2. Install dependencies:
```bash
pip install sentencepiece
```3. Restart ComfyUI
## Usage
After installation, you'll have access to two new nodes:
### PixArtAlpha ModelLoader
Automatic loads a PixArt-Alpha model from Hugging Face.
**Inputs:**
- `base_model_path`: Path to the model (default: "PixArt-alpha/PixArt-XL-2-1024-MS")**Outputs:**
- `model`: The loaded model### PixArtAlpha Generation
Generates images using the PixArt-Alpha model.
**Inputs:**
- `model`: The PixArt-Alpha model
- `positive`: Positive prompt
- `negative`: Negative prompt
- `width`, `height`: Image dimensions
- `steps`: Number of sampling steps
- `guidance_scale`: How closely to follow the prompt
- `schedule`: Sampling scheduler
- `seed`: Random seed**Outputs:**
- `image`: The generated image## Memory Optimization
This implementation includes several advanced techniques to maximize memory efficiency:
- CPU component offloading
- Attention slicing
- VAE optimization
- Periodic CUDA cache clearing
- Resolution fallback with quality-preserving upscaling## Acknowledgments
- [PixArt-alpha](https://github.com/PixArt-alpha/PixArt-alpha)
- [Diffusers library](https://github.com/huggingface/diffusers)
- [ComfyUI](https://github.com/comfyanonymous/ComfyUI)