wildminder/ComfyUI-DyPE
ComfyUI DyPE+SEGA, enabling artifact-free 4K+ image generation: Z-Image, Qwen, Flux, Krea2
What it solves
ComfyUI-DyPE provides training-free methods to generate images at ultra-high resolutions (4K and beyond) using Diffusion Transformers (DiT). It prevents common high-resolution issues like spatial disorder (repeated or collapsed structures) and artifacts that occur when pushing pre-trained models far beyond their native training resolution.
How it works
The project implements several advanced patching techniques that can be inserted into a ComfyUI workflow after the model loader:
- Dynamic Position Extrapolation (DyPE): Adjusts positional encodings during the denoising process to handle low-frequency structures early and fine details later.
- Spatial Position Alignment (SPA): Fixes spatial disorder by bundling token positions and averaging attention outputs across multiple variants.
- Head-Adaptive attention Pruning (HAP): Accelerates inference by using block-sparse attention based on a pre-calibrated scope plan, reducing the computational load of high-resolution attention.
- SEGA: Uses content-aware spectral sharpening based on the latent's frequency spectrum.
- PixelRush & FreeScale: Provide cascade-based refinement and scale-fused attention for upscaling existing images or generating at higher resolutions.
Who it’s for
Digital artists and AI researchers using ComfyUI who want to generate high-fidelity 4K+ images using models like FLUX, Qwen Image, Z-Image, and Anima/Cosmos without needing to retrain the models.
Highlights
- Multi-Architecture Support: Works with FLUX, Nunchaku, Qwen Image, Krea-2, Z-Image, and Anima/Cosmos.
- Training-Free: No retraining or complex workflow changes required; simply patch the model via a single node.
- High-Resolution Capability: Enables generation at 4096×4096 and above.
- Inference Acceleration: HAP can provide up to 5.5 x faster attention at 4K resolution.
- Zero Overhead: Many adjustments happen on-the-fly with negligible performance impact.
Related
- Project
- Project
- Project
- Project
- Project