Nodes/Diffusion_pipe_in_ComfyUI/多图编辑数据集路径
ComfyUI Node

多图编辑数据集路径

Multi-image edit training, one control path per line

By TianDongL·Created 11 months ago·Updated 7 months ago· 69
多图编辑数据集路径
    • input_path
    target_path
    control_paths

    Image-edit models are a different beast from text-to-image models. A text-to-image training pair is one image and one caption. An edit model needs the target output image plus one or more control images that describe the input condition - the thing being edited. MultiImageEditDatasetPathNode is the dataset node that gives the pack this second kind of training data. It was added alongside Qwen-Image-Edit-2509 support (the README's Nov 2025 update), and it's the node you reach for when you're training an edit-style LoRA rather than a generation-style one.

    How it works

    Two inputs. target_path is the folder of target images - the outputs you want the model to produce. control_paths is a multiline text box where each line is a full path to a folder of control images. The node splits control_paths on newlines, strips whitespace, checks that the target folder and each control folder exist (warnings only - it doesn't refuse), and builds a config dict:

    {
      "path": "<target_path>",
      "control_paths": ["<folder1>", "<folder2>", "..."]
    }
    

    That input_path output wires into GeneralDatasetConfig exactly like any other dataset path node, and the underlying diffusion-pipe training code knows how to pair each target image with its corresponding control images by filename. If you're training a Qwen-Image-Edit LoRA, this is the dataset input you'll be using instead of the plain image-folder node.

    The inputs that matter

    • target_path - folder of target (output) images.
    • control_paths - multiline: one control-image folder path per line. Multiple control paths let you teach the model multi-image edit behaviors (e.g. subject from one image, style from another).

    Output: input_pathGeneralDatasetConfig.

    Install

    Same as the rest of the pack - ComfyUI Manager, search "Diffusion_pipe_in_ComfyUI", or:

    cd ComfyUI/custom_nodes
    git clone --recurse-submodules https://github.com/TianDongL/Diffusion_pipe_in_ComfyUI.git
    cd Diffusion_pipe_in_ComfyUI
    git submodule init && git submodule update
    pip install -r requirements.txt
    

    Linux/WSL2 only. The heavy deepspeed + diffusers dependency stack installs along with it.

    Where people get burned

    The obvious trap is confusing the roles: target_path is what you want, the control folders are what you feed the model. Swap them and you'll silently train the model to produce your inputs, which is the opposite of what you want. Second, the "one folder per line" rule - people paste a single path containing all control images and the node treats the whole thing as one folder. And because path validation is only a console warning, a typo in any control path means that condition silently drops out of training. Skim the ComfyUI console after running the graph once, before you commit to a long run. Multi-image edit training is fiddly, but this node makes the dataset half of it about as simple as it gets.

    CategoryDiffusion-Pipe/dataset

    Inputs (2)

    NameTypeDefaultDescription
    target_pathSTRING
    control_pathsSTRING

    Outputs (1)

    NameTypeDescription
    input_pathinput_path