FluxKontextImageScale
Resize your Kontext reference images to a size the model likes
- image
- IMAGE
Kontext is Black Forest Labs' instruction-based editor in the Flux 1 family: feed it an image and a sentence, get back the same image edited. It consumes its reference images in context - the whole point of the "Kontext" approach - and that makes input resolution a real problem. Oversized or awkwardly-shaped references degrade output, sometimes producing multiple subjects where there should be one. FluxKontextImageScale exists to stop that: it resizes your image to one of the 17 resolutions Kontext was actually trained on.
The one input
image- the reference image to normalize. One input, one output, zero knobs.
How it works
The mechanism is refreshingly honest. The node computes your image's aspect ratio, then picks the closest of the 17 preferred training resolutions - the buckets range from tall-portrait (672×1568) through square (1024×1024) to wide-landscape (1568×672) - and resizes to it with Lanczos and center cropping. Your image keeps its aspect ratio, snaps to the nearest bucket, and comes out shaped like the images the model actually saw during training.
Where it fits
It's the companion to FluxKontextMultiReferenceLatentMethod - the popular node that stuffs multiple reference images into the Kontext latent. That node is the one doing the encoding; this one is the preprocessing step you run on each reference image first. The recommended flow:
Load Image → FluxKontextImageScale → Kontext latent method → KSampler
The source description says it plainly: it resizes to something "more optimal for flux kontext." If you've been feeding Kontext raw screenshots and getting back doubled subjects or weird crops, this node is the usual fix.
The gotchas
It's a resizer, not a magic eraser. It changes dimensions only - no cropping decisions beyond center, no detail restoration. A badly framed or low-quality reference resized to the perfect bucket is still a badly framed reference. And don't run it on the image you're generating unless you actually want that exact output resolution; its job is reference normalization, and slapping it on everything in the graph is how people end up with 672-px-tall generations they didn't ask for.
Also worth knowing: Kontext's legacy is as much license drama as technique - the model shipped with a license update that cracked down on content-restriction circumvention, which turned a lot of the fun community use into a license violation. The node itself is fine; the checkpoint's terms are a separate reading assignment.
Ships with ComfyUI core, no install. One wire, and your Kontext references stop being the reason your edits look off.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |