Nodes/comfyui_bmad_nodes/HypernetworkLoader (dirty)
ComfyUI Node Runs on cloud

HypernetworkLoader (dirty)

Load a hypernetwork by typed name, not dropdown — HypernetworkLoader (dirty)

By bmad4ever·Created 3 years ago·Updated 9 months ago· 70
HypernetworkLoader (dirty)
  • model
  • MODEL
hypernetwork_name
strength1.00

HypernetworkLoader (dirty) is a version of ComfyUI's built-in HypernetworkLoader that takes the hypernetwork's name as a plain text input instead of a dropdown. The "(dirty)" in the name is the whole point: it's for when you want the model name to be data, not a hard-coded combo box.

First, the context: hypernetworks are a legacy training technique that injects a small helper network into the cross-attention module. They were largely replaced by LoRA - LoRA trains faster, produces better results, and is more flexible - so you're not reaching for this node in 2026 unless you're loading an old workflow or a model that shipped with a hypernetwork companion. But ComfyUI still ships the core loader, and if you need it, you need it.

What the dirty variant adds: core ComfyUI's loader lists hypernetworks in a dropdown, which you can't feed from a variable or an API request. This node takes a STRING instead and does a fuzzy filename match against your models/hypernetworks folder - the same "dirty loader" trick the pack applies to checkpoints and LoRAs. That makes it scriptable: the name can come from a string list node, a text file, or a parameter in an API call, and the workflow stays the same.

How it works

The loader is a thin wrapper. It resolves the typed hypernetwork_name via DirtyLoaderUtils.find_matching_filename against the files ComfyUI knows about, then hands off to the stock loader:

loader = hyper.HypernetworkLoader()
return loader.load_hypernetwork(model, hypernetwork_name, strength)

So the actual hypernetwork logic is ComfyUI core's - this node is purely about how you address the file. The fuzziness is the trade: "dirty" means the match is tolerant of partial or slightly-wrong names, which is convenient when you're typing the name by hand and a real hazard when two files have similar names. Give it a string that resolves to nothing and you'll get a clear "not found" style failure from the matching step.

Inputs and outputs

  • model - a MODEL, the base model you're applying the hypernetwork to.
  • hypernetwork_name - a STRING, the filename (or fuzzy match) of the hypernetwork in models/hypernetworks.
  • strength - a FLOAT, default 1.0, range -10.0 to 10.0, step 0.01. Below 1 weakens the effect, above strengthens; negative flips it.
  • Output: one MODEL, ready to feed the rest of the sampler chain.

Install

Ships in bmad4ever/comfyui_bmad_nodes. Via ComfyUI Manager, search "comfyui_bmad_nodes" ("Bmad Nodes"), install, restart. Manual:

cd ComfyUI/custom_nodes
git clone https://github.com/bmad4ever/comfyui_bmad_nodes
cd comfyui_bmad_nodes
pip install -r requirements.txt

Restart ComfyUI after. No model downloads - but obviously you need the hypernetwork .pt file in ComfyUI/models/hypernetworks/ for anything to happen.

Common issues

The name-resolution is where people get burned. The string must match something in your hypernetworks folder, and fuzzy matching can resolve to the wrong file if you have several similarly-named ones. Type the filename carefully. Also remember this loads a hypernetwork on top of an already-loaded model - if you're mixing LoRAs and hypernetworks, the order and strength interactions are on you. And one honest caveat: since this is a legacy technique, expect few modern models or tutorials to use it. It exists to keep old stuff running and to make that old stuff scriptable.

CategoryBmad/api/dirty loaders

Inputs (3)

NameTypeDefaultDescription
modelMODEL
hypernetwork_nameSTRING
strengthFLOAT1.00-10–10

Outputs (1)

NameTypeDescription
MODELMODEL