Normalize Image to [-0.5, 0.5]
Center your image values around zero, the [-0.5, 0.5] way
- image
- image
A tiny, boring, useful node that subtracts 0.5 from every pixel: output = input - 0.5. ComfyUI images normally live in [0, 1], so subtracting 0.5 shifts them to center on zero - your blacks become -0.5, mid-grey becomes 0, and white becomes 0.5.
That's the whole job. There's no scaling in this version (the std is effectively 1.0), just the recentering. Some models - particularly a few VAE variants, encoders, and custom training setups - were trained expecting input centered on zero in the [-0.5, 0.5] range rather than the raw [0, 1] ComfyUI hands out, and feeding them unnormalized data is a silent quality loss. If a model card or a node's docs mention [-0.5, 0.5] input, this is the node that gets you there.
Why it exists alongside its siblings
The pack ships a whole normalization family because "normalize your image" means different things to different models. This one is the mild recentering. Normalize Image to [-1, 1] is the stronger relative (also subtracts 0.5, then divides by 0.5 to stretch into the full GAN/tanh range). Normalize Image to ImageNet uses the dataset's real per-channel statistics. And Arbitrary Normalize + Normalize Parameters cover anything bespoke. You pick the one that matches the model you're feeding, not the one you think is "most normal."
Inputs and outputs
- image - the input tensor in
[0, 1]. - image (output) - the same image recentered to
[-0.5, 0.5].
Installing it
Part of Image Misc:
cd ComfyUI/custom_nodes
git clone https://github.com/set-soft/ComfyUI-ImageMisc
cd ComfyUI-ImageMisc && pip install -r requirements.txt
or ComfyUI Manager → "Image Misc", then restart. Under image/normalization.
Notes
The standard gotcha applies: don't preview the output expecting to see a normal image. Half your pixels are now negative, and preview nodes assume [0, 1]. If you're not sure whether your target model wants [-0.5, 0.5] or [-1, 1], check its documentation - guessing wrong produces degraded results, not errors, which is the sneaky kind of bug. And if you're just trying to make an image "look better," this isn't the node; that's not what normalization does. It's a compatibility shim between ComfyUI's tensor conventions and a model's training-time preprocessing, and it does exactly that.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |