Nodes/ComfyUI/HiDream-O1 Patch Seam Smoothing
ComfyUI Node Runs on cloud

HiDream-O1 Patch Seam Smoothing

The fix for grid lines on a 2048px pixel-space render

By Comfy-Org·Created 4 years ago·Updated 20 days ago· 121,575
HiDream-O1 Patch Seam Smoothing
  • model
  • MODEL
start_percent0.80
end_percent1.00
patternsingle_shift
passes2
blendaverage
strength1.00

HiDream-O1 Patch Seam Smoothing exists to kill a very specific artifact: the faint grid of seam lines you get on high-resolution HiDream-O1 renders. HiDream-O1 is the pixel-space model - no VAE, raw pixels, native 2048x2048 - and it samples in patch grids to keep memory sane. The trade of that patch-based sampling is that the model's patch boundaries can leave visible seams. This node attacks the seams the honest way: during the late part of sampling, it runs the model several times on shifted patch grids and averages the results, so no single grid position gets to own a boundary.

The description says it plainly: "Average the model output across multiple shifted patch-grid positions during the late portion of sampling. Cancels seams." It's marked experimental, it's very new (HiDream-O1 itself only shipped in May 2026), and it's the kind of node that exists because a few power users hit the artifact and ComfyUI answered in-core rather than leaving it to a custom pack.

How it works

The model predicts the denoised image on a 32px patch grid. This node, when active, computes that prediction on several shifted grid offsets - the SHIFTS_BY_PATTERN table in the source spells out the exact offsets - then fuses the predictions so the seams of any one grid get averaged away. Three knobs control the layout of those extra passes.

  • pattern - single_shift (default): one pass on the natural grid plus the others offset. symmetric: every pass off-grid, shifts split around the origin. Symmetric is the more aggressive option when seams are stubborn.
  • passes - 2, 4, or the ramp_* options that increase the pass count as sampling approaches the end (where seams are most visible). 2 is the cheap default; 4 is smoother; the ramps get you the most smoothing exactly when you need it.
  • blend - how the passes combine: average (equal-weight mean), window (Hann-windowed weighting favoring each pass away from its own boundaries), or median (per-pixel median, which rejects outlier passes - useful if a shifted pass produced a wraparound artifact).

start_percent (default 0.8) / end_percent (default 1.0) gate when the blending runs - the late 20% of sampling, where the model is committing to final structure and seams show up. And strength (default 1.0) interpolates between the natural-grid prediction and the averaged result, so you can dial in some smoothing instead of full.

Inputs and what to set

The honest advice: pattern and passes are the two you tune; start_percent/end_percent at their defaults are fine; strength is your on/off-and-how-much control.

Output is the patched MODEL. It's part of ComfyUI core - nothing to install.

Common issues & troubleshooting

The cost is real: multiple passes per step. Every shifted pass is a full model call. Going from 2 to 4 passes roughly doubles the late-phase compute, and on a model that already takes minutes per image on a 5090, that's a meaningful tax. Start with 2 passes and ramp_2_4 before committing to 4.

No seams, no reason to run it. This is purely an artifact fix. On renders that don't show grid lines, the node is wasted compute - bypass it. strength 0 also effectively disables it (the source short-circuits when strength ≤ 0 or end_percent ≤ start_percent).

It's for HiDream-O1's patch layout specifically. The 32px patch size and shift offsets are tuned to that model's grid. Don't expect the same seam-cancelling magic on a different pixel-space model with different patch geometry.

Categorymodel/patch/hidream

Inputs (7)

NameTypeDefaultDescription
modelMODEL
start_percentFLOAT0.800–1Sampling progress (0=start, 1=end) at which the blend turns ON.
end_percentFLOAT1.000–1Sampling progress at which the blend turns OFF.
patternCOMBOsingle_shiftShift layout. single_shift: one pass at the natural patch grid + others offset. symmetric: all passes off-grid, shifts split around origin.
passesCOMBO2Number of passes per gated step. 2/4 = fixed. ramp_*: pass count increases as sampling approaches end (more smoothing where seams are most visible).
blendCOMBOaverageaverage: equal-weight mean. window: Hann-windowed weighting favoring each pass away from its patch boundaries. median: per-pixel median, rejects wraparound-outlier passes.
strengthFLOAT1.000–1Interpolation between the natural-grid pred (0) and the averaged result (1).

Outputs (1)

NameTypeDescription
MODELMODEL