whatisgithub

What is comfyui-contextanchoredtilerefine?

blakeem/comfyui-contextanchoredtilerefine — explained in plain English

Analysis updated 2026-07-26

3PythonAudience · developerComplexity · 3/5LicenseSetup · moderate

In one sentence

A ComfyUI plugin that improves enlarged images by processing them in small tiles while referencing neighboring tiles, eliminating visible seams and stitching marks automatically.

Mindmap

mindmap
  root((repo))
    What it does
      Removes tile seams
      Upscales images
      Masked region refine
    How it works
      Left to right tiling
      Frozen border context
      Cross-dissolve blending
    Use cases
      High-res image upscale
      Fix specific image areas
      Smooth large sky areas
    Limitations
      No ControlNet support
      Fixed seam handling
    License
      GPLv3 copyleft

Code map

Detail Auto

An interactive map of this repo's files and how they connect — its source is parsed live in your browser. Click Visualize to build it.

filefunction / class

What do people build with it?

USE CASE 1

Enlarge and sharpen images without visible grid lines or seams.

USE CASE 2

Selectively improve specific regions of an image while leaving the rest untouched.

USE CASE 3

Refine detailed scenes and smooth areas like sky with adjustable overlap settings.

What is it built with?

PythonComfyUI

How does it compare?

blakeem/comfyui-contextanchoredtilerefine0marildo/imago0xdfi/glm-5.2-1m-4x-dgx-spark
Stars333
LanguagePythonPythonPython
Setup difficultymoderateeasyhard
Complexity3/52/55/5
Audiencedevelopergeneralresearcher

Figures from each repo's GitHub metadata at analysis time.

How do you get it running?

Difficulty · moderate Time to first run · 30min

Requires a working ComfyUI installation and an existing image generation workflow to integrate the custom node into.

Free to use and modify, but if you distribute your changes or build software with it, that software must also be open-source under the same GPL license.

So what is it?

Context-Anchored Tile Refine is a custom node for ComfyUI, a visual interface for building image generation workflows. It solves a specific problem: when you enlarge an image and then try to improve its quality, the improvement process often needs to work on small pieces (tiles) because the full image is too large for the model to handle at once. Stitching those tiles back together usually leaves visible seams. This node processes each tile while looking at the already-finished tiles next to it, so the pieces blend together without visible boundaries. The node takes an already-upscaled image and breaks it into tiles based on maximum width and height settings you provide. Each tile is processed in raster order, meaning left to right, top to bottom. By the time any given tile is processed, its top and left neighbors are already refined. The node gives each tile a frozen border of that finished content to condition against, which keeps tiles consistent with each other rather than drifting apart in style or color. There is also a context overlap setting that controls how wide the shared band between neighboring tiles is. A wider band helps with smooth areas like sky, while detailed scenes need less. The way seams are hidden is built into the node and cannot be adjusted. The node cross-dissolves the overlapping band between two tiles, and the midpoint of that dissolve bends around image content rather than running in a straight line. It does this using a technique from a 2001 SIGGRAPH paper on image quilting, which finds the path through the overlap where the two tiles already agree most closely. A straight boundary is easy to spot even when faint, but one that follows the detail in the image is not. The node also supports masked refinement, where you can select a specific region of an image to improve while leaving everything else untouched. The node crops to the masked area plus a border of surrounding context, refines only that region, and composites it back with a one-pixel anti-aliased edge. You can run a second pass with an inverted mask to refine other areas with different settings. There are some limitations. The guider input lets you use options like Perp-Neg Guider, but the conditioning covers the whole image rather than being recalculated per tile, which means ControlNet is not supported. The project is released under the GPLv3 license.

Copy-paste prompts

Prompt 1
Help me install the Context-Anchored Tile Refine custom node in my ComfyUI setup and connect it to my existing image upscaling workflow.
Prompt 2
I want to use Context-Anchored Tile Refine to fix a specific area of my image using a mask. Walk me through setting up the mask input and running a second pass with an inverted mask.
Prompt 3
Explain how to configure the tile width, tile height, and context overlap settings in Context-Anchored Tile Refine for an image with a large smooth sky area.
Prompt 4
My enlarged images have visible seams when I try to improve quality. Show me how to replace my current tiling node with Context-Anchored Tile Refine to fix this.

Frequently asked questions

What is comfyui-contextanchoredtilerefine?

A ComfyUI plugin that improves enlarged images by processing them in small tiles while referencing neighboring tiles, eliminating visible seams and stitching marks automatically.

What language is comfyui-contextanchoredtilerefine written in?

Mainly Python. The stack also includes Python, ComfyUI.

What license does comfyui-contextanchoredtilerefine use?

Free to use and modify, but if you distribute your changes or build software with it, that software must also be open-source under the same GPL license.

How hard is comfyui-contextanchoredtilerefine to set up?

Setup difficulty is rated moderate, with roughly 30min to a first successful run.

Who is comfyui-contextanchoredtilerefine for?

Mainly developer.

Open on GitHub → Ask about another repo

This repo across BitVibe Labs

Verify against the repo before relying on details.