编辑模型数据集路径
The two-path input node that powers image-editing model training
- input_path
Training an image-editing model is different from training a generator. Instead of one folder of "here's what I want," you need pairs: a source image and the edited result the model should learn to produce. EditModelDatasetPathNode is the pack's way of expressing that pair relationship, and it's the node you reach for when training the Qwen-Image-Edit line (or any of the image-edit models this pack supports).
What it does
Where the plain GeneralDatasetPathNode takes a single dataset_path, this node takes two required paths:
target_path- the generated images: what the model should learn to output. The tooltip's phrasing is "the images the model is to learn to generate."control_path- the original images: the source inputs that correspond to each target. The tooltip calls these the "control images" paired with each target.
Those two folders are expected to be aligned - file pairs representing the same example before and after. The node packages them into a small dict ({"path": target, "control_path": control}) and emits it as the input_path output, which feeds into GeneralDatasetConfig (or EvalDatasetConfig) exactly where the single-folder node's output would go.
One nice touch in the source: it normalizes WSL2 paths for its existence check and prints a console warning if either path doesn't exist. That check is only a warning - it won't stop you - but it's a free heads-up before you wait through a full training run that crashes on a typo.
Where it sits
The chain for an edit-model run: EditModelDatasetPathNode → GeneralDatasetConfig.input_path → GeneralConfig → Train. Everything else in the pack behaves the same as a normal training run; only the dataset definition is paired rather than single-folder. The README's changelog tracks this feature through the Qwen-Image-Edit releases (20251103: support MultiImage Edit (qwen2509)), so think of this node as the general-purpose harness for that whole family.
Installing the pack
Standard TianDongL/Diffusion_pipe_in_ComfyUI 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
Restart, then drag in example_workflows/DiffusionPipeInComfyUI.json and read the in-workflow prompts about dataset structure before building your pairs.
Common issues
The failure mode here is almost always folder alignment: different file counts or mismatched names between target_path and control_path, which the node can't catch and the trainer will choke on mid-run. Set both up from the same source so every file has a partner. Also remember the pack's WSL2 path quirk - Z:/... style paths, not /mnt/z/... - because the node's own existence check normalizes for you but the trainer downstream runs on whatever string you typed.
Inputs (2)
| Name | Type | Default | Description |
|---|---|---|---|
| target_path | STRING | 生成图像路径 - 模型要学习生成的图像 | |
| control_path | STRING | 原图像路径 - 与目标图像对应的控制图像 |
Outputs (1)
| Name | Type | Description |
|---|---|---|
| input_path | input_path | — |