Flux Highres Fix Scaler:
Archived source: The original repository 42lux/comfyui-42lux is unavailable. This page documents the preserved implementation at commit c5016608f946. It is a historical source snapshot, not a claim that the original repository is maintained or currently installable.
FluxHighresFixScaler prepares an image for a high-resolution refinement workflow. It resizes the image to an approximate megapixel target while preserving its proportions, blends in Gaussian noise using a soft-light effect, and encodes the result with a VAE. This gives a downstream latent-processing workflow a larger starting image with adjustable texture variation. The node performs preparation and encoding; it does not generate a finished, refined image on its own.
Flux Highres Fix Scaler Input Parameters:
image
Required IMAGE. This is the image the node resizes and prepares for encoding. Its width and height determine the proportions of the resized result. Pass a batch containing exactly one image. The implementation removes a batch dimension only when its size is one; a larger batch remains four-dimensional and cannot be converted to a PIL image. No default, minimum, or maximum is specified.
vae
Required VAE. The VAE encodes the resized, blended image into the latent representation used by subsequent latent-processing nodes. Connect the VAE appropriate for your intended workflow. No default or numeric range is specified.
target_resolution
Required selection with options 4MP, 5MP, 6MP, and 7MP. This sets the approximate target pixel area: four million through seven million pixels, respectively. The node calculates a new width and height from that area and the source image’s proportions, then rounds to whole pixels, so the final pixel count may differ slightly from the selected target. Larger selections produce larger images to process. No default selection is specified.
upscale_method
Required selection with options nearest-exact, bilinear, area, bicubic, and lanczos. This chooses how the source pixels are resampled when the image is resized. The choice can affect how smooth or sharp the resized image appears before noise is blended and the VAE encodes it. Try bicubic or lanczos when you want to compare their treatment of fine detail, or nearest-exact when you want to preserve hard pixel edges. No default selection is specified.
noise_scale
Required FLOAT with default 0.40, minimum 0.00, maximum 100.00, and step 0.01. This controls the spread of the generated Gaussian noise before it is soft-light blended with the resized image. Lower values keep the noise closer to mid-gray and generally make its effect subtler; higher values create more variation. At 0.00, the generated noise is uniform rather than random. This setting controls the noise itself, while blend_opacity controls how strongly the noise-blended version contributes to the result.
blend_opacity
Required INT with default 20, minimum 0, and maximum 100. This sets the percentage used to blend the soft-light-treated image with the resized original. At 0, the noise blend has no effect; at 100, the full soft-light-treated image is used wherever the optional mask permits it. Intermediate values provide a less pronounced effect. It does not change the resize dimensions.
mask
Optional MASK. When connected, the mask controls where the noise-blended image replaces the resized original. The implementation resizes the mask to match the image and inverts it before compositing: black mask areas retain the resized original, while white mask areas receive the noise-blended result; gray areas produce a partial blend. With no mask, the effect applies across the image. No default value or numeric range is specified.
Flux Highres Fix Scaler Output Parameters:
latent
LATENT. This is a latent object containing the VAE-encoded result under its samples key. It represents the resized image after the soft-light noise treatment and any mask-based compositing. Connect it to a compatible downstream node that accepts a latent. It is not a viewable image or a completed high-resolution refinement by itself.
Flux Highres Fix Scaler Usage Tips:
- Start with
4MP,noise_scaleat0.40, andblend_opacityat20, then compare the encoded result in your downstream workflow before increasing the target size or effect strength. - Use
blend_opacityat0when you want the resized image encoded without the noise-blend effect. This is also a useful comparison when judging whether noise helps a particular image. - If you want to protect part of an image from the noise effect, make that area black in
maskand make the areas that should receive the effect white. Check the mask’s orientation before a long workflow run. - Choose the megapixel target based on what your downstream workflow can comfortably process. The selection specifies an approximate pixel count, not fixed width and height, so a wide image and a square image will receive different dimensions at the same setting.
- Pass one image at a time when processing a batch. The image conversion requires a batch size of one; it does not select the first item from a larger batch.
Flux Highres Fix Scaler Common Errors and Solutions:
Missing required input: image, vae, target_resolution, upscale_method, noise_scale, or blend_opacity
- Explanation: The node cannot execute if a required connection or setting is missing. The exact validation wording depends on the host.
- Solution: Connect an
IMAGEandVAE, then check that each required setting has a valid value selected.
Invalid target_resolution or upscale_method
- Explanation: A workflow value outside the listed choices is not supported by the node interface. An invalid resolution value can also fail when the implementation looks up its target area.
- Solution: Select one of
4MP,5MP,6MP, or7MP, and one of the five listed upscale methods. Re-select the value if you imported a workflow with an outdated setting.
Image dimensions or shape error
- Explanation: The implementation expects an
IMAGEwith batch, height, width, and channel dimensions. An empty or malformed image, including one with zero height, cannot be used to calculate the resize dimensions. - Solution: Connect a valid image-producing node and check that it produces a nonempty image rather than a latent or mask.
Not enough memory or out-of-memory error
- Explanation: A larger target requires more image data during resizing, noise generation, blending, and VAE encoding. Memory needs also depend on the rest of your workflow.
- Solution: Try
4MPfirst, process one image at a time, or reduce memory use elsewhere in the workflow.
Mask conversion or shape error
- Explanation: The optional mask is converted to an image and resized before compositing. A malformed or incompatible mask may fail during that conversion.
- Solution: Use a valid
MASKconnection. If the node works without the mask, inspect the mask-producing node and test with a simple single-image mask.
VAE encoding error
- Explanation: The final step calls the connected VAE to encode the prepared image. Failure at that step may indicate a VAE compatibility or resource problem; the source does not define a node-specific error message for it.
- Solution: Confirm that the VAE works elsewhere in the same workflow. If it does, retry with
4MPto check whether the larger image is exhausting available resources.
