HiDream-O1 Patch Seam Smoothing
The fix for grid lines on a 2048px pixel-space render
- model
- MODEL
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 theramp_*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), ormedian(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.
Inputs (7)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| start_percent | FLOAT | 0.800–1 | Sampling progress (0=start, 1=end) at which the blend turns ON. |
| end_percent | FLOAT | 1.000–1 | Sampling progress at which the blend turns OFF. |
| pattern | COMBO | single_shift | Shift layout. single_shift: one pass at the natural patch grid + others offset. symmetric: all passes off-grid, shifts split around origin. |
| passes | COMBO | 2 | Number of passes per gated step. 2/4 = fixed. ramp_*: pass count increases as sampling approaches end (more smoothing where seams are most visible). |
| blend | COMBO | average | average: equal-weight mean. window: Hann-windowed weighting favoring each pass away from its patch boundaries. median: per-pixel median, rejects wraparound-outlier passes. |
| strength | FLOAT | 1.000–1 | Interpolation between the natural-grid pred (0) and the averaged result (1). |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | — |