Nodes/distrifuser_comfyui/DFPipelineConfig
ComfyUI Node

DFPipelineConfig

The node that makes your second GPU finally pull its weight

By SlackinJack·Created 2 years ago·Updated about a year ago· 0
DFPipelineConfig
    • DF_CONFIG
    model
    width512
    height512
    schedulerdpmpp_2m
    pipeline_typeSDXL
    variantfp16
    nproc_per_node2
    parallelismpatch
    no_split_batchfalse
    warmup_steps4
    enable_model_cpu_offloadfalse
    enable_sequential_cpu_offloadfalse
    enable_tilingfalse
    enable_slicingfalse
    xformers_efficientfalse

    If you've got two GPUs in a box, you've probably wondered why only one of them ever does any real work. ComfyUI's default multi-GPU answer is batching - card A renders image 1, card B renders image 2. That's fine for throughput, but it does nothing for the single big image you're waiting on. DistriFuser is the other answer: it splits one image into patches and denoises them in parallel across every card. DFPipelineConfig is where that whole circus gets configured, and it's the node this pack is really about.

    Before we go further, set expectations. This is research-grade code from MIT Han Lab, wrapped for ComfyUI by SlackinJack, and it's niche - nearly zero community footprint. It will not make your 512×512 test renders faster. It exists for the person who has multiple GPUs and wants one very high-resolution image generated coherently, which is exactly the thing people spent years saying "real multi-GPU inference" meant.

    How it works

    DistriFusion (the paper behind all this) splits the latent image into patches, one per GPU, and each card computes its patch of the UNet. The naive version of that leaves ugly seams where patches never see each other. The paper's trick: the first few steps run fully synchronized so patches interact, then later steps reuse the previous step's activations via asynchronous communication, hiding the data transfer inside the compute. That's what turns "two GPUs talking over a bus" from a slowdown into an actual speedup.

    That's the theory, anyway. The headline numbers (1.8× with 2 cards, 6.1× with 8) were measured on A100s at 3840×3840. Real people on consumer cards report more like 1.5× with two GPUs, and only when the image is big and the interconnect (NVLink beats PCIe) can keep up.

    The inputs that matter

    Most of this node is a direct port of the upstream DistriConfig. You really only touch a handful:

    • nproc_per_node (default 2) - how many GPUs get a patch. This is the whole point of the node.
    • parallelism - patch (default) is the actual DistriFusion algorithm; naive_patch is the seam-prone baseline from the paper; tensor is tensor parallelism. Leave it on patch unless you're benchmarking.
    • warmup_steps (default 4) - how many fully-synchronized steps run at the start before the async trick kicks in. The paper's default is 4.
    • model + pipeline_type + variant - the model picker (the dropdown choices don't ship in the schema, so treat it as whatever diffusers checkpoint the wrapper finds), whether it's SD or SDXL architecture, and bf16/fp16/fp32 weight precision. Make sure pipeline_type matches what you load.
    • width / height (default 512, step 8) - the resolution. This is where DistriFuser actually shines, so if you're testing at 512 you're seeing it at its worst.

    The rest are knobs borrowed straight from the diffusers pipeline: scheduler (12 choices, default dpmpp_2m - the upstream defaults were DDIM/DPM, so don't overthink this), no_split_batch (by default the classifier-free guidance batch is split across GPUs; tick it to force each card to run the full batch), and the offload/tiling/slicing/xformers toggles for memory pressure. The single output is a DF_CONFIG object, and it feeds directly into the DFSampler node's config input.

    Installing it

    Via ComfyUI Manager, search "distrifuser_comfyui". Or the old-fashioned way:

    cd ComfyUI/custom_nodes
    git clone https://github.com/SlackinJack/distrifuser_comfyui
    

    Then restart ComfyUI - and here's the part the README insists on: run clone_distrifuser_repo.sh before deploying. Manager alone won't get you running, because the pack expects the upstream MIT Han Lab distrifuser repo to exist for it to import. The upstream also pins its own stack: PyTorch 2.2, CUDA 12+, diffusers 0.24. And the models are diffusers-format HuggingFace checkpoints (SDXL base, SD 1.x) - multi-gigabyte downloads, not the single .safetensors you're used to dropping in models/checkpoints.

    Where people get burned

    The README's one known issue is the big one: the pipeline needs a restart to apply new settings. Change the config, change nothing, restart ComfyUI. If your renders come out with visible seams, check that parallelism is on patch, not naive_patch. And if you're not seeing speedups, check your resolution and your interconnect - this is a high-res, fast-bus algorithm, and on two PCIe cards at 512×512 the communication overhead eats the entire gain.

    CategoryDistrifuser

    Inputs (15)

    NameTypeDefaultDescription
    modelCOMBO0 options:
    widthINT5120–8192
    heightINT5120–8192
    schedulerCOMBOdpmpp_2m12 options: ddim, euler, euler_a, dpm_2, dpm_2_a, dpmpp_2m, +6
    pipeline_typeCOMBOSDXL2 options: SD, SDXL
    variantCOMBOfp163 options: bf16, fp16, fp32
    nproc_per_nodeINT21–8192
    parallelismCOMBOpatch3 options: naive_patch, patch, tensor
    no_split_batchBOOLEANfalse
    warmup_stepsINT40–32
    enable_model_cpu_offloadBOOLEANfalse
    enable_sequential_cpu_offloadBOOLEANfalse
    enable_tilingBOOLEANfalse
    enable_slicingBOOLEANfalse
    xformers_efficientBOOLEANfalse

    Outputs (1)

    NameTypeDescription
    DF_CONFIGDF_CONFIG