Nodes/Y7Nodes for ComfyUI/Y7 Flux.2 Klein Upscaler (Tiled)
ComfyUI Node

Y7 Flux.2 Klein Upscaler (Tiled)

The one-node fix for upscaling past Flux.2 Klein's ceiling

By yushan777·Created about a year ago·Updated 4 days ago· 8
Y7 Flux.2 Klein Upscaler (Tiled)
  • model
  • image
  • vae
  • positive
  • negative
  • upscale_model
  • image
  • latent
  • report
seed0
scale_factor2.00
tile_size1024
overlap128
steps4
cfg1.0
sampler_nameeuler
denoise1.00
color_matchmkl
refine_strength1.00
reference_sourceenlarged

Flux.2 Klein is a joy to generate with precisely because it's small - 4 steps, a couple of seconds, edits baked in. Then you ask for a genuinely big image and it OOMs, or quietly stops holding the picture together. The Y7 Flux.2 Klein Upscaler (Tiled) is the workaround: it enlarges your image with a plain upscaler, then walks over the result one tile at a time and has Klein repaint each tile as a tiny inpaint. Output size stops mattering - what fits in VRAM is the tile, not the picture.

This is the "adds detail" job: a pixel upscaler (optional, ESRGAN-style) enlarges, and Klein supplies the new detail. Same lineage as Ultimate SD Upscale, except the sampler, guider and sigma schedule are built in - feed it a model, a VAE, conditioning and an image, and nothing else. It's a tightened port of Gavr728's community ComfyUI_KleinTiledUpscaler, the "basically USDU for Klein" node that made the rounds in spring 2026.

How it works

Each tile is cropped with an overlap band around it. Klein repaints the middle; the surrounding band is frozen context it can see but not change (via the denoise mask), which is how a tile agrees with its neighbours instead of inventing its own version of the scene. Three details are where this class of node usually falls apart:

  • The reference latent is swapped per tile. At CFG 1.0 Klein is an edit model - its "what am I looking at" signal lives in a reference latent in the conditioning, not the prompt - so this node crops that reference to match each tile. Skip that in a hand-built workflow and you get the classic tile-grid effect.
  • Seams are correct by construction. Tiles blend via complementary raised-cosine ramps that sum to exactly 1.0 at every pixel - no mask_blur widget, because there's nothing to tune. The whole canvas is never VAE-encoded, only tiles, which is what keeps VRAM flat as the output grows.
  • Each tile gets its own sigma schedule and seed. Flux.2's schedule shift depends on how many tokens you're sampling, and a tile is not the canvas - so a schedule typed for the whole picture is wrong for every tile. Per-tile seeds stop ancestral/SDE samplers stamping the same texture everywhere.

Wiring it up

The example workflow keeps it simple: a Klein checkpoint via UNETLoader, CLIPTextEncode through the matching Qwen3 text encoder for positive, and a ConditioningZeroOut for negative - at CFG 1 it does nothing anyway.

The dials you'll actually touch:

  • tile_size (default 1024) - the VRAM knob. Down when you OOM, up when tiles invent too much.
  • overlap (128) - how far each tile sees past its edge. Raise it if a roofline or horizon breaks at a seam.
  • steps (4) - right for the distilled checkpoints. cfg stays at 1.0; push it above and every tile costs twice as much.
  • scale_factor (2.0) - set it to 1.0 and nothing enlarges: the node becomes a sharpen/refine pass. Unplug upscale_model then and lean on refine_strength (0.85–0.92).
  • upscale_model (optional) - pick a clean model, not a sharp one. Halos get frozen into the context and copied as real detail, so anything with "Sharp" in the name is a trap.

Outputs: image, a matching latent (same geometry, so you can sample onward without a re-encode), and a report string listing the grid, tile sizes and blend widths it actually used - pipe that into a text viewer when results look wrong.

Install and gotchas

Install is the whole pack: ComfyUI Manager → search "Y7Nodes", or clone into custom_nodes and pip install -r requirements.txt, then restart. That requirements.txt matters - the default color_match: mkl needs the color-matcher package; without it you get an import error the moment a tile finishes. It's there because Klein shifts colours warm on edits (a known quirk), and tiles drift apart in tone otherwise.

If tiles still show as a grid, that's drift, not blending - raise overlap and check color_match is on. If the result is too crisp, unplug the upscaler and compare against plain bicubic before touching anything else; the sharpening is usually coming from there. And don't fight "too much detail" with denoise - Flux.2's schedule hugs the high-noise end, so at 4 steps you get about five reachable settings, most of which do nothing until they suddenly do everything. That's refine_strength's job.

One honest caveat: this is a personal quality-of-life pack, and the README doesn't even document this node - the real write-up lives in the pack's docs/nodes/Y7Nodes_Flux2KleinUpscaler.md. It's also slow at the truly huge end: a 4x pass is many minutes even on a 3090. But for taking a Klein image to 2x cleanly on a modest card, it's the least wiring I've found between you and a finished wall-size print.

CategoryY7Nodes/Klein

Inputs (17)

NameTypeDefaultDescription
modelMODEL
imageIMAGEThe picture to enlarge and refine.
vaeVAE
positiveCONDITIONINGYour prompt. Keep it a short description of the picture as a whole, or leave it empty - it is applied to every tile, so anything naming a specific object will try to put that object in all of them.
negativeCONDITIONINGWhat to steer away from. Klein ignores this unless `cfg` is above 1.0.
seedINT00–18446744073709550000
scale_factorFLOAT2.001–8How much bigger to make the picture. 2.0 doubles the width and height. Set it to 1.0 to sharpen or add detail WITHOUT making the picture bigger - the size stays the same and every tile is repainted at its original scale. With 1.0, leave upscale_model unplugged and use refine_strength (0.85-0.92) to control how much changes.
tile_sizeINT1024256–2048Roughly how big each tile is, in pixels. This is what decides how much graphics memory the job needs - the finished picture can be any size. Turn it down if you run out of memory, up if tiles are inventing detail that does not belong. The exact size is adjusted so the tiles divide the picture evenly; the report output shows what was used.
overlapINT12816–512How far each tile looks past its own edges, in pixels. This is how a tile knows what its neighbours contain, so raising it helps things that run across a seam (a roofline, a horizon) stay joined up. Costs memory and time. 128 suits most pictures.
stepsINT41–4096Sampling steps per tile. Distilled Klein checkpoints usually want 4.
cfgFLOAT1.00–100Klein checkpoints are normally guidance-distilled, so leave this at 1.0 unless you know your checkpoint wants otherwise. Above 1.0 the negative prompt starts being used, and every tile costs twice as much.
sampler_nameCOMBOeuler44 options: euler, euler_cfg_pp, euler_ancestral, euler_ancestral_cfg_pp, heun, heunpp2, +38
denoiseFLOAT1.000–1How much each tile is allowed to change. 1.0 repaints it completely, which is what you normally want here. Lower values keep more of the enlarged original, but they also spend fewer steps, so at 4 steps there is very little room between the settings.
color_matchCOMBOmklNudges each finished tile back towards the colours of the enlarged original, so tiles do not drift apart in tone. `mkl` is a good default; `off` leaves the model's own colours alone.
refine_strengthFLOAT1.000.5–1How much each tile is allowed to change. 1.0 repaints it completely. Lower values hold on to the shapes already there, at every step rather than just at the end, which reins in invented detail and calms an over-sharp result. 0.92 is a good first try; 0.85 is strongly held back.
reference_sourceCOMBOenlargedWhat each tile is told it is looking at. `enlarged` always shows the model the plain enlargement, which is predictable. `progressive` shows it the tile's surroundings as they stand, including tiles already finished - more consistent between neighbours, but mistakes can build up across a big picture. Try `enlarged` first.
upscale_modeloptUPSCALE_MODELOptional. An ordinary upscaler (ESRGAN and friends) to enlarge with before the tiles are repainted. Without one, plain bicubic is used. Pick a clean, neutral model rather than a sharp one - the enlargement becomes the frozen context and the reference every tile works from, so halos and invented texture get treated as real detail and copied rather than fixed. `4xRealWebPhoto_v4_dat2`, `4xNomosUniDAT_otf` and `RealESRGAN_x4plus` are good; anything with "Sharp" in the name is not. Its result is always resized to exactly `scale_factor`, so a 4x model at scale_factor 2 is fine (better, even) but a 2x model at scale_factor 4 leaves half the enlargement to bicubic.

Outputs (3)

NameTypeDescription
imageIMAGE
latentLATENT
reportSTRING