RGB Noise (GEGL-like)
GEGL's RGB noise, ported to torch — grain without GIMP
- image
- image
RGB Noise (GEGL-like) is a faithful torch port of GIMP's gegl:noise-rgb filter, and it's the more aggressive cousin of the pack's CIE LCh Noise. Where the LCh node does perceptual, film-style grain, this one gives you the raw stuff: per-channel noise you can aim at red, green, or blue independently, with the exact toggles GIMP users know - correlated vs additive, independent vs shared, Gaussian vs uniform, linear RGB processing. If you've ever wanted to add that scanline-ish chroma noise or just dirty up an over-clean render, this is the knob box.
The headline feature is the per-channel control. red, green, and blue each take an amount from 0 to 1 (defaults at 0.2), so you can add noise to one channel only - the classic trick for cheap color texture or for simulating a slightly degraded broadcast signal. There's even an alpha amount for when your image has an alpha channel and you want the edge noise to match.
How it works
The math mirrors GEGL closely. There are two modes for how noise lands:
- Correlated (on by default) is multiplicative:
out = in * (1 + amount * noise). Noise scales with brightness, so it's brighter in highlights - closer to real film grain. - Uncorrelated is additive:
out = in + 0.5 * amount * noise. The 0.5 factor is there deliberately, matching GEGL's own behavior.
The independent toggle controls whether each RGB channel gets its own noise draw or all three share one - shared keeps the grain neutral, independent gives you per-channel color noise. gaussian picks Gaussian vs uniform distribution, and linear converts to linear RGB first for more radiometrically sane results. Everything is driven by a seed for deterministic, reproducible grain.
The inputs that matter
red/green/blue(0–1, default 0.2 each) - channel amounts. Set one to 0.5 and the others to 0 for channel-only noise.correlated- multiplicative grain (on) vs additive (off).gaussian- Gaussian vs uniform.seed- reproducibility.
One image output. Works on RGB or RGBA tensors.
Where it fits
This is a texture and finishing tool. Use it to add uniform grain to a whole batch of renders, to break up smooth AI skin, or to give flat digital output that "shot on something" feel. It pairs well with the pack's Mean Curvature Blur - smooth first, grain after - and the LCH noise node for layered, more interesting grain.
Install
ComfyUI Manager → search AnotherUtils, or:
cd ComfyUI/custom_nodes
git clone https://github.com/marcoc2/ComfyUI-AnotherUtils.git
Restart ComfyUI. Pure torch, no weights, no pip extras.
Common issues
The default 0.2 per channel on an already-noisy image stacks up fast - halve the amounts before blaming the node. Correlated vs additive changes character more than you'd expect: if grain looks "stuck to the image," flip correlated off. And note the node requires a 3- or 4-channel input; a mask or 1-channel tensor will throw an assertion error. Otherwise the main surprise is determinism: same seed, same grain, every time. Vary the seed if you want different noise per frame.
Inputs (10)
| Name | Type | Default | Description |
|---|---|---|---|
| image | IMAGE | — | |
| red | FLOAT | 0.2000–1 | — |
| green | FLOAT | 0.2000–1 | — |
| blue | FLOAT | 0.2000–1 | — |
| alpha | FLOAT | 0.0000–1 | — |
| correlated | BOOLEAN | true | — |
| independent | BOOLEAN | true | — |
| linear | BOOLEAN | true | — |
| gaussian | BOOLEAN | true | — |
| seed | INT | 0-2147483648–2147483647 | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| image | IMAGE | — |