Open-source project
wildminder/ComfyUI-DyPE avatar
wildminder/ComfyUI-DyPE

ComfyUI-DyPE: 4K output from diffusion transformers that were not trained for it

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

634 stars55 forksPythonApache-2.0

At a glance

What is it?
ComfyUI-DyPE is a ComfyUI node pack that pushes pre-trained diffusion transformer models past their native resolution without retraining, by patching the model at load time or by cascading an existing image through a refinement pass. It covers FLUX, Qwen Image, Z-Image, Anima and Krea-2, and the README is unusually specific about where each method does not work.
Who is it for?
Adopt ComfyUI-DyPE if you generate with FLUX, Qwen Image, Z-Image, Anima or Krea-2 in ComfyUI and need output beyond the resolution those models were trained for, without retraining anything. Skip it if your workflow is SDXL or SD1.5 and you only need a faithful upscale, since only PixelRush covers those, or if you would rather run a natively high resolution model, in which case the patch is solving a problem you could avoid.
Can I use it commercially?
Yes. Apache-2.0 is a permissive licence: you can use, modify and sell software built on it, as long as you keep its copyright and licence notices.
Is it still maintained?
Yes. The repository last received commits 9 days ago.
What is it written in?
Mainly Python, according to GitHub's language statistics.

Answers come from the project's GitHub data, last synced on October 23, 2026, and from our analysis. They are not legal advice.

Editorial analysis

Patch the model once, then generate past its native size

The pitch in the About section is short and specific. These are training-free methods that push pre-trained diffusion transformer models far beyond their native resolution, with no retraining and no workflow changes, and the instruction is to patch the model once after your loader and generate at 2K, 4K and above.

That combination is what makes the pack interesting. A diffusion transformer normally has a resolution it was trained at, and asking it for more produces duplicated or collapsed structures rather than more detail. The usual answers are to retrain at the new size, which is expensive, or to upscale afterwards, which is a different look. The pack's answer is to adjust the model's positional behaviour at inference time so the same sampler produces usable high resolution output.

The integration cost is one node, placed after the model loader. The README's own caption calls it a simple, single-node integration to patch your model for high resolution generation, and the highlights claim it works with existing workflows, samplers and optimization nodes, with the adjustments happening on the fly and a negligible performance impact.

The supported architectures are listed as multi-architecture: FLUX, Nunchaku, Qwen Image, Qwen Image 2.1, Krea-2, Z-Image and Anima/Cosmos, and the headline resolution is 4096 by 4096 and beyond. The project is published to the Comfy Registry as DyPE by the publisher wildai.

Two families: model patches and image cascades

The section titled which method when is the most useful part of the documentation, because it draws a line that many similar tools blur.

There are two families. Model patches alter how your own KSampler run attends, they take no image input, and they are best for native high resolution generation. Cascades consume an existing latent or image and refine it.

That distinction is a workflow decision as much as a technical one. If you are starting from noise, the patch family is what you want, since your KSampler produces the image directly. If you are starting from an existing image, you are in the cascade family, and the choice there is about how faithful the result should be.

The quick picker in the README expands on it. Starting from noise means DyPE or SEGA, adding SPA if you see repeated or collapsed structures, and adding HAP for speed. Starting from an existing image means PixelRush to keep it faithful, FreeScale to re-imagine it at high resolution, with the note to lower its noise_timestep for more fidelity, and HiFlow for FLUX family flow models, which reuses the whole base-resolution denoising trajectory as guidance so structure survives while detail is re-synthesized. For FLUX or Z-Image at 2K and above from noise, I-Max is the dual-pass alternative, running its own low resolution guidance pass instead of patching the sampler.

That paragraph is the difference between a node pack and a method library. Each entry has a place in a decision, not just a name.

Eight nodes with eight different mechanisms

The node table names each method and the mechanism behind it, which is the clearest summary of the pack available.

DyPE is the core high-resolution method, dynamic position-encoding extrapolation, and it is the default recommendation for FLUX, Nunchaku, Qwen and Krea-2, Z-Image and Anima. SEGA is the alternative, content-aware spectral sharpening, described in the table as spectral-energy RoPE sharpening, and it sits alongside DyPE for the same model set.

SPA, positioned as part of HRDiT, fixes spatial disorder, meaning repeated or collapsed structures, at high resolution, using position-bundle attention alignment. HAP is the other half of HRDiT and handles speed with calibrated sparse attention.

The three cascades take your image. PixelRush is a patch-wise low-denoise img2img cascade that produces a faithful upscale with refinement, and it is the only method that covers SDXL and SD1.5. FreeScale is tuning-free self-cascade upscaling for FLUX family diffusion transformers, using scale-fused attention, and its output is mostly new content rather than a preservation of the original. HiFlow is trajectory-guided flow upscaling for rectified-flow models, using time-matched reference trajectory guidance, and it is the structure-faithful option for FLUX, Qwen-Image, Krea2 and Z-Image.

I-Max, new in the v2.19.0 line, is dual-pass resolution extrapolation for FLUX and Z-Image, where a native-resolution pass guides the target pass.

Support is uneven, and the README says exactly where

The model support table is the most valuable part of the documentation, because the gaps are stated rather than left to be discovered.

For FLUX including Nunchaku, all five patch methods are available, DyPE, SEGA, SPA, HAP and I-Max, along with the cascades. For Qwen-Image 1.0 and Krea-2, everything except I-Max is available. For Qwen-Image 2.1, DyPE, SEGA, SPA and the cascades work, HAP and I-Max do not. For Z-Image and Anima/Cosmos, everything is available, with the footnote that I-Max is Z-Image only and was new in v2.19.0, and that the Z-Image wiring skips the FLUX specific extras, so text duplication is ignored because Lumina-Next uses cross-attention, and guidance_low and guidance_high apply to FLUX only. For SDXL and SD1.5, only PixelRush applies.

The Qwen-Image 2.1 notes go deeper and are worth reading before you load a 2.1 checkpoint. The 2.1 VAE is a Wan 2.2 layout VAE with a 16 times spatial downscale and four output channels, and the cascades are RGB end to end, so they decode, sharpen and re-encode in RGB and drop the alpha channel, which is logged once per session naming the node. The base_shift and max_shift defaults are tuned for Qwen-Image 1.0 at native 1.15, while 2.1 ships with its own native shifts at base_shift of about 0.69, so over-smoothed or under-noised results should be fixed by setting base_shift to that native value first. The model_type should be set to qwen21 explicitly on DyPE, SEGA or SPA, and the pack ships its own EmptyQwenImage21LatentImage node for the 64 channel 16 times latent, since neither of core's other latent nodes matches.

Installing it as a ComfyUI node pack

The packaging is a standard Python project with ComfyUI registry metadata attached.

The project block of pyproject.toml looks like this:

toml
[project]
name = "ComfyUI-DyPE"
description = "DyPE & SEGA & PixelRush & HRDiT. Artifact-free 4K+ image generation. Flux, Nunchaku, Qwen, Z-Image, Anima, Krea-2, SDXL, SD1.5"
version = "2.19.1"
requires-python = ">=3.10"
license = {file = "LICENSE"}
dependencies = ["torch", "numpy"]

The runtime dependency list is short, since torch and numpy are all the pack adds on top of what ComfyUI already has:

code
torch
numpy

The Comfy-specific metadata is what registers it:

toml
[tool.comfy]
PublisherId = "wildai"
DisplayName = "DyPE"
Icon = "https://raw.githubusercontent.com/wildminder/ComfyUI-DyPE/refs/heads/main/dype-icon.png"
requires-comfyui = ">=0.28.0"

So the version floor to check is ComfyUI 0.28.0 or newer, and Python 3.10 or newer. The optional test extras are pytest, pytest-cov and tomli for Python below 3.11, which is the usual shim for the toml parser in older interpreters.

A Python package with a marked test suite

The repository is a normal Python project rather than a folder of loose custom node scripts, and the top level shows it: src/ for the implementation, nodes/ for the ComfyUI node definitions, tests/ for the test suite, calibration/ and configs/ for the method parameters, example_workflows/ for ready-made graphs, plus conftest.py, pyproject.toml, requirements.txt and a pre-commit configuration.

The pytest configuration is worth a look because the markers tell you how the project itself thinks about verification:

toml
markers = [
    "unit: Pure unit test (no ComfyUI dependency)",
    "mock_integration: Mock-based integration test",
    "comfyui_integration: Requires real ComfyUI runtime (--comfyui-real)",
]

Three tiers, from tests that need no ComfyUI at all, through mock-based integration tests, to tests that require a real ComfyUI runtime and are enabled with the --comfyui-real flag. That last tier is the one that matters for a pack whose whole job is to modify model internals, because a mock cannot tell you whether the patched model still produces a coherent image.

