Nodes/AfterDark Film AR Selector/AfterDark Film Grain & Emulsion
ComfyUI Node

AfterDark Film Grain & Emulsion

The film-stock grain node with 32 named emulsions — the crown jewel of this pack

By hackafterdark·Created 9 months ago·Updated 4 days ago· 4
AfterDark Film Grain & Emulsion
  • image
  • image
film_presetNone (Manual)
film_format35mm (24x36 - Standard Grain)
noise_level0.025
grain_size1.5
noise_typegaussian
channel_modemonochromatic
micro_jitter0.0015
chromatic_aberration0.0010
spatial_resample0.015
gamma_shift0.980
edge_softening0.10
luminance_responseFilm (Midtone & Shadow)
tone_warmth0.000
seed0

The thing that separates "film look" from "grain filter from 2010" is that real grain is not a flat overlay. It's denser in the shadows and midtones, sparser in bright skies, and it varies with the stock - Tri-X is a different texture than Portra, which is different from Velvia. AfterDark Stochastic Noise is the node in this pack where the author clearly spent the most time: 32 named film emulsions (Portra 400, Tri-X 400, Velvia 50, CineStill 800T, Kodachrome 64, Polaroid 600, and a couple dozen more), each wired to grain size, noise type, color behavior, and warmth. Pick a stock, and the look follows.

It's in the HackAfterDark category. This is your "make it read as captured, not generated" layer - the single cheapest realism move there is, and one the community has converged on: a subtle grain pass does more for believability than most prompt tweaks.

How it works

Every preset is a dict of parameters - noise distribution, base grain size, jitter, chromatic aberration, warmth, noise level, gamma shift, softening, and a luminance response. A film_format scaler (35mm / medium / large format) shrinks grain for the bigger negatives. The genuinely nice part is the luminance response: instead of uniform noise, it weights grain by local brightness - Film (Midtone & Shadow) peaks grain in shadows and midtones with a soft roll-off in highlights (default), Digital (Shadow Heavy) concentrates it in the darks like sensor read noise, and Uniform (Flat) spreads it everywhere.

Four noise distributions back it: gaussian (standard), poisson (shot noise, signal-dependent), multiplicative (dye-cloud clumping), and laplacian (heavy-tailed halide spikes). Beyond grain, the node layers on the "anti-detector" extras - sub-pixel micro_jitter, a down/up spatial_resample that strips VAE lattice artifacts, gamma_shift, and edge_softening. Treat those as the experimental half: the mainstream win is the grain itself.

Inputs that matter

You can get 90% of the value from three knobs:

  • film_preset - pick a stock. Choose None (Manual) and the manual widgets below become your controls.
  • noise_level (0–0.2, default 0.025) - keep it 0.01–0.03 for realism; higher is heavy texture.
  • luminance_response - leave Film (Midtone & Shadow) on unless you specifically want the digital-shadow or uniform look.

grain_size, noise_type, channel_mode, tone_warmth, and the anti-detector group are all exposed for manual tuning, plus an optional seed. Output is a single image (IMAGE), after VAE decode and before save. Nice touch from the pack's front-end: picking a preset auto-fills every manual widget, and touching any of them flips you back to manual mode.

Installing it

Same one-time setup as the rest of the pack:

cd ComfyUI/custom_nodes
git clone https://github.com/hackafterdark/ComfyUI-HackAfterDark-Nodes

Restart ComfyUI, or install via ComfyUI Manager by searching "HackAfterDark" (pack title AfterDark Film AR Selector). No models to download, no API keys. The google-generativeai in the pack's requirements is for its Gemini node only - this one is pure torch.

Where people get tripped up

Two things. First, the defaults on the node are the manual values - a preset overwrites them when you select it, which surprises people who tweaked a slider first and then picked a stock. Set the preset, then fine-tune. Second, don't crank everything at once; it's a 13-parameter node and they interact (the resample, jitter, and gamma shifts stack). Pick a stock, set noise_level, leave the rest alone, and you'll get the film look without turning your image into static. And if a stock reads too heavy, that's normal - the presets are tuned loud, and dialing noise_level down is the intended workflow.

CategoryHackAfterDark

Inputs (15)

NameTypeDefaultDescription
imageIMAGE
film_presetCOMBONone (Manual)33 options: None (Manual), Kodak Portra 400 (Color Negative), Kodak Ektachrome 100VS (Color Positive), Kodak Tri-X 400 (B&W Silver Halide), Fuji Velvia 50 (Fine Slide Film), Ilford HP5 Plus 400 (B&W Medium Grain), +27
film_formatCOMBO35mm (24x36 - Standard Grain)3 options: 35mm (24x36 - Standard Grain), Medium Format (6x6 - Fine Grain), Large Format (4x5 - Ultra Fine)
noise_levelFLOAT0.0250–0.2
grain_sizeFLOAT1.50.5–5
noise_typeCOMBOgaussian4 options: gaussian, poisson, multiplicative, laplacian
channel_modeCOMBOmonochromatic2 options: monochromatic, color
micro_jitterFLOAT0.00150–0.01
chromatic_aberrationFLOAT0.00100–0.005
spatial_resampleFLOAT0.0150–0.05
gamma_shiftFLOAT0.9800.9–1.1
edge_softeningFLOAT0.100–1
luminance_responseCOMBOFilm (Midtone & Shadow)3 options: Film (Midtone & Shadow), Digital (Shadow Heavy), Uniform (Flat)
tone_warmthFLOAT0.000-0.1–0.1
seedoptINT00–18446744073709550000

Outputs (1)

NameTypeDescription
imageIMAGE