Readme
How does this Pipeline work?
Stage 1 — Image preparation (optional T2I generation):
If no input_image
is provided, generates one from the prompt using a selected text-to-image model —
black-forest-labs/flux-schnell
(default), flux-dev
, stability-ai/sdxl
, or ideogram-ai/ideogram-v2(-turbo)
.
Resizes the image so both dimensions are divisible by 32.
Stage 2 — Offset transformation:
Shifts the image by 50% horizontally and vertically (offset_by_half
), wrapping around edges so seams are centered.
Stage 3 — Mask creation (model-aware):
Builds a seam mask at the image center with a width based on seam_percentage
(min 32px), tapering edges for smooth blending.
Mask color scheme depends on inpaint backend — ideogram-ai/ideogram-v2
uses white-keep/black-paint,
black-forest-labs/flux-fill-pro
uses black-keep/white-paint.
Stage 4 — Inpainting seams:
Runs the chosen inpaint model (ideogram-ai/ideogram-v2
or black-forest-labs/flux-fill-pro
)
with the prompt, the offset image, and the seam mask to fill and blend the seams.
Stage 5 — Offset restoration:
Reverses the initial 50% shift (offset_back
) to return the image to its original orientation,
now with seamless edges.
Stage 6 — Save output:
Saves the final tileable image as tileable_image.png
, ready for use as a seamless texture or background.