Color Anchor Node Flux2Klein
New ComfyUI node prevents AI image color shifting by correcting per-channel spatial mean after each denoising step.
Developer Capitan01R has released the Color Anchor Node, a specialized tool for ComfyUI that addresses a persistent issue in Flux2Klein image generation models: color shifting during sampling. The problem occurs when using reference latents, where the model gradually overrides original color statistics as sampling progresses, causing noticeable drift—especially problematic in short 4–8 step schedules. The node operates by hooking into the sampler's post-CFG callback and, after every denoising step, measures the difference between the model's predicted color (calculated as per-channel spatial mean) and the reference latent's color, then applies gentle correction.
The correction mechanism is carefully designed to only affect the DC offset (color) while completely preserving structure, edges, and texture. It uses a dual progress signal system—whichever is stronger between sigma-based and step-count-based progression—ensuring reliability even on very short schedules where sigma barely changes. Users can adjust the ramp curve shape of the correction over time, with higher values front-loading the adjustment. The node also offers channel weighting options: Uniform mode corrects all channels equally, while Variance mode trusts channels with more stable color in the reference more heavily, useful when some channels carry cleaner color information.
Available on GitHub as part of the ComfyUI-Flux2Klein-Enhancer repository, the tool includes debug mode for per-step drift analysis and works alongside Capitan01R's previously released reference latent controller node. Example workflows demonstrate its effectiveness in maintaining targeted color palettes across complex generations.
- Corrects color drift by measuring per-channel spatial mean differences after each denoising step
- Works on 4–8 step schedules using dual sigma/step-count progress signals
- Offers Uniform and Variance channel weighting modes for precision control
Why It Matters
Enables stable color reproduction in AI image generation, crucial for professional design workflows and consistent visual branding.