Save 4 hours! We auto-setup your workflow! Free!

Drop your workflow.json — we handle every dependency, custom node, and model. Just open the link and run.

Auto-Setup Workflow Json (Free) Now!
ComfyUI > Nodes > PR-ComfyUI-42lux-a2102899 > Flux Highres Fix Scaler

ComfyUI Node: Flux Highres Fix Scaler

Class Name

FluxHighresFixScaler

Category
42lux
Author
ComfyNodePRs (Account age: 0days)
Extension
PR-ComfyUI-42lux-a2102899
Latest Updated
2024-12-23
Github Stars
0.0K

How to Install PR-ComfyUI-42lux-a2102899

Install this extension via the ComfyUI Manager by searching for PR-ComfyUI-42lux-a2102899
  • 1. Click the Manager button in the main menu
  • 2. Select Custom Nodes Manager button
  • 3. Enter PR-ComfyUI-42lux-a2102899 in the search bar
After installation, click the Restart button to restart ComfyUI. Then, manually refresh your browser to clear the cache and access the updated list of nodes.

Visit ComfyUI Online for ready-to-use ComfyUI environment

  • Free trial available
  • 16GB VRAM to 80GB VRAM GPU machines
  • 400+ preloaded models/nodes
  • Freedom to upload custom models/nodes
  • 200+ ready-to-run workflows
  • 100% private workspace with up to 200GB storage
  • Dedicated Support

Run ComfyUI Online

Flux Highres Fix Scaler Description

Resizes images to a megapixel target, blends optional masked noise, and VAE-encodes the result.

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_scale at 0.40, and blend_opacity at 20, then compare the encoded result in your downstream workflow before increasing the target size or effect strength.
  • Use blend_opacity at 0 when 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 mask and 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 IMAGE and VAE, 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, or 7MP, 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 IMAGE with 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 4MP first, 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 MASK connection. 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 4MP to check whether the larger image is exhausting available resources.

Flux Highres Fix Scaler Related Nodes

Go back to the extension to check out more related nodes.
PR-ComfyUI-42lux-a2102899
RunComfy
Copyright 2025 RunComfy. All Rights Reserved.

RunComfy is the premier ComfyUI platform, offering ComfyUI online environment and services, along with ComfyUI workflows featuring stunning visuals. RunComfy also provides AI Models, enabling artists to harness the latest AI tools to create incredible art.

Flux Highres Fix Scaler