The linting configuration is Ruff, targeting py310 with a 120 character line length over src and tests, with the E, F, W and I rule sets selected and E501 ignored. The repository also carries a pre-commit configuration, so the checks run before a commit lands.

The release record moves quickly. Version 2.17.1, tagged QI-2.1, was published on 2026-10-06, v2.19.0 I-Max on 2026-10-09 and v2.19.1 on 2026-10-14, with the last push on the same day. The licence is Apache-2.0, and the pack is published to the Comfy Registry as well as to GitHub.

What the pack does not promise

Reading the highlights alone gives a misleading picture, and the rest of the README is where the boundaries are.

The first boundary is architecture. DyPE, SEGA, SPA and HAP are for the diffusion transformer families named in the support table, and for SDXL and SD1.5 the pack offers one method, PixelRush, which is a different thing entirely. The second is model version, where Qwen-Image 2.1 loses HAP and I-Max and needs its own shifts and its own latent node. The third is behaviour rather than availability: the cascades drop the alpha channel on Qwen-Image 2.1, and FreeScale deliberately produces mostly new content rather than a faithful enlargement.

There is also a dependency on the models' internals that is inherent to the approach. The pack adjusts how attention and positional encoding behave at inference time, which means it depends on how a given model version is implemented rather than only on its public interface. When a new checkpoint or a new architecture arrives, the support matrix is what tells you whether the pack has caught up, and the release names show a project that adds support by shipping new versions rather than by waiting.

The alternative approach to the same goal is a model trained at the resolution you want, where the artefacts were never introduced, at the cost of training. For an existing checkpoint, the honest comparison is with ComfyUI's own scaling and refinement nodes, which work on any model and make no assumptions about attention, at the cost of the structural coherence that these methods aim to preserve.

Editorial conclusion

Adopt ComfyUI-DyPE if you generate with FLUX, Qwen Image, Z-Image, Anima or Krea-2 in ComfyUI and need output beyond the resolution those models were trained for, without retraining anything. Skip it if your workflow is SDXL or SD1.5 and you only need a faithful upscale, since only PixelRush covers those, or if you would rather run a natively high resolution model, in which case the patch is solving a problem you could avoid. Before you build on it, read the model support table rather than the highlights, set the Qwen-Image 2.1 base_shift to that model's native value if results look over-smoothed, and check whether your ComfyUI version is 0.28.0 or newer. The last push was on 2026-10-14 and v2.19.1 was published the same day.

Frequently asked questions

What does the DyPE node in ComfyUI-DyPE actually do?

DyPE is the core high-resolution method, dynamic position-encoding extrapolation, and it alters how your own KSampler run attends so a pre-trained model can generate beyond its native resolution. It takes no image input and is aimed at native high resolution generation.

Which models does ComfyUI-DyPE support?

FLUX including Nunchaku, Qwen Image 1.0, Qwen Image 2.1, Krea-2, Z-Image and Anima/Cosmos, with SDXL and SD1.5 covered by PixelRush only. The support table marks HAP and I-Max as unavailable for Qwen-Image 2.1 and I-Max as Z-Image only among the Anima and Cosmos models.

Do I need to retrain the model to use ComfyUI-DyPE?

No. The README describes training-free methods that push pre-trained diffusion transformer models beyond their native resolution, with no retraining and no workflow changes. You patch the model once after your loader and generate at 2K, 4K and above.

What do I need to install ComfyUI-DyPE?

Python 3.10 or newer, ComfyUI 0.28.0 or newer, and the torch and numpy dependencies. The project metadata also carries Comfy registry fields with a publisher id of wildai, a display name of DyPE and the requires-comfyui version constraint.

Official sources

  1. Issues
  2. License: Apache-2.0
  3. README
  4. Releases
  5. wildminder/ComfyUI-DyPE on GitHub
Add this badge to your README

If you maintain this project, the badge below links readers to this analysis and shows its maintenance status from the daily GitHub snapshot. Paste the markdown into your README; add ?metric=license or ?metric=stars to the image URL for a different field.

Add this badge to your README

markdown
[![Hysen Labs](https://hysenlabs.com/badge/wildminder-comfyui-dype.svg)](https://hysenlabs.com/projects/wildminder-comfyui-dype)

Was this useful?