HDM Loader
The garage-trained anime model's front door
- MODEL
- CLIP
- VAE
The HDM Loader is the only door into the whole HDM ecosystem, and HDM is a story worth knowing. HDM stands for "Home-Made Diffusion Model" - KohakuBlueleaf's bet that you can train a genuinely competitive text-to-image model at home. His model is 340M parameters, trained for under $620 of rented GPU time, and it turns out good anime. The community noticed: the release thread on r/StableDiffusion pulled ~170 upvotes, and the top reply called the training cost "a remarkable achievement."
You already know the author whether you realize it or not. KohakuBlueleaf is the person behind LyCORIS, the umbrella library for advanced LoRA variants (LoCon, LoHa, LoKr), and the z-tipo-extension pack. When someone with that resume ships a model plus its own loader, it's worth a look even if you never train anything.
What it actually does
It's a checkpoint loader, but one that knows how to unpack HDM's unusual guts. The safetensors has the diffusion transformer under unet.model., a Qwen3-600M text encoder under te.text_models.0., and an SDXL-architecture VAE (the code reuses ComfyUI's built-in VAE class - the model ships with an EQ-SDXL-VAE). The README is upfront that this repo is a demonstration: "Making a model loader for a custom model while supporting ComfyUI's builtin nodes." Only the Loader and the HDM Camera node are custom in the shipped workflow; everything else is stock.
That's the clever bit. Instead of locking you into a bespoke pipeline, the loader registers the model as ordinary MODEL / CLIP / VAE objects, so CLIPTextEncode, KSampler, and VAEDecode just work with it. The Qwen3 tokenizer is even bundled inside the repo (qwen3_tokenizer/), so you don't hunt down a separate tokenizer folder. The loader drops it into models/checkpoints, same as any SDXL checkpoint.
The inputs and outputs
There's exactly one input, and it's a dropdown:
ckpt_name- picks a checkpoint from yourComfyUI/models/checkpointsfolder. The author's own tooltip: "The name of the checkpoint (model) to load."
The three outputs are the standard triple, each with the author's description:
- MODEL - "The model used for denoising latents." Goes into
KSampler. - CLIP - "The CLIP model used for encoding text prompts." Goes into both your
CLIPTextEncodenodes. - VAE - "The VAE model used for encoding and decoding images to and from latent space." Goes into
VAEDecode.
From there the graph is boring and familiar: text encodes, maybe an HDM Camera and HDM Tread Gamma in the conditioning path, a KSampler, a VAEDecode. The example workflow (HDM-example.json in the repo) runs a 1024×2048 portrait with euler/simple at 32 steps.
Installing it
ComfyUI Manager is the easy path - search for "HDM" (the pack title is HDM-ext) and install. Or manually:
cd ComfyUI/custom_nodes
git clone https://github.com/KohakuBlueleaf/HDM-ext
# then restart ComfyUI
The one real dependency is transformers>4.51 - the README notes you want at least 4.52 for Qwen3 support. This is the classic ComfyUI dependency trap: the runtime bundles its own transformers, and if yours is older, the Qwen3 text encoder will fail in confusing ways. Let Manager install the requirement, or pip install -U transformers into your ComfyUI environment.
Then grab the model from https://huggingface.co/KBlueLeaf/HDM-xut-340M-anime and put the safetensors into ComfyUI/models/checkpoints. The example workflow expects hdm-xut-340M-1024px-note.safetensors; 512px and 768px variants exist if your GPU is small.
Where people get burned
- It's a WIP pack, and it's non-commercial. Until development finishes, everything - models, code, docs - is licensed CC-BY-NC-SA 4.0. Fine for personal use, but read that license before you build anything commercial on it.
- Anime only, right now. The author trained it on curated danbooru data; a general model is under construction.
- VRAM isn't free. 340M params sounds tiny, but the Qwen3 encoder and VAE still add up - the author recommends a tensor-core GPU with ~6GB VRAM, more at 1024×2048.
- It's a flow-matching model. Don't import your SDXL sampler habits; stick to the 16–32 step range the model was trained for.
One last honest note: this is a 0-impression, brand-new node from a serious researcher, and it's explicitly a reference implementation. It's less battle-tested than the LoRA tooling you're used to. That's fine - just know you're an early adopter.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| ckpt_name | COMBO | The name of the checkpoint (model) to load. |
Outputs (3)
| Name | Type | Description |
|---|---|---|
| MODEL | MODEL | The model used for denoising latents. |
| CLIP | CLIP | The CLIP model used for encoding text prompts. |
| VAE | VAE | The VAE model used for encoding and decoding images to and from latent space. |