Flux Kontext 图片缩放
Feed Kontext the aspect ratio it actually likes
- image
- IMAGE
Flux Kontext is picky about resolution, and this node exists to stop you guessing. Its entire job - one input, one output, no settings - is to resize an image to the resolution BFL's Kontext models were tuned around. The node description says it plainly: "This node resizes the image to one that is more optimal for flux kontext."
Here's the mechanism, and it's delightfully small. Kontext works by concatenating reference images directly into its context window (that's the architectural trick that made it the reference for instruction-style editing back in 2025 - see the character-consistency writeup in our KB for the full story). At inference time the image gets resized to one of a fixed set of "preferred" resolutions. This node keeps that exact list baked in: 17 aspect-ratio-matched sizes running from portrait 672x1568 up through 1024x1024 to landscape 1568x672, each step staying close to ~1MP. It takes your image's aspect ratio, picks the nearest matching size, and resamples with Lanczos and center cropping. No latents, no model, no API - pure tensor resize.
What you get
- Input:
image(IMAGE). That's it. - Output:
image(IMAGE) at one of the preferred Kontext resolutions.
That's the whole surface area. It's a convenience wrapper around math that Kontext users were already doing by hand - before this node existed, people were manually resizing reference images to 1024x1024 or matching the presets in a KSampler's resolution. If you're building a Kontext workflow with reference images, you drop this between your Load Image and wherever the reference gets conditioned, and stop thinking about it.
The honest context
Kontext itself has aged: by 2026 the community largely moved to FLUX.2 Klein and Qwen-Image-Edit for editing, with Kontext's own license (non-commercial, NSFW-derivative-prohibiting) part of why. The KB notes people kept Kontext installed mainly for its LoRA library - LoRAs nobody retrained for the newer editors. So this node is most useful if you're still on Kontext, working a Kontext-based character workflow, or using those surviving Kontext LoRAs. If you've already jumped to Klein or Qwen-Edit, the preferred-resolution table here doesn't apply to them, and you don't need this node.
One more thing to note: this is one of several nodes in ComfyUI-ADIC that are upstreamed from other packs - the stitch and batch-concat nodes carry "KJNodes" provenance, and this one lives in the advanced/conditioning/flux category alongside them. It's a small, well-contained utility, and for what it does it's correct.
Installing
cd ComfyUI/custom_nodes
git clone https://github.com/jinchanz/ComfyUI-ADIC
Restart ComfyUI, or install "ComfyUI-ADIC" via ComfyUI Manager. No extra dependencies and no model downloads - the pack's whole footprint here is a few hundred lines of Python. Note the README doesn't document this node at all (it's Chinese and only covers the translate nodes), so the source is the spec.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| IMAGE | IMAGE | — |