通用数据集路径
The simplest node in the pack — a folder path with a free existence check
- input_path
Not every node needs a long essay, and GeneralDatasetPathNode is the node that doesn't. It takes one string - a folder path - and hands it to the dataset config as the input_path it's expecting. If you've been reading through this pack, you already know where it goes: its output plugs into the input_path input on GeneralDatasetConfig (or EvalDatasetConfig), which then feeds GeneralConfig, which feeds Train. This node is the first link in that chain.
What it does
One required input, dataset_path, a plain string of the folder holding your training images (plus whatever captions/text files your setup uses). The output input_path carries the same value forward, wrapped in the type the dataset configs expect.
It does two small things beyond pass-through, and both are worth knowing:
- WSL2 path normalization - the source has a
normalize_wsl_pathhelper that converts Windows drive-letter paths (Z:\...,F:/...) into the Linux-style paths WSL2 actually uses. That's not cosmetic: it's the mechanism behind the pack's drive-letter convention, and it means you can paste the path Windows gives you and mostly not have to think. - An existence check with a warning - if the normalized path doesn't exist, it prints a warning to the console (
警告: 路径不存在). It doesn't stop you - the node still passes the original string through - but it's a free early warning before a multi-hour training run crashes on a typo. Watch the console when you queue a run.
When to reach for it
Basically always, for image training. The alternatives are EditModelDatasetPathNode (paired source/target folders for editing-model training) and the specialized path nodes for multi-image edit and mask training that share this file. Plain folder of images → this node → GeneralDatasetConfig. Video training still starts here; you just add FrameBucketsNode and video_clip_mode on the config side.
Installing the pack
The shared install - Linux/WSL2 only (this is the WSL2 branch; bare Windows uses the separate _Win repo), submodules mandatory:
cd ComfyUI/custom_nodes/
git clone --recurse-submodules https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
git submodule update # without this, training will not work
pip install -r Diffusion_pipe_in_ComfyUI/requirements.txt
Restart ComfyUI and load the example workflow from example_workflows/ to see the canonical dataset wiring.
Common issues
The most common failure isn't this node's fault: a wrong or stale path passes through happily (with just a console warning) and the trainer fails later, so when training dies on a missing dataset the first thing to check is what you actually typed here. Remember the drive-letter convention - Z:/data/my_dataset rather than /mnt/z/data/my_dataset - since the normalization is lenient about which form you use but the trainer downstream sees the original string.
Inputs (1)
| Name | Type | Default | Description |
|---|---|---|---|
| dataset_path | STRING | 数据集文件夹路径 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| input_path | input_path | — |