To upscale a generated image with ESRGAN in ComfyUI, connect the image to Upscale Image (Using Model), select an ESRGAN model with Load Upscale Model, and compare the resulting dimensions with your target. A model’s stated multiplier predicts the dimensions; it does not guarantee that the image’s content or perceived detail will improve.
Choose a model and calculate the target
Find an ESRGAN model, such as RealESRGAN, and check its listed magnification factor. ComfyUI’s upscale workflow guide describes saving a downloaded .pth model in ComfyUI/models/upscale_models and selecting it with Load Upscale Model. The model loader selects the model; Upscale Image (Using Model) applies it to the image.
Use the actual input width and height, not a prompt’s intended size. For a model with scale factor s:
- Expected width = input width ×
s - Expected height = input height ×
s - Expected megapixels ≈ output width × output height ÷ 1,000,000
For chained models, multiply the factors: a 2x stage followed by a 4x stage has a nominal cumulative factor of 8x. Calculate each stage separately when planning memory or a delivery size. Treat these as predictions based on the model factor, then check the output image’s actual dimensions.
Build and run the workflow
- Confirm the source image’s pixel dimensions in ComfyUI or an image viewer. Record both width and height.
- Add
Load Image,Load Upscale Model, andUpscale Image (Using Model)nodes. Select the ESRGAN model in the loader and connect the image output fromLoad Imageand the model output fromLoad Upscale Modelto the corresponding inputs ofUpscale Image (Using Model). - Connect the upscaler’s image output to an output path in your workflow, then click
Queue. The official upscale tutorial also listsCtrl(cmd) + Enteras a shortcut for running this workflow. It shows connecting a text-to-image workflow’s output directly to the upscale nodes, so a new generation is not required just to add this step. - Inspect the completed image’s actual width and height. Compare each dimension to the calculated result and to the delivery target. Do not infer the size from the model name alone.
Example: check the dimensions and the image
The figures below are a hypothetical calculation, not a measured ComfyUI run. Suppose a generated image is 768 × 512 and the chosen model is labelled 4x. The nominal output is 3072 × 2048, or about 6.29 megapixels. If the target is 3000 × 2000, the predicted result exceeds both target sides. Confirm the saved output dimensions before accepting it, and decide whether the extra size is suitable for your delivery.
| Check | Hypothetical result | Decision |
|---|---|---|
| Input | 768 × 512 | Use these actual dimensions for the calculation |
One 4x stage | 3072 × 2048 | Predicted dimensions exceed a 3000 × 2000 target |
Two stages, 2x then 4x | 1536 × 1024, then 6144 × 4096 | Nominal cumulative factor is 8x; likely excessive for that target |
| Output verification | Compare the saved file’s width and height with the prediction | If they differ, investigate the selected model and workflow output before relying on the estimate |
A dimension match is only one acceptance check. Inspect faces, lettering, fine edges, and textures at the intended viewing size. Upscaling models may create plausible-looking detail that was not present in the input. A larger pixel count does not establish that the new detail is accurate.
If the target is not met
First check that the intended model is selected, the image and model are connected to the correct nodes, and the output being inspected is the upscaled image. Recalculate using the source file’s dimensions and the selected model’s stated factor.
If one stage is insufficient, the official guide describes chaining upscale nodes, such as a 2x stage followed by a 4x stage. Work out the cumulative factor before adding a stage: it may overshoot the target substantially. After chaining, run the workflow and check the actual dimensions again; each stage is a new result to inspect, not a reason to assume the content is better. If the target falls between available model outputs, the cited guide does not specify an exact-size fitting step. Treat any separate resizing as another operation and verify its final dimensions and appearance independently.
Common questions
Does choosing a `4x` model mean the final image will always be exactly four times each side?
The model label is the basis for the expected-size calculation. Verify the actual output file’s width and height rather than treating the label as proof of the result.
Can I upscale an image after generating it, or must I combine both workflows?
Either approach fits the documented workflow: load an existing image for upscaling, or connect a text-to-image output to the upscale nodes. Combining them is optional.
Will ESRGAN restore detail that was never visible in the source?
It can reconstruct or add plausible detail, but the cited guide does not promise recovery of true missing information. Judge content fidelity separately from dimensions, especially for faces, small text, and important object edges.
Sources and next step
This guide interprets public documentation and uses explicitly hypothetical acceptance examples, not application tests. Controls and availability can change; verify the cited manual against your installed version.
For work created in Imagild, carry the input requirements and acceptance checklist into the photo editor. The external software controls discussed above belong to their respective products.