Nodes/ComfyUI-Pixaroma/Seamless Border Prep Pixaroma
ComfyUI Node

Seamless Border Prep Pixaroma

The one part tiling can't solve is the corner

By pixaroma·Created 8 months ago·Updated 2 days ago· 502
Seamless Border Prep Pixaroma
  • strip
  • canvas
  • mask
  • border_info
  • report
◄band_top0►
◄band_bottom0►
◄context1.00►
◄outer_edgeTop►
◄repaintSeam►
◄seam_width0.40►
◄corner_atMirror line►

Why corners are a different problem

Wrap-around tiling gets you a strip that repeats forever left and right. Lovely. Now put a frame around a box: the strip has to turn a corner, and a corner can't come from the wrap trick. Its right edge has to continue the top strip, which is a fixed picture, and its bottom edge has to continue the side strip, which is the same picture turned ninety degrees. Nothing wraps. The corner is a hole in the maths, and only a model can fill it.

Seamless Border Prep Pixaroma is the setup half of that job: cut the band out of your strip, lay out a square canvas with the corner mitred and both strips running into it, mask exactly the part that needs painting. You then inpaint it with whatever setup you normally use, and Seamless Border Kit turns the result into a frame. Both nodes were contributed by a Pixaroma user and landed in v1.4.264–265, so an older build simply doesn't have them.

What it does with your strip

strip is the picture from VAE Decode - the band across a plain background that repeats left to right, made with Seamless Tile set to Left and right. Keep the full width: one width is one repeat, and the node needs all of it to find the pattern's mirror point.

It finds the band itself. band_top and band_bottom both default to 0, meaning "find it": the node looks for the band against the background colour and takes those rows. Only set them by hand when auto-detection grabs the wrong thing - and if you set band_bottom, a band_top of 0 then means the literal first row, not "auto", which is the kind of detail that catches people out.

Then it builds the canvas: corner top-left, strip running right along the top, strip turned down the side, background filled in, and a mask over the corner. context (0.5 to 6, default 1) is how much strip the model gets to see beside the corner, in band thicknesses. More context means more pattern to follow and a bigger canvas - and the canvas is never under 1024 px, so you can't feed an inpaint model a tile it can't work at. outer_edge (Top or Bottom) says which edge faces out of the frame; Bottom flips the band, for patterns that read better hanging down.

Seam versus Corner, and where the corner turns

repaint is the real decision. Seam repaints only a band along the mitre's diagonal - the strips' motifs carry on round the corner and the model redraws just where they turn, guided on both sides. That gives the most coherent result, and seam_width (0.05 to 1 of the band thickness, default 0.4) sets how much room it gets: 0.25 for a small ornament on the turn, 0.4 when you want a proper corner motif. Corner repaints the whole corner square instead - more freedom, less tied to the strip, better when you want a distinct corner piece.

corner_at says where along the strip the turn happens. Mirror line finds the point where the pattern mirrors itself - a motif's centre or a tile edge - so both halves match and a motif sits on the turn. Strip edge uses the strip's own left edge. Either way, Kit's strips start at the same point, so the two nodes stay in agreement.

Outputs

canvas is what you inpaint, and it already contains a mitred 45-degree join: denoise 1.0 paints a genuinely new corner, a lower denoise keeps it closer to the mitre. Wire the canvas straight into Seamless Border Kit and you get a mitred frame with no model at all - a perfectly good outcome for simple geometric patterns.

mask is white where the model should paint. border_info is a custom wire type carrying the band, background colour and canvas size across to Kit; it's the only thing that node accepts in that slot, so don't try to push an image into it. report is plain text - which rows became the band, plus a warning if the band touches the top or bottom edge of the strip. That warning matters: it means the band is probably cut off, and the fix is to re-roll the strip on another seed rather than push on. Wire it to Show Text Pixaroma and read it once.

Install and the traps

cd ComfyUI/custom_nodes
git clone https://github.com/pixaroma/ComfyUI-Pixaroma

Restart ComfyUI and press Ctrl+Shift+R. ComfyUI Manager search for Pixaroma works but tops out at 1.4.144, because the registry flagged newer builds with no stated reason - use the Manager's nightly channel or git. No models, no downloads; the pack's only pip dependency is imageio-ffmpeg, and this node doesn't use it.

Two traps beyond band detection. Prep takes one strip at a time - feed it a batch and it stops and tells you to pick one. And the one that ruins results: inpaint the canvas with a model that does not have Seamless Tile applied. The corner has to match two fixed strips; if the inpaint wrap-tiles, you're asking the model for two contradictory things and the corner comes out as soup. Generate the strip with tiling, then turn tiling off for the corner.

Category👑 Pixaroma/🖼️ Image

Inputs (8)

NameTypeDefaultDescription
stripIMAGEThe border strip from VAE Decode: a band across a plain background that repeats left to right. Keep its full width: the width is one repeat.
band_topINT00–16384First row of the band, in pixels from the top. Leave both rows at 0 to find the band automatically. With band_bottom set, 0 here means the very first row.
band_bottomINT00–16384Last row of the band. 0 = find it automatically. The report output says which rows were found.
contextFLOAT1.000.5–6How much strip the model sees beside the corner, in band thicknesses. More gives the model more of the pattern to follow, and a bigger canvas (never under 1024 px).
outer_edgeCOMBOTopWhich edge of the band faces out of the frame. Bottom turns the band upside down.
repaintCOMBOSeamWhat the model repaints. Seam = only a band along the mitre's diagonal: the strip's bands carry on round the corner and the model redraws where they turn (most coherent). Corner = the whole corner square: a new corner piece, less tied to the strip.
seam_widthFLOAT0.400.05–1Seam only: how wide the repainted band along the diagonal is, as a share of the band thickness. 0.25 = a small ornament on the turn; 0.4 = room for a bigger one.
corner_atCOMBOMirror lineWhere along the strip the corner turns. Mirror line = the point where the pattern mirrors itself (a motif's centre or a tile edge): both halves of the corner match and a motif sits on the turn. Strip edge = the strip's own left edge. The strips Kit outputs start at the same point.

Outputs (4)

NameTypeDescription
canvasIMAGEThe canvas to inpaint. The corner already holds a mitred join: denoise 1.0 paints a new corner, lower keeps it closer to the mitre. Wire it straight into Seamless Border Kit for a mitred frame with no model.
maskMASKWhite where the model should paint: along the corner's diagonal (Seam) or the whole corner (Corner).
border_infoPIXAROMA_BORDER_INFOWire into Seamless Border Kit.
reportSTRINGWhich rows of the strip became the band, and a warning when the band reaches the top or bottom edge of the strip (it is probably cut off there: make the strip again with another seed). Wire it to Show Text.