Batch-invariant inference nodes for guaranteed reproducibility in ComfyUI. ThinkingMachines + ECHO 2.0 + Nemotron patterns.
Package profile
README
Batch-invariant inference nodes for guaranteed reproducibility in ComfyUI.
temperature=0 is NOT enough for determinism.
The real culprit is batch-size variance. Same prompt, same seed, different batch sizes = different outputs.
Sources
5 sourcesVerified Sep 17
Source excerpts
1 excerptSource context: Repo JosephOIbrahim/comfyui-deterministic-nodes
These nodes enforce batch_size=1 processing with fixed RNG states, guaranteeing:
Same seed + Same prompt = Identical output (ALWAYS)
JI/Reproducible category)| Display Name | What It Does |
|---|---|
| Locked Sampler ⟳ | Same seed = same output, every time |
| Output Matcher | Verify your outputs match exactly |
| Expert Selector | Pick the right AI model for your task |
| Multi-Pass Refiner | Refine in 3 stages (coarse → detail) |
| Memory Recall | Retrieve context from 4-tier memory |
Guarantees identical outputs with the same seed:
batch_size=1 internally (the secret sauce)Verify reproducibility with configurable tolerance:
exact: Byte-for-byte matchepsilon_1e-6: Allow tiny floating-point varianceepsilon_1e-4: Allow small floating-point variancestructural: Shape and dtype match onlyPick the right AI model automatically:
Refine in stages (like render passes):
Retrieve context from 4-tier memory:
Copy to ComfyUI custom_nodes:
ComfyUI/custom_nodes/ComfyUI-DeterministicNodes/
Restart ComfyUI.
[Model] --> [Locked Sampler] --> [Output Matcher] --> [Output]
| |
+-- seed=42 ----------+
| |
+-- checksum ---------+-- verify on next run
[Prompt] --> [Expert Selector] --> [Selected Model] --> [Locked Sampler]
|
+-- expert_0: General
+-- expert_1: Code
+-- expert_2: Domain
+-- expert_3: Math
[Query] --> [Memory Recall] --> [Prompt with Context] --> [Model]
|
+-- hot_only: Fast, GPU cache
+-- hot_warm: Recent context
+-- all_tiers: Full history
Batch=1: "The answer is 42"
Batch=4: "The answer is 41" <-- DIFFERENT!
Batch=8: "The answer is 43" <-- DIFFERENT!
GPU parallel operations have floating-point accumulation order variance. Different batch sizes = different accumulation order = different results.
batch_size=1)seed + item_index)cudnn.benchmark=False)torch.use_deterministic_algorithms(True))These nodes integrate with:
Dual-licensed under AGPL-3.0 and Commercial licenses.
| Use Case | License | Requirements |
|---|---|---|
| Open source pro |
Nodes in this pack
5 nodesVerified Sep 17