ComfyUI-nodes-hnmr
Provide various custom nodes for Latent, Sampling, Model, Loader, Image, Text. This is the fixed version of the original a/ComfyUI-nodes-hnmr by hnmr293.
Nodes (20)
Compare two CLIP text encoders on the exact same prompt
Turn a merged weight dictionary back into something you can sample
Turn a pile of generated images into one tidy grid, saved as a PNG
Blend two images with blend modes ComfyUI forgot
A KSampler that lets you override just one setting at a time
KSamplerSetting
Sweep seeds, steps, CFG, and even models in one run
Look at the actual numbers inside your latent
See what your latent's channels actually look like
Sample the same prompt against two checkpoints, side by side
RandomLatentImage
Export a merged weight dict as a .safetensors checkpoint
Write any string to disk from the graph
Load a checkpoint as raw weights, not as a model
Merge two checkpoints (or three, with add-difference) without leaving ComfyUI
Blend different parts of a UNet at different strengths
Sweep block-weighted merges in one run, SuperMerger style
Decode a whole latent batch without blowing up your VRAM
Chunk your image batch through the VAE
Decode the same latents with two different VAEs at once
Disclaimer
This is only a fix implemented on top of the original ComfyUI-nodes-hnmr by hnmr293. The reason why this repo exists is because, hnmr293 has not been approving any pull requests for a while now, and I believe our community deserves to be able to use this amazing tool by hnmr293 without any issues. All credits go to:
ComfyUI custom nodes

Examples
X/Y/Z-plot
seeds, steps, cfg scales and others

models

VAEs

Merge
simple merge and merge block weighted (thanks for @bbc-mc)
BMW

Multi-BMW
BMW with multi-alpha like supermerger (thanks for @hako-mikan)

Latent visualization
visualization of 4-channel latent tensor

Node List
Latent nodes
|category|node name|input type|output type|desc.|
| --- | --- | --- | --- | --- |
|latent|RandomLatentImage|INT, INT, INT|LATENT|(width, height, batch_size)|
|latent|VAEDecodeBatched|LATENT, VAE, INT|IMAGE|VAE decoding with specified batch size|
|latent|VAEEncodeBatched|IMAGE, VAE, INT|LATENT|VAE encoding with specified batch size|
|latent|LatentToImage|LATENT, FLOAT, FLOAT|IMAGE|convert 4-ch latent tensor to 4 grayscale images|
|latent|LatentToHist|LATENT, ...|IMAGE|create a histogram of the input latent|
Sampling nodes
|category|node name|input type|output type|desc.|
| --- | --- | --- | --- | --- |
|sampling|KSamplerSetting|MODEL, CONDITIONING, CONDITIONING, LATENT|DICT|aggregate sampler's setting to single dict|
|sampling|KSamplerOverrided|various|LATENT|override sampler's setting defined by KSamplerSetting|
|sampling|KSamplerXYZ|various|LATENT|generate latents with values|
Model nodes and Loader nodes
|category|node name|input type|output type|desc.|
| --- | --- | --- | --- | --- |
|loader|StateDictLoader|(model name)|DICT|load state_dict|
|model|Dict2Model|DICT, (config_file)|MODEL|instantiate a model from given state_dict|
|model|StateDictMerger|DICT, DICT, FLOAT|MODEL, CLIP, VAE|merge two or three models|
|model|StateDictMergerBlockWeighted|DICT, DICT|DICT|merge two models with per-block weights|
|model|StateDictMergerBlockWeightedMulti|MODEL, MODEL, STRING|MODEL, CLIP, VAE|merge two models with per-block weights|
|model|SaveStateDict|MODEL, STRING, STRING|-|save state_dict to the output directory|
|model|ModelIter|MODEL, MODEL|MODEL|iterate models|
|model|CLIPlIter|CLIP, CLIP|CLIP|iterate CLIPs|
|model|VAElIter|VAE, VAE|VAE|iterate VAEs|
Image nodes
|category|node name|input type|output type|desc.|
| --- | --- | --- | --- | --- |
|image|ImageBlend2|IMAGE, IMAGE, FLOAT, STRING|IMAGE|ImageBlend with extra blend modes|
|image|GridImage|IMAGE, INT, INT|-|generate single image with specific number of columns|
Others
|category|node name|input type|output type|desc.|
| --- | --- | --- | --- | --- |
|utils|SaveText|STRING, STRING, STRING|-|save texts with specified prefix and ext|