Locked Sampler ⟳
The 'Locked Sampler' That Doesn't Sample (Yet)
- model
- positive
- negative
- latent
- latent
- determinism_proof
Same seed, same prompt, same image, every time - that's the promise of the Locked Sampler (class DeterministicSampler), and it's a promise ComfyUI mostly already keeps. The real question is whether this node is the way to get it. Short version: the idea is sound, the research it's built on is real, and as shipped this is a scaffold - it sets up deterministic mode and then hands your latent back unchanged. Locked, yes. Sampling, not yet.
What it's trying to do
The pack's whole thesis, straight from the README: "temperature=0 is not enough for determinism" because batch-size variance changes floating-point accumulation order on the GPU. That's not marketing - it's lifted from ThinkingMachines' genuinely good essay Defeating Nondeterminism in LLM Inference (Horace He, Sept 2025), which shows the same prompt producing different tokens across batch sizes in LLM inference. The catch: that's an LLM inference problem. Diffusion in ComfyUI is a different beast - a fixed seed plus a fixed batch size on a converging sampler like DPM++ 2M already reproduces reliably. Batch-invariance across different batch sizes is a niche worry, not the thing most people are actually fighting.
How it actually behaves
On a run, the node flips PyTorch into deterministic mode (cudnn.deterministic=True, benchmark=False, use_deterministic_algorithms(True)), seeds torch and CUDA with your seed, then iterates the incoming latent one image at a time, reseeding seed + i per item. That's the batch_size=1 secret sauce. But here's what the source reveals: _sample_single is a placeholder that returns the latent unchanged. No denoising happens. The latent output is your input, byte for byte, and the determinism_proof string is a JSON audit (seed, steps, cfg, sampler name, and a SHA-256 of the unmodified latent).
It's a working demonstration of the determinism pattern - the flags, the per-item RNG reset, the proof checksum are all real. It's just not a working sampler.
The inputs and outputs that matter
The familiar sampler trio is all here: seed, steps, cfg, sampler_name, plus denoise and the standard model / positive / negative / latent wires. You'd set these exactly like a KSampler. The two outputs are latent (feed it to VAE decode) and determinism_proof (a string you can preview or stash next to your image as an audit log).
Install
There are no models to download and the only dependency is torch>=2.0, which you already have. Install once for the whole pack, via ComfyUI Manager (search comfyui-deterministic-nodes) or by hand:
cd ComfyUI/custom_nodes
git clone https://github.com/joe002/comfyui-deterministic-nodes
Restart ComfyUI and you'll find the nodes under JI/Reproducible. Minor nit: the README says the folder should be ComfyUI-DeterministicNodes, but the clone comes out as comfyui-deterministic-nodes - doesn't matter, anything inside custom_nodes loads.
The honest take
If you want reproducible images today, use a stock KSampler, lock the seed, and avoid ancestral samplers (euler_ancestral, dpmpp_sde) if you need exact repeats - that's the community's well-worn advice. Keep an eye on this node if the author wires in a real sampler call; the determinism plumbing is genuinely there. As of v1.1.0, though, it's a demo wearing a sampler's clothes.
Inputs (9)
| Name | Type | Default | Description |
|---|---|---|---|
| model | MODEL | — | |
| positive | CONDITIONING | — | |
| negative | CONDITIONING | — | |
| latent | LATENT | — | |
| seed | INT | 00–18446744073709550000 | — |
| steps | INT | 201–100 | — |
| cfg | FLOAT | 7.00–20 | — |
| sampler_name | COMBO | 11 options: euler, euler_ancestral, heun, dpm_2, dpm_2_ancestral, lms, +5 | |
| denoiseopt | FLOAT | 1.000–1 | — |
Outputs (2)
| Name | Type | Description |
|---|---|---|
| latent | LATENT | — |
| determinism_proof | STRING | — |