Nodes/comfyui-colorfix-v3/Flux Tile ColorFix Patcher
ComfyUI Node

Flux Tile ColorFix Patcher

Fix Flux's color drift without touching its detail

By ihorpankin·Created 6 months ago·Updated 6 months ago· 6
Flux Tile ColorFix Patcher
  • model
  • ref_latent
  • model
blur_k8
weight1.00
blur_modegaussian (smoother)

If you've done tiled upscaling, you know the failure: every tile comes back slightly different - one greenish, one washed out, one with a color cast that has no business being there. That's the classic color drift problem, and A1111's ControlNet extension has been solving it for years with a toggle literally called "ColorFix". This node is that algorithm, ported to ComfyUI and rebuilt for Flux.

The idea is almost embarrassingly simple. Every denoising step, the generation's low-frequency color information gets replaced with the reference image's low-frequency color, while the high-frequency detail the model just invented is left alone. You keep the texture the model made, but the color palette comes from your source image.

How it works

Technically, the node patches your model with a post-CFG callback that runs at every denoising step:

fixed = x0 - blur(x0, k) + blur(reference, k)

Blur the prediction and the reference, subtract the prediction's blur, add the reference's blur. The weight input then blends between the corrected and uncorrected latent, so 1.0 is full color replacement and 0.5 is halfway. Detail survives because the blur only captures the color-bearing low frequencies - the high-frequency structure of the prediction is never touched.

Flux gets its own variant for two reasons. Its latents are 16-channel instead of SD/SDXL's 4, and it runs at cfg_scale=1.0 with guidance embedded, so the callback takes the simple no-CFG path. The reference latent is also scaled into Flux's internal latent space automatically via latent_format.process_in(), which is the kind of detail that makes or breaks these ports.

The inputs that matter

  • ref_latent - VAE-encode your reference image and feed it here. This is where people get burned: use the Flux VAE, not an SDXL one. A mismatched VAE means a wrong latent space and a wrong palette.
  • blur_k - the frequency split point, default 8 (range 3–32). Higher = more aggressive color transfer. At k=8 the kernel is 17×17.
  • weight - 0.0 is no correction, 1.0 is full color replacement. Start at 1.0 and dial back if you want the reference to be a suggestion rather than a law.
  • blur_mode - default gaussian (smoother), which the author recommends for Flux. box (A1111 original) gives the exact A1111 result but has a sharp frequency cutoff that can go patchy when used without a tile ControlNet.

Output is a single patched model, which you feed to your KSampler in place of the unpatched model.

Install

Pure Python, no requirements.txt, no model downloads:

cd ComfyUI/custom_nodes
git clone https://github.com/ihorpankin/comfyui-colorfix-v3.git

Restart ComfyUI; it's under colorfix-v3/flux. ComfyUI Manager: search "comfyui-colorfix-v3".

Where people get burned

Besides the VAE mistake above: this fixes color, not composition. It's a palette lock, not a structure lock - that's what the tile ControlNet (the pack's "Apply Ultimate ControlNet (FLUX)") is for. The classic workflow runs both: ColorFix keeps the tiles consistent, tile ControlNet keeps them faithful. And if your source is a soft JPEG, expect the sharp version of this node to look more flattering; if you want detail back, that's the +Sharp patcher's job.

Categorycolorfix-v3/flux

Inputs (5)

NameTypeDefaultDescription
modelMODEL
ref_latentLATENTVAE-encoded control/reference image. Connect from VAE Encode node. This provides the color palette to transfer. Use the Flux VAE for encoding.
blur_kINT83–32Blur kernel radius. Controls frequency split point. Larger = more aggressive color transfer. k=8 → 17x17 kernel.
weightFLOAT1.000–1Color fix strength. 0.0 = no correction, 1.0 = full color replacement.
blur_modeCOMBOgaussian (smoother)Blur algorithm for frequency split. Gaussian = smoother falloff, recommended for Flux. Box = sharp cutoff, A1111 original.

Outputs (1)

NameTypeDescription
modelMODEL