Context-Anchored Tile Refine (VL)
The tile refine node that doesn't need a prompt — for Krea 2
- image
- guider
- sampler
- sigmas
- vae
- noise
- clip
- mask
- IMAGE
Tiled upscaling has a sneaky failure mode with a global prompt: the prompt says "a cyberpunk city," and now every tile wants to hallucinate a skyscraper into a tile that's pure sky. Context-Anchored Tile Refine (VL) solves this by throwing the prompt away entirely. On this node, each tile's conditioning is built from the image itself, using the same Qwen3-VL vision encoder Krea 2 already runs on. It's the sibling of the base Tile Refine node, built for Krea 2, and it's the one you want when "describe what's in front of me" beats "restate the prompt."
How it works
The base node refines tiles one after another and blends the seams. The VL node takes a different route: every tile becomes a lane of one synchronized diffusion run over a single shared canvas latent. All tiles step together, and between steps the overlap bands are cross-dissolved in latent space. Seams aren't hidden after the fact - they're prevented, which is why this path needs none of the base node's boundary-cut or color-match machinery.
Then there's the conditioning trick. The whole image is encoded once into a grid of vision tokens that carry their region's tone, palette, and objects. Each tile conditions on its own slice of that grid - a RoIAlign-style idea in conditioning space. Because the tokens know roughly where they are, tiles stay aware of their surroundings without ever being told about a prompt object that isn't there. No global text prompt is used, so nothing phantom gets re-instantiated. The vlm_method input picks the flavor: vision tokens (fastest, one shared encode), captions (the VL model writes a short description of each tile's crop - better at repairing mushy areas, slower), or the default vision tokens and captions, which does both.
One input worth understanding is anchor_source. source image (default) shows the context ring the unmodified input, which locks placement and style - flaws included. live canvas shows the neighbors' in-progress result instead, so the model can repair flawed content. Expect more invention and slightly brighter output on live canvas; use it when the source has artifacts you want gone.
What wires in where
The required inputs are the base node's (image, guider, sampler, sigmas, vae, noise, the tile geometry) plus three VL-specific ones: clip (must be a vision-language encoder - Krea 2 family; a plain SD/SDXL CLIP gets a clear error), anchor_source, and vlm_method. The guider's positive prompt is ignored - that's by design - but its negative still applies. A mask works and keeps the global view: the whole image is still encoded once, so a masked region refines aware of what's around it. Feed an inverted mask on a second pass to do background and subject separately.
Where people get burned
- Samplers are restricted. The synchronized run must time every sampler's model evaluations, so only
euler,heun,dpm_2,dpmpp_2m,dpmpp_2m_sde(all variants),exp_heun_2_x0, andexp_heun_2_x0_sdework.dpm_fast,dpm_adaptive, anduni_pcrun their own schedule and are rejected before sampling starts. Not after a wasted run - before. - ControlNet is silently ignored. Every tile's positive is vision conditioning, so there's nothing for a hint to attach to. The node logs a warning. If you need ControlNet during refine, that's what the base node is for.
- Caption wording lives in a file.
vlm_method's caption options come fromsettings.tomlin the node's folder. Copy it tosettings.user.tomlif you want to edit the tile prompts - the user copy survives updates, and editing preset wording applies on the next run.
Install is the same as the rest of the pack: search "Context-Anchored Tile Refine" in ComfyUI Manager or git clone https://github.com/Blakeem/ComfyUI-ContextAnchoredTileRefine into custom_nodes. No pip deps, no model downloads - though Krea 2 itself needs its Qwen3-VL text encoder and Qwen-Image VAE files, which is the setup step people actually forget. Tested only with Krea 2 and Qwen3-VL; Krea 2 Turbo and other Qwen3-VL models are untested, so treat them as YMMV.
Inputs (14)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | The image to refine. Upscale it before this node. | |
| guider | GUIDER | The guider that denoises each tile. | |
| sampler | SAMPLER | The sampler used to denoise each tile. | |
| sigmas | SIGMAS | The sigma schedule used when sampling each tile. | |
| vae | VAE | The VAE that encodes and decodes each tile. | |
| noise | NOISE | Noise is drawn once for the entire image and then sliced for each tile. | |
| max_tile_width | INT | 1024256–16384 | Hard cap on the width the model ever sees per sampled crop, including the context_overlap and context_anchor rings. Set to the largest width the model supports. |
| max_tile_height | INT | 1024256–16384 | Hard cap on the height the model ever sees per sampled crop, including the context_overlap and context_anchor rings. Set to the largest height the model supports. |
| context_anchor | INT | 320–512 | Pixels around each tile that are frozen and shown to the model as context, then cropped away. With a mask it is also the frozen background the region is refined against, so keep it above 0. |
| context_overlap | INT | 320–512 | Overlapped context that is diffused from both sides and then blended. It anchors the tiles to each other, like context_anchor anchors each tile to its surroundings. |
| anchor_source | COMBO | source image | What fills context_anchor. source image keeps the result true to the input. live canvas adds more detail and drifts further from the input. |
| vlm_method | COMBO | vision tokens and captions | Whether each tile is conditioned on a caption of itself, on its slice of the entire image's vision encode, or on both. The name in parentheses is the caption preset it asks. Copy settings.toml to settings.user.toml to write your own tile prompts. |
| clip | CLIP | Must be a vision-language text encoder (Krea 2 family). The guider's positive prompt is ignored and its negative still applies. | |
| maskopt | MASK | Only the masked region is refined and the rest is left untouched. Feed an inverted mask for a second pass. |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |