kubakub seam pass
Kill the hard line between two regions without re-rendering the whole facade
- model
- clip
- vae
- plan
- image
- changed
- image
- seam_mask
- report
When you diffuse a facade region by region, the region sampler does the sensible thing and feathers each result as it pastes it back. Most borders disappear. Then you get the pair that doesn't: a copper-clad window block next to a moss-covered wall, where the feathered paste reads as a clean, slightly wrong cut. kubakub seam pass exists for those pairs. It runs after the sampler, finds the borders where something actually changed, and re-samples only that band - at full resolution, with the crop as reference, at low denoise.
The mechanism, which is worth understanding
It builds a soft band along every border between two regions that both have blend = on and where at least one side changed. The band is 1 on the border and falls linearly to 0 at its edge, seam_px wide (default 32 target pixels). Regions you marked keep, and anything outside the scope, never enter a band.
Then the canvas is covered with tiles of tile_px (default 1024 at 1:1) and only tiles containing seams are actually sampled - every other tile is copied through untouched. So this is not a full re-render; it's an inpaint pass over a handful of strips, with the band as the mask, the original crop as the reference image, and a low denoise (default 0.3).
Two ideas in there are lifted, with credit in the pack's README: the crop-as-reference trick comes from GianlucaMancuso's tiled upscaler, and the differential diffusion step is adapted from core's DifferentialDiffusion (originally exx8's differential-diffusion). With differential on - it is by default - the edge of the band is denoised less than its centre, step by step, so the transition is gradual rather than a new soft edge replacing the old hard one.
Cost, honestly: about 14 seconds per 1024 px tile on Klein 9B. If you have ten borders, that's ten tiles, so a couple of minutes. That's the price of not re-sampling the whole facade every time you change one region's prompt.
Inputs and outputs
You need the same model, clip, vae and plan you used in the region sampler, plus its image output. The plan is what tells this node where the borders are and gives each tile its prompt.
seam_px is band width - wider blends more of the two regions into each other, narrower is a subtler repair. denoise decides how much the band may change; 0.3 is gentle, and pushing past 0.5 starts repainting detail that was fine. steps and cfg at 0 mean "the model's default" (4 for Klein, 25 for Qwen Image 2.1, CFG 1.0), same convention as the sampler.
schedule deserves a second look. auto uses your steps/sampler/scheduler as set. qwen21_turbo_5 and pruna_qwen21_8 are the trained step counts of the two published Qwen-Image-2.1 turbo LoRAs - partial denoise starts at the matching step. If you're running a turbo LoRA in the sampler and it produced the image you're now fixing, set the matching schedule here or the seam will come from a different point on the schedule than the regions did.
Optionally connect changed from the region sampler - then only borders next to changed pixels get a seam, and borders where nothing moved are left completely alone. That's the difference between "fix the seams" and "fix the seams I just created". Leave prompt empty and each tile uses the prompt of whichever region covers most of its seams.
Outputs: image (with the blended seams), seam_mask (the band that was resampled - genuinely useful to preview so you can see how much of the picture moved), and report (band width, tile count, which prompt each tile used).
Install
Part of the pack; no extra model, but it needs whatever the sampler needed:
cd ComfyUI/custom_nodes && git clone https://github.com/kubakubkub/ComfyUI_KubaNodes
python -m pip install -r ComfyUI_KubaNodes/requirements.txt
Install OpenCV first if you don't have it - the pack won't load without an OpenCV build, and it ships as opencv-python-headless in requirements.txt. Requires ComfyUI 0.37.0 or newer.
Should you even use it
Sometimes not. The sampler's feathered paste already hides most edges, and the author says so plainly: this node matters most where neighbouring regions differ strongly in style or light. If your whole facade is one prompt in one style, you're paying minutes to fix a border nobody can see.
Where it changes the workflow is when you want to iterate on one region. Before, a prompt change on one window meant re-sampling everything with a hope that the neighbours didn't drift. Now the drill is: sample, look at seam_mask, run the seam pass, and only go back to the big sampler when a region is wrong rather than a border.
Inputs (18)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | The same image model as in the region sampler. | |
| clip | CLIP | The text encoder that matches the model. | |
| vae | VAE | The VAE that matches the model. | |
| plan | KUBA_PLAN | The same plan as the region sampler: gives the borders and each region's prompt. | |
| image | IMAGE | The region sampler's output. | |
| seam_px | INT | 324–256 | Width of the soft band across a border (target pixels). |
| denoise | FLOAT | 0.300–1 | How much the seam band may change: low keeps the regions, higher blends more (0.3 = gentle). |
| steps | INT | 00–200 | 0 = the model's default (Klein 4, Qwen Image 2.1 25). |
| cfg | FLOAT | 0.00–30 | 0 = the model's default (1.0). |
| sampler_name | COMBO | euler | Sampler for the seam tiles (euler is a safe default). |
| scheduler | COMBO | simple | Generic models only; Flux 2 uses its own schedule. |
| differential | BOOLEAN | true | Differential diffusion: the soft band edge is denoised less than its centre, step by step (core DifferentialDiffusion). |
| schedule | COMBO | auto | auto: steps / sampler / scheduler as set. qwen21_turbo_5: the 5 trained steps of the Viggle Qwen-Image-2.1 turbo LoRA (load it with LoraLoaderModelOnly); pruna_qwen21_8: the 8 trained steps of the Pruna Qwen-Image-2.1 LoRA (strength 1.0). Partial denoise starts at the matching step, steps is ignored. Sampler as set (euler, or res_2s / deis_2m for more detail). |
| seed | INT | 00–18446744073709550000 | Noise seed for the seam tiles; change it for another variation. |
| tile_px | INT | 1024256–2048 | Tile size at 1:1 (about 1 MP for 1024). |
| adapter | COMBO | auto | Model family; auto detects Flux 2, Flux 3 and Qwen Image 2.1. |
| changedopt | MASK | The region sampler's changed output: only borders next to changed pixels get a seam. Without it every border does. | |
| promptopt | STRING | Empty: each tile uses the prompt of the region most present in its seams. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | The image with blended seams. |
| seam_mask | MASK | The soft band that was resampled. |
| report | STRING | Band width, tile count and the prompt used per tile. |