ComfyUI-42lux-archive Introduction
ComfyUI-42lux is a collection of four ComfyUI nodes for working with prompts, Flux image dimensions, sampling settings, and high-resolution image workflows. It can help you keep an eye on prompt length, choose an image size, and prepare an existing image for another generation step.
This README describes a preserved historical snapshot, not an actively maintained original repository. The original 42lux/comfyui-42lux repository is unavailable. The code originally authored by 42lux is preserved and can be viewed in the accessible archive. The descriptions below reflect the archived README and the supplied source for FluxHighresFixScaler; behavior not shown in those materials is left unspecified.
How ComfyUI-42lux Works
Think of a ComfyUI workflow as a set of connected workstations. Each node handles one task, then passes its result to the next:
- PromptWithTokenCounter gives you a place to write a prompt and count its tokens for
clip-landt5xxl. - FluxEmptyLatentSizePicker helps you select a resolution for an empty latent used in a Flux workflow. A latent is the working image representation used during generation, rather than a finished image you can view directly.
- ModelSamplingFluxNormalized adjusts sampling parameters in relation to image dimensions. Its stated aim is more consistent quality when you change resolution.
- FluxHighresFixScaler takes an existing image, scales it toward a selected pixel count, blends in noise, and encodes the result as a latent for a subsequent workflow step.
The scaler works a little like enlarging a photograph, adding a controlled amount of texture, and handing it back to the image-generation process for further work. It does not return a finished upscaled image: its output is a LATENT. Whether later steps produce more useful detail depends on the rest of your workflow.
ComfyUI-42lux Features
PromptWithTokenCounter
This text-box node counts tokens in a prompt for clip-l and t5xxl. Tokens are the pieces of text a model processes; they are not necessarily the same as words. The counter can help you check prompt length while editing, especially when you use a long description. The preserved README does not specify its controls or how it presents the counts.
FluxEmptyLatentSizePicker
This node lets you choose an optimized resolution for an empty latent in a Flux workflow. It is intended to make the starting-size decision easier. The preserved README does not list its available sizes or explain how it determines which resolutions are optimized, so treat its choices as workflow options rather than a guarantee of a particular result.
ModelSamplingFluxNormalized
This node adjusts model sampling parameters based on image dimensions, with the goal of maintaining more consistent quality across resolutions. It may be useful when you experiment with different canvas sizes and want the sampling setup to account for that change. The available controls and the exact adjustment are not documented in the supplied materials.
FluxHighresFixScaler
This node prepares an existing image for a high-resolution follow-up step. It requires an image and a VAE, accepts an optional mask, and returns an encoded latent. Unlike the older README’s description of a fixed 6-megapixel target, the preserved source offers four target sizes:
| Setting | Available values or range | What it changes |
|---|---|---|
| Target resolution | 4MP, 5MP, 6MP, 7MP | Chooses an approximate target pixel count. The node calculates new width and height from that target while preserving the input image’s aspect ratio. |
| Upscale method | nearest-exact, bilinear, area, bicubic, lanczos | Chooses how pixels are resized. For example, nearest-exact gives a more block-like enlargement, while bicubic and lanczos offer smoother interpolation. |
| Noise scale | 0.00 to 100.00; default 0.40 | Controls the spread of randomly generated noise before blending. A larger value does not guarantee better detail. |
| Blend opacity | 0 to 100; default 20 | Controls how strongly the noise-treated image is mixed with the resized image. At 0, the noise blend has no visible effect on the image passed to the VAE. |
| Mask | Optional | Limits where the noise blend is applied. In the preserved code, the mask is inverted for compositing: darker mask areas retain more of the resized image, while lighter areas receive more of the blended result. |
For a first comparison, you could keep the default noise scale and blend opacity, then try the same input at 4MP and 6MP. This changes the size the node prepares without also changing the noise settings. If the added texture is too noticeable, lower blend opacity first. Processing a larger image can require more resources; the available materials do not provide performance measurements.
The target is an approximate area, not a guaranteed exact width and height. The node rounds its calculated dimensions to whole pixels. It also generates random noise, so separate runs need not produce identical noise patterns.
Troubleshooting ComfyUI-42lux
The high-resolution node does not give me a viewable image. What should I do?
- Check the node’s output type:
FluxHighresFixScalerreturnsLATENT, notIMAGE. - Connect that output to a compatible next step in your workflow.
- If you need to view the result as an image, use an appropriate latent-to-image decoding step with a VAE.
My output has too much added texture. What should I change?
- Reduce blend opacity to weaken the noise treatment.
- If needed, reduce noise scale as well.
- Change one setting at a time so you can see which adjustment helps.
The noise effect appears in the wrong part of my masked image. Why?
The preserved source inverts the supplied mask during compositing. Try checking whether your mask’s dark and light areas are opposite to what this node expects: dark areas preserve more of the resized image, while light areas receive more of the noise-blended image.
Why isn’t the result exactly 4, 5, 6, or 7 million pixels?
The node preserves the image’s aspect ratio and rounds width and height to whole pixels. Those rounded dimensions can produce a pixel count slightly different from the selected target.
Does “highres fix” automatically create new detail?
No. This node resizes an existing image, blends in noise, and encodes it as a latent. The appearance of the final image depends on what you do with that latent afterward.
Learn More about ComfyUI-42lux
For the preserved README and source files, see the ComfyUI-42lux archive at the documented commit. It is the reference for this historical snapshot; it should not be mistaken for the unavailable original repository or evidence of ongoing maintenance.
