wildminder/ComfyUI-DyPE

ComfyUI DyPE+SEGA, enabling artifact-free 4K+ image generation: Z-Image, Qwen, Flux, Krea2

What it solves

Diffusion transformer models like FLUX, Qwen Image, and Z-Image are trained at a specific resolution (for example, 1024×1024) and tend to produce repeated or collapsed structures when pushed much higher. Retraining for larger sizes is expensive and disruptive. This project solves that by offering training-free techniques that let you generate at 2K, 4K, and beyond using your existing pre-trained model, with no workflow changes.

How it works

The pack works as a set of ComfyUI nodes that you attach after your model loader. Instead of changing the model weights, they patch the attention and position-encoding mechanisms during sampling. The README groups them into two families: model patches (which alter how the sampler attends to positions) and cascades (which refine an existing latent or image).

  • Model patches include DyPE (Dynamic Position Extrapolation), SEGA (Spectral-Energy Guided Attention), SPA and HAP from the HRDiT paper, I-Max, and AReA. They adjust positional encodings, sharpen attention based on frequency spectrum, fix spatial disorder, or prune attention for speed.
  • Cascades include PixelRush, FreeScale, and HiFlow. They start from a base image or latent and progressively upscale or refine it, either faithfully (PixelRush) or by re-imagining higher-resolution detail (FreeScale), or by using the original denoising trajectory as guidance for flow models (HiFlow).

The README includes a quick-picker: if you start from noise, use DyPE (or SEGA), add SPA if you see repeated patterns, HAP for speed. If you start from an existing image, use PixelRush for fidelity, FreeScale for re-imagination, or HiFlow for flow models.

Who it’s for

ComfyUI users who want to generate high-resolution images without retraining or complex multi-stage pipelines. It’s designed for anyone working with FLUX, Qwen Image, Z-Image, Anima/Cosmos, or even SDXL/SD1.5 (via PixelRush) who wants clean 4K output by adding a single node after the model loader.

Highlights

  • Multi-architecture support – FLUX (including Nunchaku quantized), Qwen Image 1.0/2.1, Krea-2, Z-Image, Anima/Cosmos, and SDXL/SD1.5 for cascades.
  • Training-free – no retraining, no fine-tuning, no changes to your existing workflows.
  • Single-node integration – place a node after the loader, set width/height, and connect to the sampler.
  • Zero overhead – adjustments happen on-the-fly with negligible performance impact.
  • Flexible methods – different nodes for different needs: extrapolation, cascade refinement, attention pruning, and more.

Related

  • Project
  • Project
  • Project
  • Project
  • Project