Nodes/ComfyUI_DyPE/DyPE Sampler (official sigma grid)
ComfyUI Node

DyPE Sampler (official sigma grid)

A sampler that knows how big your image is

By smthemex·Created about a year ago·Updated 6 days ago· 32
DyPE Sampler (official sigma grid)
  • model
  • positive
  • latent_image
  • negative
  • latent
◄steps28►
◄cfg1.0►
◄guidance3.5►
◄denoise1.00►
◄seed0►
◄samplereuler►
◄familyauto►
◄verbosefalse►

Flow-matching models have a knob most people set once and never touch: the timestep shift. It controls how sampling effort splits between composition and detail, and it's supposed to change with resolution. In stock ComfyUI you fake that with ModelSamplingFlux, typing width and height into a node. DyPESampler reads the resolution off the latent instead and builds the sigma schedule the way the original Diffusers pipelines do.

Honestly? At 1024² this node buys you nothing. It's the high-resolution partner to DyPEPatch, and it earns its place once your latent is notably bigger or smaller than the model's training size - exactly when everybody forgets to re-tune shift.

What it actually does

Two things, and only one of them is a sampler.

First, schedule. Models ship a scheduler_config.json and the reference implementations read the shift parameters straight out of it. Flux 1 shifts dynamically between 256 and 4096 image tokens with base_shift 0.5 and max_shift 1.15; Qwen-Image between 256 and 8192 with 0.5 / 0.9 plus a terminal stretch to 0.02; Z-Image doesn't shift dynamically at all, it's a flat 3.0.

Second, integration. The node counts your latent's tokens (height/16 × width/16, so a 2048² Flux latent is 16,384), computes mu from that count, pushes the linear sigma ramp through the exponential time-shift, then hands the table to Comfy's own sample_custom with euler. Because it's the native sampling core, LoRAs, patches and model management still apply normally.

The upshot: your shift follows your canvas automatically. Doubling the resolution changes the schedule, which is the behaviour people assume they're getting already.

The inputs you'll actually set

model comes in from DyPEPatch (or a loader, but the pair is the point), plus positive and your latent_image. negative is optional and, for once, genuinely optional - more below.

steps defaults to 28, and sampler lets you pick any solver Comfy has. Be clear on what that dropdown does: it changes the integrator, not the schedule. Picking dpmpp_2m here still gives you the official flux sigma grid. The default euler is what the paper's pipeline ran.

Then the three fields that decide whether your output is good or mush:

  • guidance - Flux's guidance embedding, default 3.5. This is not CFG. It's ignored entirely by the other families.
  • cfg - true classifier-free guidance. For Flux and Z-Image, leave it at 1.0. For Qwen-Image, 4.0.
  • family - auto normally; force it to flux, qwen or zimage if detection guesses wrong.

denoise below 1 drops the front of the sigma table, which is what you want for a hires-fix style second pass over an already-denoised latent. verbose prints the family, token count, computed shift and the full sigma list - the single most useful debug output in this pack when an image looks wrong.

Output is a latent. Straight into VAEDecode.

The trap that gets everyone

If cfg is above 1.0 and nothing is connected to negative, the node quietly runs at cfg 1.0 and prints a line to the console saying so. Sane guard, but it means a Qwen-Image workflow that "looks washed out no matter what I do" is often just missing the negative conditioning - and nobody reads the console. An empty CLIPTextEncode is enough.

The mirror image is Flux. People crank cfg to 3.5 out of habit because that's what their old KSampler said, and get a deep-fried result. On Flux, guidance goes in guidance and cfg stays at 1.0. The node promotes the value into the conditioning itself when it detects a guidance-distilled checkpoint, so put 3.5 where it belongs.

And the pair-of-nodes trap: using DyPESampler without DyPEPatch fixes the schedule but leaves the rope broken above training resolution. You get a slightly better-organised mess. They're two halves of one fix.

Installing

Same pack, same steps - Manager → search ComfyUI_DyPE, or:

cd ComfyUI/custom_nodes
git clone https://github.com/smthemex/ComfyUI_DyPE

Restart. No models, no downloads. Despite a pyproject.toml listing diffusers and transformers, the shipped code imports neither; there's no requirements.txt, so a clone install pulls nothing extra. The pack uses the V3 node API, so you need a ComfyUI build from mid-2026 or later or the nodes won't register.

Common issues

"Unsupported model family." Flux 2 and Flux 3 are explicitly rejected - different rope topology, and Klein's weights only exist in a diffusers-shaped layout. Flux 1 derivatives, Qwen-Image and Z-Image are what you get.

Fine at 1024², weird at 2048². Set verbose on and read the printed shift. If it's the same as your small-image run, the family was misdetected - force family rather than trusting auto.

OOM at high resolution. This node adds no memory pressure but removes none. Decode tiled - the pack's example workflow uses VAEDecodeTiled with 512 tiles for a 2048² Flux latent.

Z-Image looks flatter than your usual setup. Z-Image's schedule here is a fixed shift of 3.0, straight from the official scheduler config. If you've hand-tuned a different shift for Turbo and like it, A/B it - the community's preferred number isn't necessarily the paper's.

CategoryDyPE

Inputs (12)

NameTypeDefaultDescription
modelMODEL—
positiveCONDITIONING—
latent_imageLATENT—
stepsINT281–200—
cfgFLOAT1.00–30true CFG scale. flux1 / z-image: keep 1.0. qwen-image: 4.0
guidanceFLOAT3.50–30flux1 guidance embedding (official 3.5). Ignored by other families
denoiseFLOAT1.000–1—
seedINT00–18446744073709550000—
samplerCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
familyCOMBOautoOnly needed if auto-detection fails
verboseBOOLEANfalse—
negativeoptCONDITIONING—

Outputs (1)

NameTypeDescription
latentLATENT—