HiDream模型配置器
Training config for HiDream — where the Llama3 text encoder lives matters
- model_path
HiDream is the model family that leans on an actual LLM - a Llama3 - as its text encoder, and that's the thing that makes its training setup different from almost everything else in this pack. HiDreamModelNode is where you tell diffusion-pipe where that Llama3 lives, along with the HiDream diffusers weights. If you've ever looked at a HiDream training config and thought "why do I need two paths, one of them a whole LLM folder," this node is the answer to that.
What it does
Standard model-config-node pattern, with an unusual second required path:
diffusers_path(required) - a HiDream diffusers-format folder, e.g./data/models/HiDream-I1-Full. This holds the main model weights.llama3_path(required) - the Llama3 model folder used as the text encoder, e.g./data/models/llama3. Note it's a folder, not a single file - the encoder is a real LLM checkpoint, and diffusion-pipe loads it from its directory layout.
Then three optional knobs:
llama3_4bit(default on) - loads the Llama3 encoder in 4-bit quantization. This is your VRAM relief valve, and it's on for a reason: an unquantized Llama3-class encoder eats memory fast. Unless you have headroom to spare and a reason, leave it.max_llama3_sequence_length(default 128, range 32–2048) - how many tokens of prompt the encoder takes. 128 is a sensible floor for captioning; bump it if your captions are long prose.flux_shift(default off) - the resolution-dependent timestep shift in the Flux style. Off by default here; flip it only if you're chasing a specific training behavior.
The output is the usual model_path config, tagged for the HiDream model class, wired into GeneralConfig.model_config. The README table grants HiDream LoRA ✅ and fp8 ✅ but no full fine-tune, so the sensible path is LoRA.
Fitting it in
Same pipeline as the rest of the pack: HiDreamModelNode → GeneralConfig → Train, with AdapterConfigNode, dataset, and optimizer around it. The Llama3 requirement is the one place people trip - you can't skip the encoder folder the way you might skip a Flux text encoder by pointing at a dev-folder.
Installing the pack
Shared install - Linux/WSL2 only, submodules mandatory:
cd ComfyUI/custom_nodes/
git clone --recurse-submodules https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
git submodule update
pip install -r Diffusion_pipe_in_ComfyUI/requirements.txt
The pack also expects the latest dev diffusers for current model support; the README's one-liner is pip install git+https://github.com/huggingface/diffusers.
Common issues
The predictable failure is pointing llama3_path at a single file instead of a folder - it needs the directory. Full absolute paths everywhere, and remember the pack's WSL2 drive-letter convention (Z:/..., not /mnt/z/...). If you're VRAM-crashing at load, your llama3_4bit is almost certainly off; if your captions get truncated, raise max_llama3_sequence_length. Both are easy to blame elsewhere.
Inputs (5)
| Name | Type | Default | Description |
|---|---|---|---|
| diffusers_path | STRING | HiDream diffusers模型文件夹的完整路径(如:/data/models/HiDream-I1-Full) | |
| llama3_path | STRING | Llama3模型文件夹的完整路径(如:/data/models/llama3) | |
| llama3_4bitopt | BOOLEAN | true | 启用Llama3 4bit量化 |
| max_llama3_sequence_lengthopt | INT | 12832–2048 | Llama3最大序列长度 |
| flux_shiftopt | BOOLEAN | false | 使用分辨率相关的时间步偏移(类似Flux) |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| model_path | model_path | — |