InjectTensorHashLog
A debugging scar left in the pack's history
- INT
InjectTensorHashLog is not a node you use. It's a node a developer made for himself, shipped by accident of history, and indexed here because comfy.icu catalogs every node a pack ever exposed. Read this, nod, and move on - but now you'll know what it is if an old workflow drags it in.
What it does
One input, one useless output:
enable(BOOLEAN, default true) - whether to inject.- Output:
INT- always 0. It's a placeholder so the graph stays legal; the node does its real work as a side effect.
When enabled, it monkey-patches torch.Tensor.__hash_log__ - a hashing helper this pack defined in its utils. The OMS-era pipeline code called that method at checkpoints throughout generation, printing SHA-256 hashes of key tensors to the console: the clothing latent, the noisy latent before sampling, the per-step noise prediction, the CFG'd result, and so on, each tagged with a Chinese label like "特征提取-衣服潜变量" (clothing latent extraction).
Why would anyone do that? The author was porting the reference diffusers implementation to ComfyUI and needed to prove his port produced identical tensors at every stage, not just similar-looking images. Hash log injection is exactly the tool for that job: run both implementations, diff the hashes, find the first stage where they diverge. It's forensic debugging for pipelines.
Why it exists in a published pack
The enable toggle and the node wrapper exist because the hashing had to be switchable - you don't want that console spam in normal use. In the current version of the pack the node is gone from the mapping entirely, though the pt_hash / pt_first_line helpers it depended on still ship in utils.py (and the pack's __init__.py still installs __hash_log__ on torch.Tensor at import, harmlessly returning an empty string).
Install
Same pack, for completeness:
cd ComfyUI/custom_nodes
git clone https://github.com/longgui0318/comfyui-oms-diffusion
# restart ComfyUI
If you load a workflow that contains it, the honest move is to delete it and re-wire around it - the INT output feeds nothing you need. If it errors, it's almost always because your ComfyUI version changed internals it pokes at, and there's no reason to fix it. The takeaway is simply that this pack's history is visible in its node list, and not every node is a tool for you.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| enable | BOOLEAN | true | — |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| INT | INT | — |