Resolution Advisor
The node that tells you what resolution your model can actually do
- resolution
- GENERATE
- NEED_HIRES
- NEED_UPSCALE
The classic high-res trap: you type 4K into the KSampler and get either an out-of-memory error or a 4K image full of doubled-up artifacts, because no diffusion model was trained to output 8.29MP in one go. Resolution Advisor is the pack's answer - the node the whole "Flux Resolution" pack exists for. You give it the resolution you want and the model you're using, and it computes the resolution you should actually generate at, plus two flags that tell you whether a HiRes pass and then a plain upscale are needed to reach your target.
It encodes the classic two-stage strategy the community has converged on: generate near the model's native resolution, then grow the image in a second, low-denoise pass (hi-res fix) rather than pushing one giant generation. Everything it does is model-aware - it knows each model's patch length, minimum side, and maximum pixel budget.
How it works
For each supported model the pack bakes in three numbers - patch length (the step every valid dimension must be divisible by), minimum side length, and a max total-pixel cap:
| Model | Patch | Min side | Max size | |---|---|---|---| | FLUX.1-dev | 16 | 320 | 1MP | | FLUX.2-dev | 16 | 400 | 2MP | | Qwen-Image | 16 | 384 | ~1.76MP | | SDXL | 8 | 512 | 1MP |
Your desired resolution is valid only if both dimensions meet the minimum, divide evenly by the patch length, and the total pixel count stays under the cap. If it is, the Advisor returns it unchanged. If not, it searches all valid resolutions for the one closest to your target - first matching your aspect ratio, then picking the closest equal-or-larger size. Then the planning kicks in:
- If the generate resolution is smaller than your target in either dimension,
NEED_HIRESgoesTrue- you should run a 2x HiRes fix (latent upscale plus a low-denoise img2img pass, ~0.3–0.5). - If doubling the generate resolution still doesn't reach the target,
NEED_UPSCALEgoesTruetoo - you need a third, plain upscale pass. - If both are
False, you can generate directly at the suggested resolution and you're done.
The README walks a concrete example: a requested 3844×2160 for FLUX.1-dev fails both the stepping and the size cap, the Advisor suggests generating at 1280×720, flags that a 2x HiRes fix brings you to 2560×1440 but still short of target (NEED_HIRES and NEED_UPSCALE both true), and you finish with a plain upscale and a final crop/downscale to the reference.
Inputs and outputs
resolution- theIG1_RESOLUTIONyou want, so pair it with the pack'sResolutionnode. Note the tooltip: the reference gets adjusted to match patch length if needed.model- a dropdown, default FLUX.2-dev, with FLUX.2-dev, Qwen-Image, FLUX.1-dev, and SDXL.GENERATE- theIG1_RESOLUTIONto feed your first-pass KSampler.NEED_HIRES/NEED_UPSCALE- BOOLEAN flags for your conditional logic.
Building the automation
The Advisor only advises. To make the pipeline run itself you wire the two booleans into conditional nodes (or the pack's Image Selector, which lazily picks between the original and upscaled image based on use_upscaled), generate at GENERATE, and let each pass trigger only when its flag is set. There's a downloadable example workflow in the repo (Flux.1-Dev_HiRes.json) that shows the full generate → HiRes → upscale → final downscale chain; it needs ComfyUI Essentials for the last step.
Two honest caveats. First, the strategy is opinionated - it's generate-small-then-double-until-you-pass-the-target-then-shrink, which is deterministic and sane for automation but slightly wasteful; you render bigger than needed and crop back. If you'd rather not, a tiled upscale is a legitimate alternative that skips the overshoot. Second, the model profiles are hardcoded reasonable values, not gospel - for FLUX.2-dev the source explicitly estimates the 2MP training size from BFL's 4MP output claim, and that's exactly the kind of thing that shifts as models change. It's a well-informed helper, not a crystal ball.
Install
Part of the IG1 Tools pack - Manager "Install via Git URL" with https://github.com/iguanesolutions/comfyui-ig1-tools.git, or git clone into ComfyUI/custom_nodes and restart. No model downloads; dependencies (requests, aiohttp, torch, numpy, Pillow) are already in a stock ComfyUI. Find it under IG1 Tools.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| resolution | IG1_RESOLUTION | The desired resolution of the image to be generated. Will be adjusted as reference to match patch length if necessary. | |
| model | COMBO | FLUX.2-dev | The model you want to compute advises for. This will be used to get the patch length, min lengths and max size. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| GENERATE | IG1_RESOLUTION | The first pass generation resolution respecting model's patch len, min lenghts and max size. |
| NEED_HIRES | BOOLEAN | Indicate if a second pass, 2x HiRes upscale is needed. True if the generate resolution is lower than the reference resolution. |
| NEED_UPSCALE | BOOLEAN | Indicate if a third pass, regular upscale is needed. True if the HiRes second phase resolution is lower than the reference resolution. |