Extensions/ComfyUI-DyPE
ComfyUI Extension

ComfyUI-DyPE

DyPE for FLUX. Artifact-free 4K+ image generation.

By wildminder·Created 12 months ago·Updated about 17 hours ago· 634
wildminder/ComfyUI-DyPE
Nodes11
On cloudLocal install
CategoryWMNodes/image
Stars634
Updatedabout 17 hours ago
Readme
<div id="readme-top" align="center"> <h1 align="center">ComfyUI-DyPE</h1> <img src="https://github.com/user-attachments/assets/4f11966b-86f7-4bdb-acd4-ada6135db2f8" alt="ComfyUI-DyPE Banner" width="70%"> <p align="center"> ComfyUI custom node pack for <strong>ultra-high-resolution generation</strong> (4K and beyond) with Diffusion Transformers — <strong>FLUX</strong>, <strong>Qwen Image</strong>, <strong>Z-Image</strong>, <strong>Anima/Cosmos</strong>, <strong>Krea-2</strong>. <br />

Report Bug Request Feature

</p> </div> <!-- PROJECT SHIELDS --> <div align="center">

Stargazers Issues Forks

</div> <br>

▷ About

Training-free methods that push pre-trained DiT models far beyond their native resolution — no retraining, no workflow changes. Patch the model once after your loader and generate at 2K, 4K and above.

<div align="center"> <img alt="ComfyUI-DyPE example workflow" width="70%" src="https://github.com/user-attachments/assets/31f5d254-68a7-435b-8e1f-c4e636d4f3c2" /> <p><sub><i>A simple, single-node integration to patch your model for high-resolution generation.</i></sub></p> </div>

❖ Highlights

  • Multi-Architecture — FLUX, Nunchaku, Qwen Image, Qwen Image 2.1, Krea-2, Z-Image, Anima/Cosmos
  • High-Resolution Generation — 4096×4096 and beyond
  • Single-Node Integration — place after your model loader, done
  • Full Compatibility — works with existing workflows, samplers and optimization nodes
  • Zero Overhead — adjustments happen on-the-fly with negligible performance impact
<div align="center"> <img alt="Node" width="70%" src="https://github.com/user-attachments/assets/f85861fd-4d2f-4b57-8058-26881600b7ca" /> </div> <p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

▓ Nodes

| Node | What it does | |:---|:---| | ❖ DyPE | Dynamic Position Extrapolation — the core high-res method. | | ❖ SEGA | Content-aware spectral sharpening as an alternative to DyPE. | | ❖ SPA (HRDiT) | Fixes spatial disorder (repeated/collapsed structures) at high res. | | ❖ HAP (HRDiT) | Sparse-attention acceleration — the speed half of HRDiT. | | ❖ PixelRush | Cascade patch refinement of an existing base image. | | ❖ FreeScale | Tuning-free self-cascade upscaling. | | ❖ HiFlow | Trajectory-guided flow upscaling for rectified-flow models (FLUX, Qwen-Image, Krea2, Z-Image, …). | | ❖ I-Max | Dual-pass resolution extrapolation for FLUX and Z-Image — a native-resolution pass guides the target pass. | | ❖ AReA | Two-phase attention replacement for FLUX / Z-Image / Krea-2 / Qwen-Image-2.1 — coarse cross-scale attention, then detail-map-guided windows. |

Which method when?

Two families: model patches alter how your own KSampler run attends (no image input) — best for native high-res generation; cascades consume an existing latent/image and refine it.

| Method | Models | Mechanism | Takes your image | Output character | |:---|:---|:---|:---:|:---| | DyPE | FLUX, Nunchaku, Qwen/Krea-2, Z-Image, Anima | Dynamic position-encoding extrapolation | ✗ | Native high-res generation | | SEGA | FLUX, Nunchaku, Qwen/Krea-2, Z-Image, Anima | Spectral-energy RoPE sharpening | ✗ | Native high-res generation | | SPA | FLUX, Qwen/Krea-2, Z-Image, Anima | Position-bundle attention alignment | ✗ | Native high-res generation | | HAP | FLUX, Qwen/Krea-2, Z-Image, Anima | Calibrated sparse attention (speed) | ✗ | Native high-res generation | | PixelRush | Any (SDXL, SD1.5, FLUX, Qwen, …) | Patch-wise low-denoise img2img cascade | ✓ | Faithful upscale + refinement | | FreeScale | FLUX-family DiTs | Scale-fused attention + self-cascade | ✓ | Regenerative hi-res, mostly new content | | HiFlow | Flow models (FLUX, Qwen-Image, Krea2, Z-Image, …) | Time-matched reference trajectory guidance | ✓ | Structure-faithful flow upscale | | I-Max | FLUX, Z-Image | Dual-pass Projected-Flow guidance (low-res pass → target pass) | ✗ | Native high-res generation | | AReA | FLUX, Z-Image, Krea-2, Qwen-Image-2.1 | Two-phase attention replacement (pooled cross-scale → DWT-guided windows) | ✗ | Native high-res generation |

[!TIP] Quick picker: starting from noise → DyPE (or SEGA), add SPA if you see repeated/collapsed structures, add HAP for speed. Starting from an existing image → PixelRush to keep it faithful, FreeScale to re-imagine it at high res (lower its noise_timestep for more fidelity), HiFlow for FLUX-family flow models — it reuses the whole base-resolution denoising trajectory as guidance, so structure survives while detail is re-synthesized. For FLUX or Z-Image at 2K+ from noise, I-Max is the dual-pass alternative — it runs its own low-resolution guidance pass instead of patching the sampler. For FLUX, AReA takes the other road: it replaces image self-attention itself, so it layers on top of (not instead of) DyPE/SEGA positioning.

Model support

| Architecture | DyPE | SEGA | SPA | HAP | I-Max | AReA | PixelRush / FreeScale / HiFlow | |:---|:--:|:--:|:--:|:--:|:--:|:--:|:--:| | FLUX (incl. Nunchaku) | ✅ | ✅ | ✅ | ✅ | ✅ | ✅ * | ✅ | | Qwen-Image 1.0, Krea-2 | ✅ | ✅ | ✅ | ✅ | ❌ | ❌ | ✅ | | Qwen-Image 2.1 | ✅ | ✅ | ✅ | ❌ | ❌ | ❌ | ✅ | | Z-Image, Anima/Cosmos | ✅ | ✅ | ✅ | ✅ | ✅ * | ❌ | ✅ | | SDXL / SD1.5 | — | — | — | — | — | ❌ | ✅ (PixelRush) |

* Z-Image only (new in v2.19.0) — Anima/Cosmos are not supported by I-Max. The Z-Image wiring skips the FLUX-specific extras: text duplication is ignored (Lumina-Next uses cross-attention) and guidance_low/guidance_high apply to FLUX only. See the I-Max section.

* AReA — FLUX, Z-Image, Krea-2 and Qwen-Image-2.1, and not Nunchaku: its quantized/fused attention kernels bypass the attention seam, so the node warns and returns the model unchanged. See the AReA section.

Qwen-Image 2.1 notes

  • 16× RGBA VAE. The 2.1 VAE is a Wan-2.2-layout VAE with a 16× spatial downscale and four output channels. The cascades (PixelRush / FreeScale / HiFlow) are RGB end to end, so they decode, sharpen and re-encode in RGB and drop the alpha channel — logged once per session, naming the node. Everything else about the 16× VAE is handled automatically: latent_dim is 2, so no temporal dimension is invented. This is core's comfy.ldm.wan.vae2_2.WanVAE, not the 2D Qwen VAE — DYPE_ENABLE_QWEN2D_VAE has no effect on 2.1.
  • Noise-schedule shifts. The base_shift / max_shift defaults are tuned for Qwen-Image 1.0 (native 1.15). Qwen-Image 2.1 ships with its own native shifts (base_shift ≈ 0.69) — if results look over-smoothed or under-noised, set base_shift to 2.1's native value first.
  • model_type — set qwen21 explicitly on DyPE/SEGA/SPA for 2.1 graphs (auto also detects it). The 2.1 latent is 64 channels at 16×, so use this pack's EmptyQwenImage21LatentImage node — core's EmptyQwenImageLayeredLatentImage is the layered/edit latent (16 channels, 8×, 5-D) and EmptyLatentImage is 4 channels at 8×; neither matches.
  • qwen on a 2.1 model resolves to qwen21. Detection checks the class name before the requested string (src/model_detect.py), so a 2.1 checkpoint is never treated as 1.0 even if model_type: qwen is left selected — the same precedence Krea-2 has.
  • HAP is not supported on 2.1 and refuses with an actionable error rather than silently doing nothing. Use SPA for spatial-disorder repair, or DyPE/SEGA for extrapolation.

<a id="user-content-dype"></a>

❖ DyPE

Dynamic Position Extrapolation (paper, code). Adjusts positional encodings at each denoising step to match the current stage of generation — low-frequency structure early, fine detail later. Training-free, no additional sampling cost.

Usage: Load model → add DyPE (under WMNodes/image) → connect MODEL → set width/height to match your latent → connect to KSampler.

<details> <summary><b>Inputs & Parameters</b></summary>

Model Configuration

  • model_type
    • auto — auto-detects the architecture. Recommended.
    • flux — Standard Flux.
    • nunchaku — Quantized Flux.
    • qwen — Qwen Image (also used for Krea-2).
    • qwen21 — Qwen Image 2.1 (64-channel latent, 16× VAE).
    • zimage — Z-Image (Lumina 2).
    • anima — Anima/Cosmos.
  • base_resolution — native training resolution of the model.
    • Flux / Z-Image: 1024
    • Qwen / Krea-2: 1328
    • Anima/Cosmos: 1920 (auto-detected)

Method Selection (method)

  • vision_yarn — decouples structure from texture; best aspect-ratio robustness. Recommended default.
  • yarn — standard YaRN; good general performance.
  • ntk — very stable, but softer at high resolutions.
  • pi — Position Interpolation; preserves local structure well.
  • base — no interpolation.
Scaling Options
  • yarn_alt_scaling (only affects yarn): Anisotropic scales H/W independently (may stretch); Isotropic (default) is stable. Ignored by vision_yarn.

Dynamic Control

  • enable_dype — full dynamic algorithm (on), or schedule shift only (off).
  • dype_scale — magnitude of the modulation (default 2.0).
  • dype_exponent — strength over time: 2.0 for 4K+, 1.0 for ~2K–3K, 0.5 just above native.

Advanced Noise Scheduling

  • base_shift / max_shift — noise-schedule shift control (max_shift default 1.15).
</details>

[!TIP] Z-Image: isotropic scaling is enforced automatically. Prefer vision_yarn or ntk. Anima/Cosmos: prefer vision_yarn; other methods may produce speckle noise above 2K.

<p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

<a id="user-content-sega"></a>

❖ SEGA

Spectral-Energy Guided Attention (code). Content-aware RoPE sharpening derived from the latent's frequency spectrum. Use as an alternative to DyPE on FLUX/Qwen.

Usage: Add the SEGA node after your model loader → set width/height to match your latent → tune mscale_alpha and spread_min/spread_max.

<div align="center"> <img alt="Example sega" src="https://github.com/user-attachments/assets/c9d812c8-a88b-4e8d-bb84-0f4bd5ef18ef" /> </div> <details> <summary><b>Inputs & Parameters</b></summary>

| Parameter | Default | Description | |:---|:---:|:---| | method | sega | sega = NTK + spectral mscale, ntk = NTK only | | mscale_alpha | 0.15 | Spectral redistribution amplitude | | mscale_beta | 1.5 | tanh sharpness | | mscale_min | 1.0 | Floor for per-frequency mscale | | spread_min | 0.0 | Min spectral spread (early steps) | | spread_max | 1.0 | Max spectral spread (late steps) | | spread_alpha | 1.5 | Spread schedule non-linearity | | base_mscale_formula | power_res | power_res or log_res | | base_mscale_coefficient | 0.08 | κ (paper default) |

</details>

[!NOTE] SEGA builds on NTK. If NTK doesn't work for your model (e.g. Anima), use DyPE vision_yarn instead.

<p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

<a id="user-content-spa-hrdit"></a>

❖ SPA (HRDiT)

Spatial Position Alignment, from the HRDiT paper (arXiv 2608.07003). A static, training-free patch that fixes high-resolution spatial disorder — repeated structures and positional collisions when pushing past native resolution. Resolution-aware (automatic no-op ≤ 1024px) with bounded overhead at 2K/4K. Mechanism: bundles token positions into groups of N, slides the bundle boundary per axis (2s − 1 variants), and averages the attention outputs across variants — never the RoPE matrices themselves.

Usage: Add the SPA (HRDiT) node after your model loader → set width/height → leave model_type: auto → connect to KSampler. Recommended bundle_size: 3 at 2K, 5 at 4K (0 = auto).

<details> <summary><b>Inputs & Parameters</b></summary>

| Parameter | Default | Description | |:---|:---:|:---| | model_type | auto | Same detection as DyPE. Reads theta & axes_dim from the model. | | enable_spa | True | Disable to pass the model through unchanged. | | bundle_size | 0 (auto) | Tokens per bundle (paper's N). 0 = auto, 1 = off, 2..8 explicit. Auto no-op inside the model's trained extent (≤ 1024px). | | spa_steps | 3 | SPA runs only on the first 3 denoising steps; later steps run at baseline speed. 0 = all steps. | | spa_start_sigma | 1.0 | Optional sigma-threshold gate (combined AND with spa_steps). | | spa_layer_filter | "" | Restrict SPA to a subset of layers, e.g. "0-18,38-57". Empty = every layer. | | proportional_attention | False | HRDiT proportional attention scaling for long sequences. No-op at/below 1024px. |

Performance: ~zero overhead at ≤ 1024px; roughly 1.3–1.8× total inference time at 2K/4K with defaults.

Model support: FLUX, Qwen/Krea-2, Z-Image, Anima/Cosmos. Nunchaku not supported (logs a warning, returns the model unchanged).

</details>

[!WARNING] SPA and DyPE/SEGA are mutually exclusive — apply only one.

  • SPA — fix spatial disorder with small, bounded overhead.
  • DyPE/SEGA — full dynamic extrapolation far beyond native resolution.
<p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

<a id="user-content-hap-hrdit"></a>

❖ HAP (HRDiT)

Head-Adaptive attention Pruning, from the same HRDiT paper — the speed half complementing SPA (the quality half). Each attention head only sees the keys it actually needs, via a pre-calibrated scope plan executed through block-sparse attention. Composable with SPA in any order.

A ready-to-use FLUX scope plan ships at configs/scope_plan_flux.json.

Usage: Add the HAP (HRDiT) node after your model loader → point scope_plan_path at a plan JSON → connect to KSampler (optionally through an SPA node first).

<details> <summary><b>Inputs & Parameters</b></summary>

| Parameter | Default | Description | |:---|:---:|:---| | scope_plan_path | configs/scope_plan_flux.json | Path to the scope-plan JSON. Relative paths resolve against the repo root. Also accepts a linked scope_plan input. | | model_type | auto | Architecture detection. Nunchaku unsupported. | | anchor_stride | 0 | Every Nth image key block stays globally visible. 0 = off. | | text_len | 512 | Leading text tokens always kept visible. | | enable_hap | True | Disable to pass the model through unchanged. | | proportional_attention | False | See SPA. Either node may enable it. |

Backends: fast path needs CUDA + PyTorch ≥ 2.5; otherwise falls back automatically to a correct dense-mask backend.

</details> <details> <summary><b>Calibration</b></summary>

Scope plans are model-specific. Calibrate a custom plan with the HAP Calibrate (HRDiT) node in-graph, or via the calibration/calibrate_hap.py CLI:

# Self-contained dry run (no GPU needed):
python calibration/calibrate_hap.py --dry_run --out tmp/scope_plan_toy.json

# Real-model calibration:
python calibration/calibrate_hap.py --model_path /path/to/flux.safetensors \
    --model_type flux --width 4096 --height 4096 --num_prompts 30 \
    --out configs/scope_plan_flux_4k.json

Calibrate once per model, then reuse the plan across resolutions and prompts.

From the paper (FLUX, budget 0.1): ~2.9× faster attention at 2K, ~5.5× at 4K.

</details> <p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

<a id="user-content-pixelrush"></a>

❖ PixelRush

Cascade-based refinement node. Generates at native resolution first, then progressively adds detail through coarse-to-fine cascade refinements — producing crisp 4K output without regenerating the whole image from noise. Works with any ComfyUI model (SDXL, SD1.5, FLUX, Qwen, …).

Usage: Generate a base latent at native resolution → connect model, vae, positive, negative and the base latent_image → set num_cascade_stages (1 = 2× upscale, 2 = 4×, 3 = 8×) → decode the output latent.

<details> <summary><b>Inputs & Parameters</b></summary>

| Parameter | Description | |:---|:---| | num_cascade_stages | Number of cascade stages — each doubles the resolution. | | refiner_model | Optional separate refiner model (paper setup: SDXL base + SDXL-Turbo). When not connected, the base model refines too. | | noise_lambda | Noise injection coefficient — the weight of the model's prediction (paper default 0.95 = 95% prediction + 5% random noise). | | noise_injection | slerp (paper default) or additive (legacy pre-2.9 behavior, kept for workflows tuned against it). | | overlap | Overlap between adjacent patches (blends seams). | | gaussian_sigma | Analytic Gaussian feather sigma (paper default 24; rule of thumb: σ ≈ patch_size / 5). | | patch_h / patch_w | Latent patch size (~native spatial size keeps VRAM flat). |

[!NOTE] PixelRush calls the diffusion model directly (not through ComfyUI's sampler), performing its own CFG and prediction-type handling for EPS, flow, V-prediction and X0 models.

[!IMPORTANT] 2.9 migration notes: the noise injection now uses the paper's SLERP with λ weighting the model's prediction (set noise_injection to additive for the legacy formula); gaussian_sigma default moved 8 → 24 and its range extends to 128; the gaussian_kernel_size input was removed (the mask is now the paper's analytic Gaussian — old workflows simply ignore the stale value).

</details> <p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

<a id="user-content-freescale"></a>

❖ FreeScale

Tuning-free higher-resolution generation via scale-fused attention and self-cascade upscaling (paper, code). Supports FLUX-family DiTs (auto-detected); base-resolution inputs pass through untouched.

<details> <summary><b>Inputs & Parameters</b></summary>

| Input | Default | Notes | |:---|:---:|:---| | width / height | 2048 | Target resolution (snapped to multiples of 16). | | steps | 20 | Sampler steps per cascade stage. | | cfg | 1.0 | Classifier-free guidance scale. | | cascade_stages | 1 | Number of self-cascade stages (each doubles resolution). |

</details> <p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

<a id="user-content-hiflow"></a>

❖ HiFlow

Training-free high-resolution upscaling for rectified-flow models (FLUX, Qwen-Image, Krea2, Z-Image, …) via flow-aligned guidance (paper, NeurIPS 2025). The base-resolution sampling runs once, recording every per-step clean prediction; each upscale stage then reuses that time-matched trajectory as a virtual reference — initialization alignment seeds the stage from it, direction alignment keeps low frequencies true to it, acceleration alignment matches its detail-generation rhythm. Structure survives; high-res detail is synthesized fresh.

Usage: connect model (flow models only), vae, positive, negative and a base latent at native resolution (e.g. EmptySD3LatentImage) → set noise_seed + scale_factor → decode. The cascade noises the latent to the first sigma itself — an empty latent + seed reproduces the reference pipeline's from-noise start. Chain DyPE (ntk) before the loader for RoPE extrapolation at the scaled resolution.

<details> <summary><b>Inputs & Parameters</b></summary>

| Parameter | Default | Description | |:---|:---:|:---| | cfg | 3.5 | Base-stage CFG (FLUX-dev default). Guidance-free models (Z-Image, Chroma) or empty negatives: leave at 1.0 — CFG is auto-skipped when the negative carries no tokens. | | steps | 30 | Base-stage steps; their clean predictions form the reference trajectory. | | guidance | 4.5 | Guided-stage CFG (paper uses 4.5–6). Same auto-skip rule as cfg. | | steps_per_stage | 16 | Guided steps per cascade stage (upper bound — the stage walks schedule sigmas below tau). | | noise_seed | 0 | Seed for the base noise and each stage's initialization noise. | | denoise | 1.0 | Img2img strength for a content latent (KSampler convention): 1.0 regenerates from pure noise; lower keeps more of the input (ignored for an empty latent). | | tau | 0.6 | Stage-entry noise level (paper cascade: 0.6, 0.3, 0.3). Lower = stronger content preservation. | | filter_ratio | 0.2 | Butterworth low-pass cutoff D for direction alignment (paper 0.4, repo 0.2). | | alpha_scale / beta_scale | 1.0 / 0.5 | Direction / acceleration strength multipliers. | | upsampling | latent | Per-step reference upsample: latent bicubic (repo default) or pixel decode→sharpen→encode. The stage anchor is always the pixel round-trip. | | scale_factor | 2.0 | Output scale relative to the input latent: 2 = double each side, 1 = unchanged, 0.5 = half. Upscales run 2× doubling stages (scales between 1 and 2 give one 2× stage); below 1 runs one refinement stage at the smaller size. |

</details>

[!TIP] HiFlow inherits the reference's structure — including its mistakes. Generate a good base first; tau lower keeps more of it, higher re-imagines. 3D-latent image models (Krea2, Qwen-Image — Wan21 format, Qwen VAE) work as single-frame (T=1) latents; actual multi-frame/video input is rejected.

<p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

<a id="user-content-imax"></a>

❖ I-Max

Tuning-free resolution extrapolation for FLUX and Z-Image (paper): instead of patching your sampler, the node runs two passes itself. Pass A generates at the native-area low resolution; its result becomes the fixed guidance latent — verbatim when pass A already ran at the target geometry, otherwise bicubic-upsampled in latent space to the target grid (no VAE round trip: re-encoding distorts latent statistics). Its Haar low-pass becomes the guidance target. Pass B generates at the target resolution while its clean predictions are pulled toward that target (Projected Flow, paper §2.2) — and an inference toolkit compensates the resolution gap: an NTK-aware RoPE base multiplier, proportional attention scaling and per-tile text duplication (paper §2.3).

Usage: connect model, vae, positive, negative and an empty latent at the TARGET resolution (e.g. EmptySD3LatentImage at 2048×2048) → set noise_seed → decode. A content latent + denoise < 1 runs img2img at the target size.

Z-Image (v2.19.0): the toolkit adapts to Z-Image's Lumina2 NextDiT arch, which calls its RoPE embedder once per token group instead of over the joint stream — the NTK clip applies per group (the image grid clips against its own length; the caption takes the paper's model-wide NTK scaling with no floor), and proportional attention rides the global attention seam so chained SPA/DyPE patches keep composing. The padded caption length (Z-Image pads text to multiples of 32) feeds the attention anchor, and a chained DyPE/SEGA/SPA embedder still triggers the takeover warning. Two FLUX-specific extras are skipped: text duplication is ignored with a console warning (Lumina-Next uses cross-attention) and guidance_low/guidance_high are FLUX-only (Z-Image is guidance-distilled). Same empty latent — Z-Image shares Flux's 16-channel 8× latent format, so EmptySD3LatentImage works there too.

[!TIP] Z-Image Turbo: guidance schedules trade some contrast for low-pass structure-following — distilled checkpoints re-sharpen less than FLUX between pulls, and full-strength corrections hallucinate swirls at extrapolated targets. Set guidance_strength 0.25–0.5 for clean structure-following, prefer steps_low 8–12 with time_shift_low 3.0 for a sharp low pass, or use guidance_schedule=disable for the model's native look.

<details> <summary><b>Inputs & Parameters</b></summary>

| Parameter | Default | Description | |:---|:---:|:---| | noise_seed | 0 | One shared generator: pass A's start noise, then pass B's img2img noise. | | denoise | 1.0 | Img2img strength for pass B only (ignored for an empty latent — that always runs the full schedule). | | cfg | 1.0 | CFG for both passes. FLUX-dev: leave at 1.0; auto-skipped when the negative carries no tokens. | | steps_low / steps_high | 30 / 20 | Steps of the low-res guidance pass / the target-resolution pass (paper values). | | guidance_low / guidance_high | 3.5 / 5.0 | FLUX guidance embed written into copies of the conditioning per pass (FLUX only — ignored for Z-Image, which is guidance-distilled). 0.0 keeps whatever a chained FluxGuidance set. | | time_shift_low / time_shift_high | 3.0 / 6.0 | Static flow shift of each pass's sigma schedule — the node owns both schedules, no model_sampling patch is involved. | | ntk_factor | 10.0 | NTK-aware RoPE base multiplier for the high pass (paper: 10 for Flux.1-dev); 1.0 = plain RoPE. | | dwt_level | 1 | Haar low-pass level of the guidance projection; higher = coarser guidance detail. | | guidance_schedule | cosine_decay | Projected-Flow guidance schedule: cosine_decay (paper default), cosine_shift, constant, or disable (plain Euler). | | guidance_strength | 1.0 | Linear scale on the Projected-Flow correction (1.0 = the paper's unscaled pull; 0 = disable). Distilled checkpoints (Z-Image Turbo) hallucinate swirls/noise at extrapolated targets at full strength — use 0.25–0.5 there. | | proportional_attention | True | Scale the attention temperature with the joint sequence length (no-op at/below the native 1024 px). | | text_duplication | True | Duplicate text tokens per native 1024 px tile to keep the image/text token ratio in distribution (FLUX only — ignored for Z-Image, which cross-attends text). | | low_res_scale | 1.0 | Scales the low-res pass area (1.0 = the paper's native-area guidance). |

</details>

[!NOTE] The node runs its own sampling (both passes) — place it where a KSampler would sit, feeding an empty latent at the target size. Only FLUX and Z-Image are accepted; other architectures are rejected with an actionable error — including MingImage (multi-frame Z-Image), the pixel-space Z-Image variant (no VAE round trip) and plain Lumina2 (trained at a different RoPE base).

<p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

<a id="user-content-area"></a>

❖ AReA

Training-free two-phase replacement of FLUX / Z-Image / Krea-2 / Qwen-Image-2.1 image self-attention (arXiv 2610.17227). Instead of one dense attention over the whole canvas, the denoising run gets a time-dependent attention graph that follows the coarse-to-fine shape of sampling itself:

  • Phase I (coarse). The first phase1_steps steps pool image keys/values to one token per f x f block (f ramps f₀ → 2 over the phase) and run cross-scale attention on the pooled position grid, while the queries stay at full resolution. Keys are pooled before the position rotation, so the pooled tokens live in the query's frame.
  • Phase II (fine). The remaining steps run windowed attention: the window sizes come from the image's Haar-DWT detail map (smooth tiles split into quadrants), each window is widened by a Halo ring whose four sides draw their own width in [0, halo] — and each row/column its own reach — at every step, and each also attends a bridge of round(rho·w)² of the canvas's most distinctive unrotated keys spread over an 8×8 cell grid. Overlapping windows merge with centre-weighted (raised-cosine) blending.

Window sizes and the bridge/Halo budget are chosen to keep a windowed step at or below the cost of full attention, and the schedule is built per canvas and cached across the run. At or below the native 64-patch (1024 px) extent AReA is a provable no-op — nothing is patched and attention is delegated untouched.

Usage: Load an unmodified FLUX / Z-Image / Krea-2 / Qwen-Image-2.1 model → add AReA (under WMNodes/image) → set width/height to match your empty latent (multiples of 16) → connect to KSampler. Keep going past 1024 px on the longer side for AReA to engage.

Z-Image: same node, model_type: auto detects it. Turbo schedules are short (8 steps), so both the pooling and the Phase I/II switch default to the Z-Image-tuned values (pooling: mean, phase1_mode: sigma at phase1_sigma — the handoff follows the schedule, 3 of 8 coarse steps); the node still warns when a fixed phase1_steps would flood the run. A short schedule also turns on the bridge floor (bridge_floor_steps, default 2 — the first fine steps keep the paper's full bridge and halo instead of the cost cap) and the window-ramp knobs (window_start / window_hold_steps); all three are inert on a long (28-step) schedule.

Qwen-Image-2.1: same node, model_type: auto detects it. Its Phase I keeps one real token per block (pooling: medoid) — a blended value behind a synthetic centroid key puts several contents behind one position and reads as a doubled face — and its Phase II prices the window it actually runs, so the bridge and Halo stay alive on a tall canvas.

Bootstrap (paper Appendix F) — experimental, does not work on Z-Image Turbo yet: phase1_mode: bootstrap itself is ready (it runs Phase II only, and the entry-sigma check warns when a sampler enters off-level), but the two-sampler construction — native 1024 pass, latent ×2 upscale, re-noise to phase1_sigma, then the target pass — has failed two GPU validation rounds on Z-Image Turbo's 8-step schedule (round 1: an under-denoised pre-pass the windowed steps could not finish; round 2, faithful to the paper with a full native pre-pass: the windowed pass inflates latent amplitude ~1.8×, so the decode keeps the composition but corrupts the palette). Do not use the recipe on Turbo until that is solved; the validated Z-Image knobs remain phase1_steps 1-3 or sigma mode.

<details> <summary><b>Inputs & Parameters</b></summary>

| Parameter | Default | Description | |:---|:---|:---| | model_type | auto | Architecture detection (auto / flux / zimage / krea2 / qwen21); a mismatch with the loaded model is refused with an actionable error. | | width / height | 2048 | Target resolution (multiples of 16). These decide the apply-time checks — the native-extent no-op and the geometry pre-check — so keep them in step with your latent; at each forward AReA re-derives the patch grid from the latent itself and validates the token count against its schedule. A grid whose dimensions share no factor (512×2000 and friends) is adjusted, not refused — the edge block pools partially, the node warns once, and the output resolution is unchanged. | | phase1_mode | auto | auto (per backbone: sigma on Z-Image, the reference's steps on FLUX) / steps (the leading phase1_steps steps pool) / sigma (the switch follows the schedule) / bootstrap (no Phase I at all — the paper's Appendix F recipe, see below). | | phase1_steps | 8 | Phase I length when the mode is steps; 8 = the FLUX constant of 28. On Z-Image Turbo's short schedules use 1-3 (or sigma) — the node warns when pooling would flood the run. | | phase1_sigma | 0.89 | Phase I/II boundary when the mode is sigma, and the handover level bootstrap expects. | | halo / bridge_ratio / seed / pooling | 8 / 0.5 / 0 / auto | Phase II's ring width (patches, drawn fresh per side at every step), global-bridge size round(rho·w)², the keyed RNG seed, and which token of each f x f block the pooled key/value comes from (auto = medoid on Qwen-Image-2.1, mean on Z-Image and Krea-2, subsample on FLUX). | | enable_area | True | Disable to pass the model through unchanged. | | phase1_steps | 8 | Leading denoising steps that run Phase I, clamped to the total step count. 8 is the reference's FLUX constant (of 28); 0 = all Phase II (windowed attention from the first step). | | pooling | auto | Which token of each f x f block the pooled key/value comes from: auto (medoid on Qwen-Image-2.1, mean on Z-Image and Krea-2, subsample on FLUX), subsample (block centre), mean (block average for values; keys take the block-mean direction rescaled to the mean member norm, so the centroid keeps every token contributing while the norm keeps the attention temperature at the un-pooled one), medoid (the token closest to the block-mean key), random (drawn per seed, step and block). | | halo | 8 | Widest Halo ring a Phase II window may draw, in patches (0–64). Each side draws its own fresh width every step; AReA narrows it only when a windowed step would otherwise cost more than full attention. | | bridge_ratio | 0.5 | Rho of the bridge: each window also attends round(rho·w)² of the canvas's most distinctive keys, spread over an 8×8 cell grid so no region is starved. 0 = no bridge. | | bridge_floor_steps | 2 | Short schedules only (≤ 12 total steps): how many leading Phase II steps keep the paper's full bridge and halo instead of the cost-capped ones — the cap starves the bridge exactly on the composition-critical steps. 0 = the cap on every step; long schedules ignore this knob. | | window_start | 0 | Short schedules only: the window side (patches) Phase II starts its ramp at, instead of the cost-optimal size (0 = cost-optimal). Clamped into [w_min, grid]; the ramp still ends at w_min. | | window_hold_steps | 0 | Short schedules only: extra Phase II steps that hold the start window before the ramp shrinks it. | | seed | 0 | Seed of every draw (tile placement, Halo widths and reaches, random pooling). |

[!TIP] Determinism: every draw is keyed by (seed, step) — no global RNG is read — and cond and uncond share one batched forward, so both CFG branches attend through identical windows, halos and bridges. Same seed, same layout.

[!IMPORTANT] Model support: FLUX, Z-Image (Lumina2 / NextDiT), Krea-2 and Qwen-Image-2.1. Nunchaku is not supported — its quantized/fused attention kernels bypass the attention seam, so the node warns and returns the model unchanged. AReA replaces attention itself, so on the steps it runs it takes precedence over an installed SPA/HAP hook (plain-attention steps and the native extent still delegate to it), and a chained DyPE/SEGA positional embedder composes — AReA's coarse positions ride on whichever embedder is installed, with a one-time warning when that embedder is dynamic.

<p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

▓ Node Reference

All nodes registered by this pack (V3 schema ids):

| Node id | Display name | Purpose | |:---|:---|:---| | DyPE_FLUX | DyPE | Dynamic Position Extrapolation for ultra-high-res generation. | | SEGA | SEGA | Spectral-Energy Guided Attention (content-aware sharpening). | | SPA | SPA (HRDiT) | Spatial Position Alignment — fixes spatial disorder. | | HAP | HAP (HRDiT) | Head-Adaptive attention Pruning — the speed half. | | HAPCalibrate | HAP Calibrate (HRDiT) | In-graph scope-plan calibration for HAP. | | PixelRushNode | PixelRush | Cascade refinement for existing latents. | | FreeScaleNode | FreeScale | Tuning-free scale-fusion + self-cascade upscaling. | | HiFlowNode | HiFlow | Trajectory-guided flow upscaling (initialization + direction + acceleration alignment). | | IMaxNode (IMax) | I-Max | Dual-pass resolution extrapolation for FLUX and Z-Image (Projected-Flow guidance + NTK RoPE + proportional attention). | | EmptyQwenImage21LatentImage | Empty Qwen Image 2.1 Latent | Empty 64-channel latent at 16× for Qwen-Image 2.1 text-to-image sampling (core ships none). | | AReA | AReA | Two-phase attention replacement for FLUX / Z-Image / Krea-2 / Qwen-Image-2.1 (pooled cross-scale Phase I, DWT-guided windowed Phase II with Halo rings and a global-KV bridge). |

<p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

▓ Getting Started

Via ComfyUI Manager: Search ComfyUI-DyPE → Install.

Manual install:

cd ComfyUI/custom_nodes/
git clone https://github.com/wildminder/ComfyUI-DyPE.git

Restart ComfyUI. No further dependency installation is required.

<p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

▓ Tips & Best Practices

[!IMPORTANT] Limitations at Extreme Resolutions (4K): you are pushing a model trained on ~1 megapixel toward 16 megapixels — minor artifacts can still appear even with these methods.

[!TIP] Speckle noise at 4K+: increase dype_exponent (e.g. 3.0–4.0) or apply smoothing / detailer LoRAs.

[!TIP] Experiment: there is no single magic setting — try different methods and adjust dype_exponent for the best sharpness/artifact balance.

<p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

▓ Changelog

v2.20.0 — 2026-10-15

  • New AReA node — training-free two-phase replacement of image self-attention (arXiv 2610.17227) on FLUX, Z-Image (Lumina2 / NextDiT), Krea-2 and Qwen-Image-2.1. The leading phase1_steps pool the image keys/values to one token per f x f block and run cross-scale attention on the pooled position grid while the queries stay at full resolution; the remaining steps run windowed attention whose window sizes come from the image's Haar-DWT detail map (smooth tiles split into quadrants), each window widened by a per-side randomized Halo ring (every side draws its own width, every row/column its own reach, at every step) and extended with a bridge of round(rho·w)² of the canvas's most distinctive unrotated keys spread over an 8×8 cell grid, merged back with centre-weighted (raised-cosine) blending.
  • Phase I keeps one real token per block on Qwen-Image-2.1. The pooled key/value comes from auto = medoid on 2.1 (the token whose key is closest to the block-mean key, so its key and its value belong to one real token), mean on Z-Image and Krea-2, subsample on FLUX. A synthetic centroid key over a blended value puts several contents behind one position, which reads as a doubled, imploded face.
  • Phase II prices the window it actually runs. A clipped window is priced by its true area and the side is chosen so the bridge and Halo stay alive — a side that would starve the bridge (the 4096×4096 canvas was picking a window with no bridge at all) is not taken. The bridge rides the model's own rope frame: at its true positions on FLUX and Qwen-Image-2.1, and re-roped inside the trained 64-token extent on Z-Image and Krea-2, whose rope wraps far faster.
  • Deterministic by construction. Every tile, Halo and RNG-pooling draw is keyed by (seed, step) — no global RNG is read — and cond/uncond share one batched forward, so both CFG branches attend through identical windows, halos and bridges. The step index is located from the sampler's own sigma table; a path that exposes no sigma schedule degrades to a one-time warning plus plain attention instead of a guessed schedule.
  • Composition and scope. AReA replaces the backbone's attention call itself, so it composes with rather than collides with the SPA/HAP hooks one level below — plain-attention steps and the native extent still delegate to them — and its coarse-grid positions ride on whichever positional embedder is installed, so a chained DyPE/SEGA embedder keeps composing. Nunchaku — whose quantized/fused kernels bypass the attention seam — warns and returns the model unchanged; at or below the native 64-patch (1024 px) extent AReA is a provable no-op.

v2.19.1 — 2026-10-14

  • Fixed SPA/HAP crash on current ComfyUI (AttentionTensorContainer' object has no attribute 'shape'). Core's wrap_attn normally unwraps the single-owner containers itself, but the HRDiT wrapper patches the bound backend symbols and therefore sits outside wrap_attn — it now unwraps at the boundary and wraps each delegated pass in fresh containers (Krea-2 produces containers at its attention call), and HAP calibration unwraps at its two chunked-attention replacements.

v2.19.0 — 2026-10-07

  • I-Max now supports Z-Image (previously FLUX-only). The model gate widens to Z-Image's Lumina2 NextDiT arch behind explicit guards: MingImage (multi-frame Z-Image), the pixel-space ZImagePixelSpace variant (operates on raw RGB patches, no VAE round trip) and plain Lumina2 (trained at RoPE theta=10000 vs. Z-Image's 256) are each rejected with an actionable error naming the reason and the remedy.
  • Per-group NTK RoPE clip. Lumina's NextDiT calls its RoPE embedder once per token group (caption, siglip, image ids) instead of over the joint stream, so the NTK-aware clip re-derives per group: the image group clips against its own group length, the caption group takes the paper's model-wide NTK scaling with no floor (the Flux (N − 512) numerator would be zero on text t-ids). ntk_factor=1 stays a bitwise identity to the installed EmbedND, and a chained DyPE/SEGA/SPA embedder still triggers the takeover warning.
  • Proportional attention on the global seam. Lumina blocks have no attn1_patch, so the z-image profile installs the same q *= sqrt(log(N, anchor)) scale as a transformer_options["optimized_attention_override"] instead: the anchor is the native 64×64 image grid plus the padded caption (Z-Image pads text to multiples of 32 — that length feeds the anchor), the scale clamps to an exact no-op at/below it, a pre-existing comfy attention override is chained with the scaled q, and the call resolves the lumina optimized_attention_masked symbol lazily so chained SPA rebindings compose. The per-call sequence-length approximation at refiner scales is bounded (≤1% ratio error) and documented in the override.
  • FLUX extras skipped for Z-Image. Text duplication warns once and installs nothing (the paper applies it to MMDiT Flux; Lumina-Next uses cross-attention and lumina blocks have no post_input seam), and the guidance embeds (guidance_low / guidance_high) are FLUX-only — Z-Image is guidance-distilled, so its conditioning passes through untouched. Flow schedules, NTK factor, guidance projection and the dual-pass engine are unchanged, and the FLUX route (attn1_patch / post_input / guidance override / joint clip) is byte-identical to v2.18.0.
  • Guidance latent built in latent space (no VAE round trip). Pass A's clean prediction becomes the guidance latent directly: verbatim when pass A already ran at the target geometry (a console note marks it), or bicubic-upsampled in latent space to the target grid when it ran below. The v2.18.0 image-space round trip (decode → bicubic → re-encode) re-encoded the guidance at ~1.8× the natural latent std with ~35× the high-frequency energy (VAE encoder re-normalization + sampling noise) — measured on z_image_turbo, that off-manifold guidance was the "noisy / muted / needs more denoise steps" failure of every guidance schedule, at native and extrapolated targets alike; the latent-space build keeps the guidance on pass A's statistics and roughly tripled the final's edge energy at extrapolated targets. An advisory still notes that on Z-Image the schedules trade some contrast for structure-following (distilled Turbo re-sharpen less than FLUX between pulls).
  • guidance_strength input (correction scale). At extrapolated targets the Projected-Flow correction reaches ~0.74 of the prediction's magnitude per early step — FLUX's undistilled sampler absorbs that, but distilled Z-Image Turbo hallucinated swirls and flat-region noise (2.5–4× the unguided control, measured at 1536 px; dwt_level and step/shift changes don't touch it). The input linearly blends every scheduled correction toward the uncorrected prediction (1.0 = the paper's unscaled pull, 0 ≡ disable); on Turbo at 2K+ use 0.25–0.5 — the low-band anchoring holds at control-level noise.

v2.18.0 — 2026-10-06

  • New I-Max node — tuning-free resolution extrapolation for FLUX (arXiv 2410.07536). The node runs a dual pass itself: a native-area low-resolution pass builds a fixed guidance latent (decode → bicubic → encode → Haar low-pass), and the target-resolution pass runs with Projected-Flow guidance pulling every clean prediction toward it (paper §2.2). The resolution gap is compensated in the target pass by an NTK-aware RoPE base multiplier, proportional attention and per-tile text duplication (paper §2.3). I-Max owns both flow schedules (time_shift_low / time_shift_high) — no model_sampling patch, and the target-pass patches ride per-pass model options that leave chained SPA/HAP/DyPE patches untouched. Feed an empty latent at the target resolution (EmptySD3LatentImage); non-FLUX models are rejected with an actionable error.

v2.17.1 — 2026-10-06

  • Fixed the cascade crash on Qwen-Image 2.1 (Boolean value of Tensor with more than one value is ambiguous, user-reported on HiFlow): 2.1 keys its prefix K/V cache on the latent shape, so a cascade's shape change allocates a second cache slot and core's LRU eviction then compares two tensor-valued dicts. PixelRush, FreeScale and HiFlow now switch that cache off — it buys a cascade nothing, and the override wins over an upstream QwenImage21Cache node.
  • Hardened the SPA wrapper: a Qwen-Image 2.1 attention call without a head count now declines to plain attention instead of raising.

v2.17.0 — 2026-10-05

  • Qwen-Image 2.1 support. New model_type: qwen21 for DyPE, SEGA and SPA; auto detection recognizes it too. 2.1's latent is 64 channels at a 16× VAE downscale with patch_size 1, and its positional embeddings are built and used in fp32 — the pack now handles both explicitly instead of relying on a 1.0-shaped fallback.
  • HAP refuses Qwen-Image 2.1 with an actionable error naming the model, the mechanism (block-causal attention splits each block into per-segment calls: text segments are masked, the image segment is non-square) and the remedy (use SPA, DyPE or SEGA) — rather than silently no-op'ing.
  • New node EmptyQwenImage21LatentImage. Core ships no text-to-image empty latent for 2.1 (EmptyQwenImageLayeredLatentImage is the layered/edit latent: 16 channels, 8×, 5-D; EmptyLatentImage is 4 channels at 8×). This one is 64 channels at 16×, with width/height as inputs and snapped to multiples of 16.
  • Cascades handle the 16× RGBA VAE. Qwen-Image 2.1's VAE decodes [B, H, W, 4]. PixelRush, FreeScale and HiFlow now decode to RGB and re-encode with the VAE's own opaque-alpha pad value, so their channels-first/channels-last layout probes keep working. Alpha is not preserved end to end — the drop is logged once per session, naming the node. All other architectures take an unchanged path.
  • Cascades disable Qwen-Image 2.1's prefix K/V cache. PixelRush, FreeScale and HiFlow change latent shape between stages, and 2.1's cache is keyed on that shape — so each stage allocates a slot and core's LRU eviction then raises Boolean value of Tensor with more than one value is ambiguous. The cache also buys a cascade nothing (the shape change invalidates it), so the three nodes switch it off, overriding a QwenImage21Cache node placed upstream.
  • Shipped example workflow for Qwen-Image 2.1 (loaders → DyPE → text encode → empty latent → KSampler → decode) plus the notes that matter for it: base_shift/max_shift defaults are tuned for 1.0's native 1.15, not 2.1's ~0.69, and DYPE_ENABLE_QWEN2D_VAE does not apply (2.1 is core's WanVAE).
<details> <summary><b>v2.16.0</b></summary>

v2.16.0 — 2026-09-17

  • Fixed run-to-run result drift (user-reported: identical parameters produced different results with Krea 2 turbo unless model and node caches were cleared first). HiFlow, PixelRush, and FreeScale now derive their sigma schedules and timestep conversions from the graph's own model patch instead of the shared model's live state, which ComfyUI can leave patched by a previous run's node combination. The DyPE/SEGA schedule-patch decision is equally history-independent, and HiFlow/PixelRush log a console warning when a stale patch from a previous run is detected.
  • HiFlow: new sharpen input (default 1.0 = previous behavior). Controls the unsharp mask applied to the pixel round-tripped stage anchor; set 0 to disable — recommended for turbo/low-step models that show jagged, over-sharpened tone boundaries.
  • HiFlow warns when upscaling far beyond the base resolution without a positional-embedding patch (jagged aliasing is likely there — chain DyPE for >2× upscales).

v2.15.0 — 2026-09-08

  • Restructured the pack layout + unified the node category. All node definitions now live in a dedicated nodes/ folder (nodes/dype.py, sega.py, spa.py, hap.py, hap_calibrate.py, freescale.py, pixelrush.py, hiflow.py); src/ holds engines/implementation only and the pack __init__.py just registers the extension. All 8 nodes moved to the single WMNodes/image menu category (previously split across two menu paths). No node ids, inputs, defaults, or behavior changed — workflows keep loading. Also merges PR #41 (FreeScale fp16 antialiased-bicubic crash fix).

v2.14.1 — 2026-09-07

  • Fixed HiFlow Krea2/Qwen-Image noising crash (user-reported torch.cat size mismatch, "Expected size 1 but got size 16"): the v2.12.1 model-space noising called the model's process_latent_in on the 4D core tensor, but Wan21's per-channel mean/std stats are shaped [1,C,1,1,1] — a 4D tensor against 5D stats broadcasts silently to [B,C,C,H,W] garbage (the model reads T=16=channels). The node now wraps the noising conversions ndim-transparently: unsqueeze → convert in true 5D model space → squeeze back, so the cascade's σ-mix runs on 4D tensors with correctly-normalized values. The node-test mock now uses Wan21-faithful stats (replicating the broadcast hazard — the earlier affine mock masked the bug class).

v2.14.0 — 2026-09-07

  • HiFlow: 3D-latent image model support — Krea2 and Qwen-Image work now (plan 2026-09-07, user-reported Krea2 "does not support 3D-latent (video) models" rejection). These models are image models with a 5D Wan21-style latent layout [B,C,1,H,W] (Qwen VAE) — the old gate conflated 5D tensors with video. The gate now accepts latent_dimensions=3 image models and rejects only actual multi-frame (T>1) input; the node bridges 5D↔4D around the 4D core (the PixelRush convention): latents squeeze on entry and re-expand on output, the model-call adapter unsqueezes before process_latent_in (Wan21's per-channel mean/std stats broadcast on 5D only), and the VAE adapters speak the Qwen-VAE latent_dim=3 boundary (decode frame-slices the [B,T,H,W,3] image; encode lets the VAE do its own not_video unsqueeze). Qwen-Image gains real (previously gate-blocked) support from the same fix; Anima inherits it, untested on real runs.

v2.13.0 — 2026-09-04

  • HiFlow: target_resolution replaced by scale_factor (user request — the absolute pixel target was unintuitive). scale_factor is relative to the input latent: 2 doubles each side, 1 returns the base unchanged, 0.5 halves it via a single refinement stage. Scales now apply per side (the absolute form over-upscaled the short side of non-square images), upscales keep the paper's 2×-stage quantization (a 1.5 scale runs one 2× stage), and downscale scales (0.25–1) run one guided stage at the smaller size. Example workflow updated.

v2.12.1 — 2026-09-03

  • Fixed HiFlow img2img noising space (user-reported "drastic changes at any usable denoise; only 0.05 looks right"): the σ-mix σ·ε + (1−σ)·content now runs in MODEL space (convert the content with process_latent_in first, convert the mix back), matching ComfyUI's KSampler pipeline (samplers.py converts the content before the σ-mix). Mixing in VAE space scaled the noise by the latent format's scale_factor (Flux/Z-Image: 0.3611 — 2.77× under-noised) and added spurious shift offsets, so the model aggressively "corrected" every img2img input. The guided-stage initialization σ-mix got the same fix. The sampler itself (rectified-flow Euler) and scheduler spacing (model-table "simple") were already faithful — the defect was the space mix, not the routine.

v2.12.0 — 2026-09-03

  • HiFlow img2img: denoise parameter (user-reported "connecting the real latent does nothing"): with the full flow schedule the base start σ=1 zeroes the content weight, so a sampler latent connected to the node was silently ignored. The KSampler convention now applies — denoise < 1 truncates the base schedule so the walk enters below σ=1 and keeps (1−σ_start) of the input latent (an empty latent always runs the full schedule; the node warns when a content latent meets denoise=1.0).

v2.11.0 — 2026-09-03

  • HiFlow realigned with the authors' implementation (plan 2026-09-03-realignment, user-reported Z-Image "burned and blurred" output identical in both upsampling modes): the base stage now starts from noised latent instead of the raw input (an EmptySD3LatentImage was being sampled verbatim as all-zeros "noise" — the root cause); stage initialization anchors on the previous chain's final image (always pixel round-tripped) instead of the time-matched reference; the reference velocity derives from the walk's own state; trajectories store the raw (uncorrected) x0 so guidance doesn't compound across stages; α/β follow the code's linear-in-index schedule, not the paper's σ/σ_entry (which over-locks low frequencies late on shifted schedules). New noise_seed input drives the base and per-stage init noise reproducibly.

v2.10.0 — 2026-09-03

  • New HiFlow node (plan 2026-09-03): training-free high-resolution upscaling for rectified-flow models (FLUX, Qwen-Image, …) via flow-aligned guidance (arXiv:2504.06232). The base-resolution trajectory is recorded per-step and guides each upscale stage through initialization, direction and acceleration alignment. Non-flow and video models are rejected with a pointer to PixelRush.

v2.9.1 — 2026-09-02

  • Fixed the PixelRush noise-injection λ convention (user-reported "structure visible but completely noisy, soft blurred patches"). The injection now uses slerp(eps_random, eps_refined, λ) — λ weights the model's prediction (0.95 = 95% prediction + 5% noise). The previous order (slerp(eps_pred, eps_random, λ)) made λ=0.95 mean 99.6% pure random noise: at real scales per-pixel noise std ≈ 1.17 vs signal ≈ 1.0, which rendered through the Gaussian feather as the reported soft-patch noise. The additive legacy mode uses the same convention (eps_refined + (1−λ)·eps_random). This was exactly the argument-order caveat pixelrush-correct.txt flagged for verification against the authors' implementation.

v2.9.0 — 2026-09-02

  • PixelRush realigned with the corrected theory (plan 2026-09-02): standard raw-vector SLERP (with collinear lerp fallback) for the noise injection — the paper's slerp(eps_pred, eps_random, λ) is now the default, with the 2026-08-13 additive injection kept as an opt-in (noise_injection).
  • Fixed the VAE/model space mixing in the forward/reverse steps: adapters now convert via process_latent_in/out, so the model sees noise at the scale its timestep claims. For SDXL the previous code under-noised 7.7× — the root cause behind the "compressed look" that the additive hack had papered over.
  • Generic DDIM transitions (ddim_deterministic_step between arbitrary timesteps, predict_x0_from_epsilon); analytic Gaussian feather mask (σ default 24, gaussian_kernel_size input removed).
  • Optional refiner_model input — use a separate distilled refiner (e.g. SDXL-Turbo) as in the paper; the base model drives the partial inversion.
  • Bug fixes: empty-negative conditioning no longer amplifies eps by cfg_scale (CFG is skipped); alpha_k NameError with partially-provided adapters; empty positive now raises a clear error.

v2.8.3 — 2026-08-31

  • Qwen2D VAE support disabled by default. User reports showed that with the Qwen2D VAE interception installed, loading certain non-Qwen2D (video-style) VAE checkpoints crashed with a size-mismatch error whose traceback passed through this pack's delegation frame — breaking workflows that never used the Qwen2D VAE. The patch now installs only when the environment variable DYPE_ENABLE_QWEN2D_VAE=1 is set. If you relied on the Qwen2D VAE (Anzhc/Qwen2D-VAE checkpoint with FreeScale/PixelRush on Krea-2/Qwen/Anima), set that variable in your ComfyUI environment to restore the previous behavior.

v2.8.2 — 2026-08-31

  • Fixed graph-build and execution crashes when resolution inputs are None (validate_inputs now passes through uninitialized state; execute falls back to 1024)
  • Fixed PixelRush crash on float16: antialiased bicubic upsample casts to float32 and restores the original dtype

v2.8.1 — 2026-08-25

  • Fixed valid resolutions being rejected at graph build
  • Validation errors are now reported once, for the right input

v2.8.0 — 2026-08-16

  • New HAP Calibrate node: calibrate HAP directly in-graph
  • HAP accepts calibrated plans either by file or by direct connection
  • CLI calibration tooling completed

v2.7.1 — 2026-08-16

  • Fixed crashes on Anima/Cosmos models
  • Safer automatic fallbacks instead of hard errors
  • SPA and HAP nodes now work in any order

v2.7.0 — 2026-08-15

  • New HAP node: sparse-attention acceleration (up to ~5× faster attention at 4K)
  • One-click scope-plan calibration pipeline (in-graph + CLI)
  • New optional attention scaling and per-layer filtering controls
  • SPA and HAP can be composed together

v2.6.1 — 2026-08-15

  • Reworked SPA bundle-size control to match the paper
  • Much faster SPA runs (up to ~10× less overhead at strong settings)
  • Automatic no-op at/below native resolution

v2.6.0 — 2026-08-15

  • New SPA node (HRDiT)

PixelRush update

  • Fixed "totally noisy" output on SDXL models

v2.5.0

  • New SEGA node
  • Video-model latent support

v2.4.0

  • Anima/Cosmos support
  • Krea-2 support
  • Stability fixes and new example workflows

v2.3.0

  • Z-Image quality improvements

v2.2.0

  • Experimental Z-Image support

v2.1.0

  • Qwen Image and Nunchaku support
  • Modular codebase refactor for easier future model support

v2.0.0

  • New vision_yarn method for better aspect-ratio handling
  • Sharper results with fewer artifacts
  • New start-sigma control

v1.0.0

  • Initial release: core DyPE for FLUX with yarn and ntk methods
</details> <p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p>

▓ Acknowledgments

  • Noam Issachar, Guy Yariv and co-authors — DyPE (paper)
  • The SEGA authors — SEGA
  • The HRDiT team — HRDiT (code) — basis for SPA & HAP
  • The PixelRush authors — PixelRush
  • The HiFlow authors — HiFlow (code)
  • The I-Max authors — I-Max — basis for the I-Max node
  • Yanhong Zeng et al. — FreeScale (paper)
  • The ComfyUI team — for the platform
<p align="right"><a href="#readme-top" title="back to top">⟔ ▲ ⟓</a></p> <p align="center">══════════════════════════════════</p> <!-- MARKDOWN LINKS & IMAGES -->